-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 6.0, 7.10, 8.10
-
Component/s: Layouts & Widgets
-
Backlog priority:800
-
Sprint:nxfit 9.2.2
-
Story Points:5
- use a select2widget in a layout
- in the creation layout, configure the widget like in widget1.png, widget2.png, widget3.png, widget4.png
- import the same configuration into view and edit layouts
- synchronized the project
- create 2 documents so that the myVals is filled in with 1 value containing a single quote
- create a 3rd document and fill in the multivalued attribute with the previously entered myVals values (not containing the single quote).
- save the document
- observe the document is correctly created and the value displayed is the one specified in the widget configuration field named "Id Property" (myVals)
- edit the same document and choose the value containing the single quote.
- observe the value is selected without any issue
- attempt to save the document
- the following stack is displayed:
Failed to execute query: select * from Document where testdocument:myVals='apostruc'phe', Syntax error: Invalid token <phe> at offset 60 javax.servlet.ServletException: Failed to execute query: select * from Document where testdocument:myVals='apostruc'phe', Syntax error: Invalid token <phe> at offset 60 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659) 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)
Please note using a page provider is not a solution since there is no way to reference it in the studio view layout, so it ends up with the same issue.