Uploaded image for project: 'Beehive'
  1. Beehive
  2. BEEHIVE-1193

disabling netui:select tag with client side Javascript can cause an exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.1, 1.0.2
    • V.Next
    • None
    • None

    Description

      An ArrayIndexOutOfBoundsException (or an AssertionError with asserts on) is thrown when client side Javascript disables the generated HTML select tag just before the form is submitted. The problem with this is that the additional hidden input element, <input type="hidden" ...>, used by the framework, provides form data that normally is not be present when the form is disabled via the NetUI tag attribute.

      This hidden element is used by the framework and its name includes a special marker. So when the Javascript disables the select element, there is still a hidden <input> that gets processed. During the parameter processing the frameworks sees the input and determines that there should be select data to go with it but in this case there isn't because the Javascript disabled the select.

      Need to make sure that parameter processing in the Select.SelectPrefixHandler class can handle this case correctly and treat as a null parameter value.

      The stack trace for this issue is...
      java.lang.ArrayIndexOutOfBoundsException
      at java.lang.reflect.Array.get(Native Method)
      at org.apache.beehive.netui.script.el.util.ParseUtils.convertType(ParseUtils.java:188)
      at org.apache.beehive.netui.script.el.tokens.ExpressionToken.beanUpdate(ExpressionToken.java:212)
      at org.apache.beehive.netui.script.el.tokens.IdentifierToken.write(IdentifierToken.java:97)
      at org.apache.beehive.netui.script.el.ExpressionTerm.update(ExpressionTerm.java:166)
      at org.apache.beehive.netui.script.el.ParsedExpression.update(ParsedExpression.java:141)
      at org.apache.beehive.netui.script.el.util.ParseUtils.update(ParseUtils.java:92)
      at org.apache.beehive.netui.script.el.ExpressionEvaluatorImpl.update(ExpressionEvaluatorImpl.java:84)
      at org.apache.beehive.netui.pageflow.ProcessPopulate.populate(ProcessPopulate.java:231)
      at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processPopulate(PageFlowRequestProcessor.java:329)
      ...

      Attachments

        Activity

          People

            jzhuo Julie Zhuo
            crogers Howard Carlin Rogers
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: