zoukankan      html  css  js  c++  java
  • 根据条件设置poplist的值集

    需求:在当前页面的pageButtonBar中有一个下拉选择框,选择框中的值集根据某些条件有不同。

    public class SupplierInfoReviewCO extends OAControllerImpl
    {
      public static final String RCS_ID="$Header$";
      public static final boolean RCS_ID_RECORDED =
            VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
            
            
        String spacerStr = "-------------------";
        LinkedList actionListText = new LinkedList();
        LinkedList actionListValue = new LinkedList();
        
          /**
       * Layout and page setup logic for a region.
       * @param pageContext the current OA page context
       * @param webBean the web bean corresponding to the region
       */
      public void processRequest(OAPageContext pageContext, OAWebBean webBean)
      {
        super.processRequest(pageContext, webBean);
        
        populateBuyerActions(pageContext, webBean);
      }
      
        public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
      {
        super.processFormRequest(pageContext, webBean);
        
              Integer integer = Integer.valueOf(0);
        if (pageContext.getParameter("GoBtn") != null) {
              try {
                  integer = 
                          Integer.valueOf(Integer.parseInt(pageContext.getParameter("ActionList")));
              } catch (Exception localException1) {
                  integer = Integer.valueOf(-1);
              }
          }
          
        if (integer.intValue() == 210)
          {
              //your code
              
              return;
          }
          
        if (integer.intValue() == 220)
          {
              //your code
              return;
          }
      }
      
        private void populateBuyerActions(OAPageContext pageContext, OAWebBean webBean)
       {
       
        String wfStatus = pageContext.getParameter("WfStatus");
        String suppResponseStatus = pageContext.getParameter("SuppResponseStatus");
        
         addAction(this.spacerStr, -1);
         addAction(pageContext.getMessage("POS", "POS_SUPP_CANCEL_ACTN", null), 40);
         
         if("SUPP_RESPONSED".equals(suppResponseStatus)){
            addAction(pageContext.getMessage("CUX", "CUX_POST_LEADER_APPROVER", null), 210);         
         }
         
         if("PREPARATORY".equals(wfStatus)){         
             addAction(pageContext.getMessage("CUX", "CUX_CREATE_ADMIT_CATEGORY", null), 220);
             removeAction(pageContext.getMessage("CUX", "CUX_POST_LEADER_APPROVER", null), 210);         
         }
         
         
       }
       
        private void addAction(String paramString, int paramInt)
       {
         if (!this.actionListText.contains(paramString))
         {
           this.actionListText.add(paramString);
           this.actionListValue.add(Integer.toString(paramInt));
         }
       }
       
     private void removeAction(String paramString, int paramInt)
       {
         if (this.actionListText.contains(paramString))
         {
           this.actionListText.remove(paramString);
           this.actionListValue.remove(Integer.toString(paramInt));
         }
       }
      
      
    }
  • 相关阅读:
    codeforces 732D
    我的ubuntu配置
    周末实在无聊,自己写了一遍被人写烂了的“贪吃蛇”,欢迎各位新手低手高手老手前来吐槽哈哈
    两种方式实现点击列表弹出列表索引
    浅谈javascript中原型(prototype)、构造函数、对象实例及三者之间的关系
    写了个超级简单的“进度条”的demo,供新手参考,高手吐槽!
    javascript 使用 NodeList主意的问题
    js中的“||”和“&&”
    javascript call函数实现继承时遇到的问题
    javascript 解决innerText浏览器兼容
  • 原文地址:https://www.cnblogs.com/huanghongbo/p/4605574.html
Copyright © 2011-2022 走看看