Đang chuẩn bị liên kết để tải về tài liệu:
Enterprise Java and UML 2nd Edition PHẦN 5

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

40 SelectChargeCodeServletjava import import import import import import import import import com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.FormPrimitives.*; com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.Layout.*; com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.ContentElements.*; com.wiley.compBooks.EJwithUML.TimeCardWorkflow.*; com.wiley.compBooks.EJwithUML.TimeCardDomain.*; com.wiley.compBooks.EJwithUML.TimecardProducers.*; com.wiley.compBooks.EJwithUML.Dtos.*; com.wiley.compBooks.EJwithUML.Base.EjbUtil.*; com.wiley.compBooks.EJwithUML.Base.ApplicationExceptions.*; /** * The RecordTimeServlet uses the TimecardWorkflow and * HtmlProduction packages to create the formatted HTML * to build a charge code selection grid. */ public class SelectChargeCodeServlet extends BasicTimecardServlet { private RecordTimeWorkflowHome rtwhome = null; /** Overrides method from HttpServlet. doGet is called by the servlet engine. */ public void doGet(HttpServletRequest request,. | 40 SelectChargeCodeServletjava import com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.FormPrimitives. import com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.Layout. import com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.ContentElements. import com.wiley.compBooks.EJwithUML.TimeCardWorkflow. import com.wiley.compBooks.EJwithUML.TimeCardDomain. import com.wiley.compBooks.EJwithUML.TimecardProducers. import com.wiley.compBooks.EJwithUML.Dtos. import com.wiley.compBooks.EJwithUML.Base.EjbUtil. import com.wiley.compBooks.EJwithUML.Base.ApplicationExceptions. The RecordTimeServlet uses the TimecardWorkflow and HtmlProduction packages to create the formatted HTML to build a charge code selection grid. public class SelectChargeCodeServlet extends BasicTimecardServlet private RecordTimeWorkflowHome rtwhome null Overrides method from HttpServlet. doGet is called by the servlet engine. public void doGet HttpServletRequest request HttpServletResponse response throws ServletException IOException doPost request response Overrides method from HttpServlet. doPost is called by the servlet engine. public void doPost HttpServletRequest request HttpServletResponse response throws ServletException IOException try HttpSession session request.getSession String username String session.getAttribute TimecardKey.USERNAME.getKeyText PagePrimitive page new TimecardPageProducer Select a Charge Code ParagraphPrimitive page_title new ParagraphPrimitive TimecardStyle.IMPORTANT_TEXT Select a charge code from the list below page.addToBody page_title Iterator clients getClients username TablePrimitive table new TablePrimitive table.setStyle TimecardStyle.CHARGE_CODE_SELECTION_TABLE table.setStyleForCells TimecardStyle.CHARGE_CODE_SELECTION_CELLS page.addToBody table int row_ctr 0 SelectChargeCodeServletjava 41 table.setPrimitiveAt row_ctr 0 new SpanPrimitive TimecardStyle.IMPORTANT_TEXT Client table.setPrimitiveAt row_ctr 1 new SpanPrimitive TimecardStyle.IMPORTANT_TEXT Project .