Package org.xdams.page.view.bean

Examples of org.xdams.page.view.bean.EditingBean


      UserBean userBean = (UserBean) pageContext.findAttribute("userBean");

      ViewBean viewBean = (ViewBean) pageContext.findAttribute("viewBean");

      EditingBean editingBean = (EditingBean) pageContext.findAttribute("editingBean");

      WorkFlowBean workFlowBean = (WorkFlowBean) pageContext.findAttribute("workFlowBean");

      JspWriter out = pageContext.getOut();

      HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
      if (request.getParameter("infoFlag") != null && request.getParameter("infoFlag").equals("true")) {
        return EVAL_BODY_INCLUDE;
      }

      MultiEditingManager editingManager = new MultiEditingManager(request.getParameterMap(), confBean, userBean, workFlowBean);
      if (editingBean != null) {
        editingManager.setTheXML(editingBean.getXmlBuilder());
      } else if (viewBean != null) {
        editingManager.setTheXML(viewBean.getXmlBuilder());
      }

      XMLBuilder builderManaging = null;
View Full Code Here


  public void execute() throws Exception {
    XWConnection xwconn = null;
    ConnectionManager connectionManager = new ConnectionManager();
    ConfBean confBean = null;
    EditingBean editingBean = null;
    String physDoc = MyRequest.getParameter("physDoc", "", parameterMap);
    //vuol dire che vengo dal preinsert
    if(modelMap.get("physDoc")!=null){
      physDoc = (String) modelMap.get("physDoc");
    }
   
    List<String> confControl = new ArrayList<String>();
    confControl.add("docEdit");
    confControl.add("valoriControllati");
    try {
      UserBean userBean = (UserBean) modelMap.get("userBean");
      //confBean = (ConfBean) modelMap.get("confBean");
      confBean = new ConfBean();
      WorkFlowBean workFlowBean = (WorkFlowBean) modelMap.get("workFlowBean");
      if (physDoc.equals("")) {
        physDoc = (String) workFlowBean.getRequest().getAttribute("physDoc");
      }
      editingBean = new EditingBean();
      editingBean.setPhysDoc(Integer.parseInt(physDoc));
      xwconn = connectionManager.getConnection(workFlowBean.getArchive());
      editingBean.setDocXml(xwconn.getSingleXMLFromNumDoc(editingBean.getPhysDoc()));
      XMLBuilder theXMLDoc = new XMLBuilder(editingBean.getDocXml(), "ISO-8859-1");
      editingBean.setXmlBuilder(theXMLDoc);

      MultiEditingManager editingManager = new MultiEditingManager(parameterMap, confBean, userBean, workFlowBean);
      editingManager.setTheXML(editingBean.getXmlBuilder());
      confBean = editingManager.rewriteMultipleConf(confControl);

      int docFather = xwconn.docRelNavigate(xwconn.connection, workFlowBean.getAlias(), it.highwaytech.broker.ServerCommand.navigarel_FIGLIOPADRE, editingBean.getPhysDoc());
      editingBean.setDocFather(docFather);
      int docSon = xwconn.docRelNavigate(xwconn.connection, workFlowBean.getAlias(), it.highwaytech.broker.ServerCommand.navigarel_PADREFIGLIO, editingBean.getPhysDoc());
      editingBean.setDocSon(docSon);
      int docUpperBrother = xwconn.docRelNavigate(xwconn.connection, workFlowBean.getAlias(), it.highwaytech.broker.ServerCommand.navigarel_MAGGIOREMINORE, editingBean.getPhysDoc());
      editingBean.setDocUpperBrother(docUpperBrother);
      int docLowerBrother = xwconn.docRelNavigate(xwconn.connection, workFlowBean.getAlias(), it.highwaytech.broker.ServerCommand.navigarel_MINOREMAGGIORE, editingBean.getPhysDoc());
      editingBean.setDocLowerBrother(docLowerBrother);

      editingBean.setPos(MyRequest.getParameter("pos", parameterMap));
      editingBean.setSelid(MyRequest.getParameter("selid", parameterMap));

      if (!editingBean.getSelid().equals("") && !editingBean.getPos().equals("")) {
        QueryResult queryResult = xwconn.getQRFromSelId(editingBean.getSelid());

        try {
          editingBean.setPhysDocNext(xwconn.getNumDocFromQRElement(queryResult, Integer.parseInt(editingBean.getPos()) + 1));
        } catch (Exception e) {
          editingBean.setPhysDocNext(-1);
        }
        try {
          editingBean.setPhysDocPrev(xwconn.getNumDocFromQRElement(queryResult, Integer.parseInt(editingBean.getPos()) - 1));
        } catch (Exception e) {
          editingBean.setPhysDocPrev(-1);
        }
        if (Integer.parseInt(editingBean.getPos()) < queryResult.elements - 1) {
          editingBean.setPosNext(Integer.parseInt(editingBean.getPos()) + 1);
        }
        if (queryResult.elements > 0) {
          editingBean.setPosPrev(Integer.parseInt(editingBean.getPos()) - 1);
        }
      }
      if (!MyRequest.getParameter("thePne", parameterMap).equals("")) {
        editingBean.setThePne(MyRequest.getParameter("thePne", parameterMap));
      } else {
        editingBean.setThePne(workFlowBean.getArchive().getPne());
      }

      modelMap.put("confBean", confBean);
      modelMap.put("editingBean", editingBean);
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.xdams.page.view.bean.EditingBean

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.