3 Replies Latest reply: Mar 30, 2012 7:03 AM by user11258661 RSS

    How to remove certian options from a Dropdown(Message Choice)

      Hi All,

      I have a requirement where certain values from a dropdown list should be hidden/removed based on certain conditions. We tried to create a MessageChoice Bean and tried the removeOption method in the processRequest method but it threw a null pointer exception. The code is as below.

      public void processRequest(OAPageContext pageContext, OAWebBean webBean)
      super.processRequest(pageContext, webBean);
      OAMessageChoiceBean omc = (OAMessageChoiceBean)webBean.findChildRecursive("QotLnItmAction");
      omc.removeOption(1); --- null pointer exception was thrown here

      Please let me know how to go about doing this. Is it possible to remove values from a dropdown?


      Edited by: user11258661 on Mar 28, 2012 11:17 PM