Hi All Please all I need help on using the use-when attribute I've made a product status field in the form and I want to check for that field this field s string and I can't use use- when with strings what I have done is this: <actions> <set field="productStatus" value="product.ProductStatusId"/> </actions> This was to store the status of the product
this is to change target when the status equals "Periodic Mass Load" <alt-target use-when="${productStatus.equals('Periodic Mass Load')}" target="updateProductChangeStatusPeriodicMassReady"/> this is a submit button I want to use also if the status matches this value "Periodic Mass Load" <field name="submitButton" title="Periodic Mass Ready" use-when="${productStatus.equals('Periodic Mass Load')}" widget-style="smallSubmit"><submit button-type="button"/></field> anyone can help or give me a link to read? I duno how to check strings. I tried to remove spaces but the problem remains te same. Instead of single quotes I put double quote and the same problem remains here's the exception at java.lang.Thread.run(Thread.java:619) 2010-12-05 16:38:17,127 (http-0.0.0.0-8443-2) [FlexibleStringExpander.java:692:ERROR] Error evaluating expression ${productStatus.equals('Periodic Mass Load')}: javax.el.ELException: Error parsing '${productStatus.equals('Periodic Mass Load')}': syntax error at position 22, encountered '(', expected '}' 2010-12-05 16:38:17,157 (http-0.0.0.0-8443-2) [StandardWrapperValve.java:274:ERROR] Servlet.service() for servlet ControlServlet threw exception bsh.TokenMgrError: Lexical error at line 1, column 26. Encountered: "e" (101), after : "\'P" at bsh.ParserTokenManager.getNextToken(Unknown Source) at bsh.Parser.jj_scan_token(Unknown Source) at bsh.Parser.jj_3R_138(Unknown Source) at bsh.Parser.jj_3R_129(Unknown Source) at bsh.Parser.jj_3R_98(Unknown Source) at bsh.Parser.jj_3R_57(Unknown Source) at bsh.Parser.jj_3R_33(Unknown Source) at bsh.Parser.jj_3R_107(Unknown Source) at bsh.Parser.jj_3R_70(Unknown Source) at bsh.Parser.jj_3R_39(Unknown Source) at bsh.Parser.jj_3R_134(Unknown Source) at bsh.Parser.jj_3R_106(Unknown Source) at bsh.Parser.jj_3R_69(Unknown Source) at bsh.Parser.jj_3R_37(Unknown Source) at bsh.Parser.jj_3R_101(Unknown Source) at bsh.Parser.jj_3R_57(Unknown Source) at bsh.Parser.jj_3R_33(Unknown Source) at bsh.Parser.jj_3R_107(Unknown Source) at bsh.Parser.jj_3R_70(Unknown Source) at bsh.Parser.jj_3R_39(Unknown Source) at bsh.Parser.jj_3R_133(Unknown Source) at bsh.Parser.jj_3R_104(Unknown Source) at bsh.Parser.jj_3R_58(Unknown Source) at bsh.Parser.jj_3R_33(Unknown Source) at bsh.Parser.jj_3_8(Unknown Source) at bsh.Parser.jj_2_8(Unknown Source) at bsh.Parser.Expression(Unknown Source) at bsh.Parser.StatementExpression(Unknown Source) at bsh.Parser.Statement(Unknown Source) at bsh.Parser.BlockStatement(Unknown Source) at bsh.Parser.Line(Unknown Source) at bsh.Interpreter.parseScript(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at org.ofbiz.widget.form.ModelForm.getTarget(ModelForm.java:1967) at org.ofbiz.widget.form.MacroFormRenderer.renderFormOpen(MacroFormRenderer.java:1237) at org.ofbiz.widget.form.ModelForm.renderSingleFormString(ModelForm.java:879) at org.ofbiz.widget.form.ModelForm.renderFormString(ModelForm.java:837) at org.ofbiz.widget.screen.ModelScreenWidget$Form.renderWidgetString(ModelScreenWidget.java:840) -- View this message in context: http://ofbiz.135035.n4.nabble.com/comparing-two-dates-using-use-when-tp3033336p3073306.html Sent from the OFBiz - User mailing list archive at Nabble.com.