[ https://issues.apache.org/jira/browse/OFBIZ-4932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13406243#comment-13406243 ]
Daniel Riquelme commented on OFBIZ-4932: ---------------------------------------- Yes, you may test it by modifying the file: applications/accounting/widget/InvoiceForms.xml line: 368 (EditInvoiceItems) add the following use when condition to field quantity: use-when="quantity!=null @and quantity.compareTo(java.math.BigDecimal.ONE)==0" Go to https://localhost:8443/accounting/control/listInvoiceItems?invoiceId=demo10001&invoiceItemSeqId=00002 You will get an "...Error evaluating BeanShell use-when condition ..." Apply the patch You will get expected behavior. > Not getting right behavior of use-when when using in multi > ---------------------------------------------------------- > > Key: OFBIZ-4932 > URL: https://issues.apache.org/jira/browse/OFBIZ-4932 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Daniel Riquelme > Assignee: Jacques Le Roux > Priority: Minor > Attachments: OFBIZ-4932_MultiLListUseWhen.patch > > > The problem is that on multi forms the bshInterpreter gets pushed to higher > levels on the context stack when iterating the form rows. > What is intended in the code is to reset the bshInterpreter > (this.resetBshInterpreter(context);) for each row iteration, this reset > translates into a key object being removed from context, this context is > stored in a stack data structure. The removal assumes the value will always > be at level 0, yet what happens is that the value resides at a higher level. > The fix is to perform the removal prior to context modification, this way the > bshInterpereter object would be at level 0 upon removal. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira