Ravi, 
Check this 
use-when="statusId.equals("MARK")" 
I think this will resolve your problem . 

The problem seems to me in your statement (use-when="${statusId!='MARK'}") is 
first it resolves statusId=='MARK' to true/false and then ${true/false} tries 
to get the value of true/false from context. 
Let me know what happened after this. 

Thanks and Regards 
-- 
Chirag Manocha 
Emforium Software Pvt. Ltd. | ALL-IN Software 
+91-98735-47457 | +91-98263-19099 
Please don't print this Email unless you really need to - this will preserve 
trees on planet earth. 




From: "Ravindra Mandre" <raviof...@gmail.com> 
To: "user" <user@ofbiz.apache.org> 
Sent: Tuesday, December 28, 2010 7:11:56 PM 
Subject: Not getting right behavior of use-when when using in multi (form type) 
form 

Hi , 
I am facing problem while using the use-when tag inside the multi form, 
I have to following form 

<form name="CommonForm" type="multi" list-name="displayList" 
use-row-submit="true" 
separate-columns="true" target="updateSomething" 
odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> 

<field name="customTimePeriodId"><display/></field> 
<field name="statusId"><display/></field> 
<field name="attrValue" use-when="${statusId!='MARK'}"><text 
size="5"/></field> 
<field name="attrValue" 
use-when="${statusId=='MARK'}"><display/></field> 
<field name="field3" ><display/></field> 
<field name="field4" ><display/></field> 
<field name="updateButton" title="Submit"><submit 
button-type="button"/></field> 
<field name="_rowSubmit" 
title="${uiLabelMap.CommonRowSubmit}"><hidden value="Y"/></field> 
</form> 

as expected it should display or text , field depending upon the passed 
condition but 
when i am using the use-when tag then the attrValue's display row gets 
shifted toward the right-side of the form and inserts two extra <td> , which 
makes forms look very ugly, I am struggling with this from a long time, or 
some can suggest of other way of using the "use-when " tag, 
the purpose of doing this is i want to use same form for display and update. 



Regards 
Ravindra Mandre 

Reply via email to