ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacques Le Roux (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-9200) Form widget: the image element used in the field element does not work when used with an existing field value
Date Sat, 04 Feb 2017 19:14:51 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-9200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15852900#comment-15852900
] 

Jacques Le Roux commented on OFBIZ-9200:
----------------------------------------

Another workaround is to create classes to use the images and use these classes in fields
widget-style attribute with a display using a description with only a space. But this is quite
circonvoluted when image is there!

> Form widget: the image element used in the field element does not work when used with
an existing field value
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-9200
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9200
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 13.07, Release Branch 14.12, Trunk, Release Branch
15.12, Release Branch 16.11
>            Reporter: Jacques Le Roux
>
> When you use the image element with a field name of an existing field value a fake chained
request is weirdly called. This is true in both simple and list/grid forms, I did not test
multi but I guess it's the same.
> For example if you add this line
> bq.        <field name="exampleName"><image value="/images/defaultImage.jpg"/></field>
> just after the line
> bq.        <field name="exampleName" title="${uiLabelMap.CommonName}" sort-field="true"><display/></field>
> in the ListExamples form you get as much as errors as there are examples, eg:
> {code}
> 2017-02-04 06:03:27,605 |http-nio-8443-exec-7 |ControlServlet                |E| Error
in request handler:
> org.apache.ofbiz.webapp.control.RequestHandlerException: Unknown request [Example 1];
this request does not exist or cannot be called directly.
>         at org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:197)
~[ofbiz.jar:?]
>     at org.apache.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:210)
[ofbiz.jar:?]
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) [javax.servlet-api-3.1.0.jar:3.1.0]
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0]
>     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
[tomcat-catalina-8.0.39.jar:8.0.39]
>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[tomcat-catalina-8.0.39.jar:8.0.39]
>        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.0.39.jar:8.0.39]
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[tomcat-catalina-8.0.39.jar:8.0.39]
>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[tomcat-catalina-8.0.39.jar:8.0.39]
>        at org.apache.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:209)
[ofbiz.jar:?]
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[tomcat-catalina-8.0.39.jar:8.0.39]
>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[tomcat-catalina-8.0.39.jar:8.0.39]
>        at org.apache.ofbiz.webapp.control.ControlFilter.doFilter(ControlFilter.java:156)
[ofbiz.jar:?]
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[tomcat-catalina-8.0.39.jar:8.0.39]
>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[tomcat-catalina-8.0.39.jar:8.0.39]
>        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
[tomcat-catalina-8.0.39.jar:8.0.39]
>      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
[tomcat-catalina-8.0.39.jar:8.0.39]
>      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
[tomcat-catalina-8.0.39.jar:8.0.39]
>   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [tomcat-catalina-8.0.39.jar:8.0.39]
>    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-catalina-8.0.39.jar:8.0.39]
>     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
[tomcat-catalina-8.0.39.jar:8.0.39]
>         at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
[tomcat-catalina-8.0.39.jar:8.0.39]
>        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509)
[tomcat-catalina-8.0.39.jar:8.0.39]
>      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104)
[tomcat-coyote-8.0.39.jar:8.0.39]
>        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
[tomcat-coyote-8.0.39.jar:8.0.39]
>    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
[tomcat-coyote-8.0.39.jar:8.0.39]
>        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
[tomcat-coyote-8.0.39.jar:8.0.39]
>  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_112]
>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[?:1.8.0_112]
>        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[tomcat-util-8.0.39.jar:8.0.39]
> {code}
> As you can see from the stack trace it's a tricky bug
> A workaround is to use a non existing value as field name when you can, for instance
combined with an use-when. But of course this is not satisfactory and you also can't use entry-name
to bypass the issue.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message