Examples of CriteriaSelectForm


Examples of evolaris.mgbl.gs.web.form.CriteriaSelectForm

  /**
   * @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
   */
  @SuppressWarnings("unchecked")
  public ActionForward newSelect(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    CriteriaSelectForm f = (CriteriaSelectForm)form;
    f.unconditionalReset(mapping, req)// clear selections in session scoped form
    return select(mapping,form,req,resp);
  }
View Full Code Here

Examples of evolaris.mgbl.gs.web.form.CriteriaSelectForm

 
  /**
   * Prepare data as expected by ApplicationResultAction (could be cleaned up a lot)
   */
  public ActionForward searchApplication(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    CriteriaSelectForm f = (CriteriaSelectForm)form;
    Map<String, String[][]> criteriasInGroupsAndCategories = new HashMap<String, String[][]>();
    String[] categoryNames = (String[])req.getSession().getAttribute(ATTR_CATEGORYNAMES);
    if (categoryNames == null){  // probably session time out
      return mapping.findForward("cancelled");
    }
    for (int i=0; i<categoryNames.length; i++) {     
      String[][] criterias = new String[MAX_NOF_GROUPS][];
      criterias[0] = f.getCriterias(i, 0);
      criterias[1] = f.getCriterias(i, 1);
      criterias[2] = f.getCriterias(i, 2);
      criteriasInGroupsAndCategories.put(categoryNames[i], criterias);
    }
    req.getSession().setAttribute(ATTR_CRITERIAS_IN_GROUPS_AND_CATEGORIES, criteriasInGroupsAndCategories);
   
    Category[] categories = prepareCategories(req);
    String[][][] criterianames = prepareGroupsAndCriteria(req, categories);
    boolean[][][] selected = new boolean[MAX_NOF_CATEGORIES][MAX_NOF_GROUPS][];
    for (int cat = 0; cat < criterianames.length; cat++) {
      for (int g = 0; g < criterianames[cat].length; g++) {
        boolean selectedInGroup[] = new boolean[criterianames[cat][g].length];
        for (int c = 0; c < criterianames[cat][g].length; c++) {
          selectedInGroup[c] = f.isSelectedCriteria(cat, g, c);
        }
        selected[cat][g] = selectedInGroup;
      }
    }
    req.getSession().setAttribute("selectedcriterias", selected);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.