You must put actions before al-target (if you use an XML content aware editor you should see that). You can use use-when in an
alt-target.
Unfortunatley due to some inconsistence still in OFBiz, when you use use-when you actually use underneath a BSH syntax and not a
Groovy syntax. So inside the use-when expression you need to use & ' > < " instead of & " > < '.
You should find enough examples OOTB.
Adrian suggested to use an UEL functions, I never tried that
Jacques
From: "Shereen" <sheri_ash...@hotmail.com>
It seem I don't have enough infoirmation about use-when attribute. does
anyone have?
everything goes right when I use it to check if something is null or not but
when I do further checking it deosn't go right
the use-when is widely used in ofbiz to check if something is null or not or
the map in the conext is null or not
but what I want to do now is to check if the productStatus equals certain
value or not and the checking always gives me negative answer
something strange happens as well
<form name="EditProduct" type="single" target="updateProduct" title=""
default-map-name="product"
header-row-style="header-row" default-table-style="basic-table">
<actions>
<set field="productStatus"
from-field="product.productStatusId"></set>
</actions>
when I go to print the productStatus it doesn't print the status it's not
null but prints nothing on the screen I put the actions before alt-target
because I'll need it to decide which target shall i go to.
Am I putting the actions in a wrong place?
does anyone have any suggestion to use different submit buttons and
different targets based on product status?
--
View this message in context:
http://ofbiz.135035.n4.nabble.com/comparing-two-dates-using-use-when-tp3033336p3077804.html
Sent from the OFBiz - User mailing list archive at Nabble.com.