Package org.jresearch.gossip.forms

Examples of org.jresearch.gossip.forms.RankForm


    protected ActionForward process(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws JGossipException {
        ForumDAO dao = ForumDAO.getInstance();
        RankForm rForm = (RankForm) form;
        try {
            int count = Integer.parseInt(rForm.getCount());
            int id = -1;
            try {
                id = Integer.parseInt(rForm.getId());
            } catch (NumberFormatException e) {
                id = -1;
            }
            List records = dao.getRankList();
            Iterator it = records.iterator();
            while (it.hasNext()) {
                RankInfoDTO curr = (RankInfoDTO) it.next();
                if (curr.getCount() == count && curr.getId() != id) {
                    ActionErrors errors = new ActionErrors();
                    errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(
                            "errors.ERR23", rForm.getCount()));
                    saveErrors(request, errors);
                    return mapping.getInputForward();
                }
            }
            saveRank(rForm);
View Full Code Here


  protected ActionForward process(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response)
      throws JGossipException {
    ForumDAO dao = ForumDAO.getInstance();
    ProcessItemForm piForm = (ProcessItemForm) form;
    RankForm rForm;
    if (request.getAttribute("rankForm") == null) {
      try {
        RankInfoDTO info = dao.getRankInfo(Integer.parseInt(piForm
            .getId()));
        rForm = new RankForm();
        BeanUtils.copyProperties(rForm, info);
      } catch (SQLException e) {
        throw new SystemException(e);
      } catch (IllegalAccessException e) {
        throw new SystemException(e);
View Full Code Here

TOP

Related Classes of org.jresearch.gossip.forms.RankForm

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.