Package com.centraview.printtemplate

Examples of com.centraview.printtemplate.PrintTemplateVO


      PrintTemplateHome PTHome = (PrintTemplateHome) CVUtility.getHomeObject(
          "com.centraview.printtemplate.PrintTemplateHome", "Printtemplate");
      PrintTemplate PTRemote = PTHome.create();
      PTRemote.setDataSource(dataSource);

      PrintTemplateVO ptVO = PTRemote.getPrintTemplate(3);

      String ticketTemplate = ptVO.getPtData();

      Set listkey = Values.keySet();
      Iterator it1 = listkey.iterator();
      while (it1.hasNext()) {
        String str = (String) it1.next();
View Full Code Here


      PrintTemplateHome PTHome = (PrintTemplateHome)CVUtility.getHomeObject("com.centraview.printtemplate.PrintTemplateHome", "Printtemplate");
      PrintTemplate PTRemote = PTHome.create();
      PTRemote.setDataSource(dataSource);
     
      PrintTemplateVO ptVO = (PrintTemplateVO)PTRemote.getPrintTemplate(2);

      String proposalCompose = ptVO.getPtData();

      //Setting the Proposal Name
      String title = proposallistform.getProposal();
      if (title == null || title.equals("null"))
      {
View Full Code Here

    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();
    // We will be forwarding to the detail screen so get the forward from the struts
    // config and then we can append the templateId dynamically.
    String forward = mapping.findForward(".view.administration.view_template").getPath();
    // parameterize it up.
    PrintTemplateVO templateVO = new PrintTemplateVO((DynaActionForm)form);
    Object[] parameter = {templateVO};
    try {
      // Check ID if it is zero we are creating a new one, otherwise just updating an existing
      if (templateVO.getPtdetailId() == 0) {
        // create new
        Integer newTemplateId = (Integer)CVUtility.invokeEJBMethod("Printtemplate", "com.centraview.printtemplate.PrintTemplateHome", "newTemplate", parameter, dataSource);
        forward += String.valueOf(newTemplateId);
      } else {
        // update
        CVUtility.invokeEJBMethod("Printtemplate", "com.centraview.printtemplate.PrintTemplateHome", "updateTemplate", parameter, dataSource);
        forward += String.valueOf(templateVO.getPtdetailId());
      }
    } catch (Exception e) {
      logger.error("[execute] Exception executing EJB call, refer (hopefully) to above CVUtility stacktrace.");
      throw new ServletException(e);
    }
View Full Code Here

  {
    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();
    // The ID must be passed in the templateId parameter.
    int templateId = Integer.parseInt(request.getParameter("templateId"));
    // Get the detail from the EJB world ...
    PrintTemplateVO templateVO = null;
    Collection templateCategories = null;
    try {
      PrintTemplate remoteEJB = (PrintTemplate)CVUtility.setupEJB("Printtemplate", "com.centraview.printtemplate.PrintTemplateHome", dataSource);
      templateVO = remoteEJB.getPrintTemplate(templateId);
      templateCategories = remoteEJB.getCategories();
    } catch (Exception e) {
      throw new ServletException(e);
    }
    // ... and populate the DynaActionForm
    DynaActionForm templateForm = (DynaActionForm)form;
    templateVO.populateFormBean(templateForm);
    // Stick the template types (categories) list on the formbean.
    templateForm.set("typeList", templateCategories);
    TemplateUtil.setNavigation(request, "detail");
    // forward to the display screen
    return mapping.findForward(".view.administration.view_template");
View Full Code Here

TOP

Related Classes of com.centraview.printtemplate.PrintTemplateVO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.