Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-18734

Fix select2 "Illegal Syntax for Set Operation” when clearing value in a list

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.10
    • Fix Version/s: 7.10-HF05, 8.2
    • Component/s: Seam / JSF UI
    • Tags:
    • Team:
      AT
    • Sprint:
      nxAT Sprint 8.2.1
    • Story Points:
      2

      Description

      Problem with select2 when used in a complex value.

      In my project I have a list, each element containing two strings. One string is bound to a Single Document Sugggestion, the other bound to a text field. While editing something goes wrong when clicking Save and on the console an error like this appears:

      Jan 07, 2016 4:26:35 PM javax.faces.webapp.PreJsf2ExceptionHandlerFactory$PreJsf2ExceptionHandler log                                                                     
      SEVERE: /widgets/single_document_suggestion_widget_template.xhtml @109,80 value="#{select2Actions.encodeParameters(widget, widgetProperties)}": Illegal Syntax for Set Operation
      javax.el.PropertyNotWritableException: /widgets/single_document_suggestion_widget_template.xhtml @109,80 value="#{select2Actions.encodeParameters(widget, widgetProperties)}": Illega
      l Syntax for Set Operation
              at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:136)
              at javax.faces.component.UIInput.updateModel(UIInput.java:832)
              at javax.faces.component.UIInput.processUpdates(UIInput.java:749)
              at org.nuxeo.ecm.platform.ui.web.binding.alias.UIAliasHolder.processComponent(UIAliasHolder.java:204)
              at org.nuxeo.ecm.platform.ui.web.binding.alias.UIAliasHolder.processFacetsAndChildren(UIAliasHolder.java:181)
              at org.nuxeo.ecm.platform.ui.web.binding.alias.UIAliasHolder.processFacetsAndChildrenWithVariables(UIAliasHolder.java:189)
              at org.nuxeo.ecm.platform.ui.web.binding.alias.UIAliasHolder.processUpdates(UIAliasHolder.java:175)
              at org.nuxeo.ecm.platform.ui.web.binding.alias.UIAliasHolder.processComponent(UIAliasHolder.java:204)
              at org.nuxeo.ecm.platform.ui.web.binding.alias.UIAliasHolder.processFacetsAndChildren(UIAliasHolder.java:181)
              at org.nuxeo.ecm.platform.ui.web.binding.alias.UIAliasHolder.processFacetsAndChildrenWithVariables(UIAliasHolder.java:189)
              at org.nuxeo.ecm.platform.ui.web.binding.alias.UIAliasHolder.processUpdates(UIAliasHolder.java:175)
              at org.nuxeo.ecm.platform.ui.web.binding.alias.UIAliasHolder.processComponent(UIAliasHolder.java:204)
              at org.nuxeo.ecm.platform.ui.web.binding.alias.UIAliasHolder.processFacetsAndChildren(UIAliasHolder.java:181)
              at org.nuxeo.ecm.platform.ui.web.binding.alias.UIAliasHolder.processFacetsAndChildrenWithVariables(UIAliasHolder.java:189)
              at org.nuxeo.ecm.platform.ui.web.binding.alias.UIAliasHolder.processUpdates(UIAliasHolder.java:175)
              at org.nuxeo.ecm.platform.ui.web.binding.alias.UIAliasHolder.processComponent(UIAliasHolder.java:204)
              at org.nuxeo.ecm.platform.ui.web.binding.alias.UIAliasHolder.processFacetsAndChildren(UIAliasHolder.java:181)
              at org.nuxeo.ecm.platform.ui.web.binding.alias.UIAliasHolder.processFacetsAndChildrenWithVariables(UIAliasHolder.java:189)
              at org.nuxeo.ecm.platform.ui.web.binding.alias.UIAliasHolder.processUpdates(UIAliasHolder.java:175)
              at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1286)
              at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1286)
              at org.nuxeo.ecm.platform.ui.web.component.list.UIEditableList.processComponent(UIEditableList.java:1230)
              at org.nuxeo.ecm.platform.ui.web.component.list.UIJavascriptList.processFacetsAndChildren(UIJavascriptList.java:235)
              at org.nuxeo.ecm.platform.ui.web.component.list.UIEditableList.executeValidate(UIEditableList.java:1249)
              at org.nuxeo.ecm.platform.ui.web.component.list.UIEditableList.processValidators(UIEditableList.java:1099)
              at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1258)
              at javax.faces.component.UIForm.processValidators(UIForm.java:253)
              at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1258)
              at org.nuxeo.ecm.platform.ui.web.component.holder.UIValueHolder.processComponent(UIValueHolder.java:258)
              at org.nuxeo.ecm.platform.ui.web.component.holder.UIValueHolder.processFacetsAndChildren(UIValueHolder.java:237)
              at org.nuxeo.ecm.platform.ui.web.component.holder.UIValueHolder.processFacetsAndChildrenWithVariable(UIValueHolder.java:245)
              at org.nuxeo.ecm.platform.ui.web.component.holder.UIValueHolder.processValidators(UIValueHolder.java:184)
              at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1258)
              at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1258)
              at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1258)
              at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1195)
              at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
              at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.nuxeo.elasticsearch.web.sync.UIThreadMarker.doFilter(UIThreadMarker.java:46)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoThreadTrackerFilter.doFilter(NuxeoThreadTrackerFilter.java:28)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.nuxeo.ecm.core.management.jtajca.internal.Log4jWebFilter.doFilter(Log4jWebFilter.java:67)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.nuxeo.ecm.platform.ui.web.rest.FancyURLFilter.doFilter(FancyURLFilter.java:118)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoRequestControllerFilter.doFilter(NuxeoRequestControllerFilter.java:140)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.nuxeo.ecm.webdav.service.WIRequestFilter.doFilter(WIRequestFilter.java:59)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilterInternal(NuxeoAuthenticationFilter.java:584)
              at org.nuxeo.ecm.platform.ui.web.auth.service.NuxeoAuthFilterChain.doFilter(NuxeoAuthFilterChain.java:36)
              at org.nuxeo.ecm.platform.ui.web.auth.oauth.NuxeoOAuthFilter.doFilter(NuxeoOAuthFilter.java:120)
              at org.nuxeo.ecm.platform.ui.web.auth.service.NuxeoAuthFilterChain.doFilter(NuxeoAuthFilterChain.java:34)
              at org.nuxeo.ecm.platform.ui.web.auth.oauth2.NuxeoOAuth2Filter.doFilter(NuxeoOAuth2Filter.java:68)
              at org.nuxeo.ecm.platform.ui.web.auth.service.NuxeoAuthFilterChain.doFilter(NuxeoAuthFilterChain.java:34)
              at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilter(NuxeoAuthenticationFilter.java:397)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoCorsFilter.doFilter(NuxeoCorsFilter.java:49)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.nuxeo.ecm.platform.web.common.exceptionhandling.NuxeoExceptionFilter.doFilter(NuxeoExceptionFilter.java:75)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.nuxeo.ecm.platform.web.common.encoding.NuxeoEncodingFilter.doFilter(NuxeoEncodingFilter.java:73)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
              at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
              at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
              at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: javax.el.PropertyNotWritableException: Illegal Syntax for Set Operation
              at org.jboss.el.parser.AstMethodSuffix.setValue(AstMethodSuffix.java:75)
              at org.jboss.el.parser.AstValue.setValue(AstValue.java:84)
              at org.jboss.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:249)
              at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:131)
              ... 101 more
      
      Jan 07, 2016 4:26:36 PM com.sun.faces.renderkit.RenderKitUtils renderUnhandledMessages
      INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
      sourceId=document_edit:nxl_layout_test_edit:nxw_list:nxw_sub0_select2_params[severity=(ERROR 2), summary=(/widgets/single_document_suggestion_widget_template.xhtml @109,80 value="#{select2Actions.encodeParameters(widget, widgetProperties)}": Illegal Syntax for Set Operation), detail=(/widgets/single_document_suggestion_widget_template.xhtml @109,80 value="#{select2Actions.encodeParameters(widget, widgetProperties)}": Illegal Syntax for Set Operation)]
      

      To reproduce, take the attached Studio project, create a test document, Edit it, add one item to the list (select a document from the suggestion) then Save. Then edit again – remove the selection from the selection box and Save. Result should look like attached screenshot and error should be generated in log.

        Attachments

        1. Screen Shot 2016-01-07 at 4.36.50 PM.png
          141 kB
          Harlan Brown

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days
                  2d