ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Howe <cjhowe76...@yahoo.com>
Subject Re: Forms question
Date Wed, 11 Oct 2006 13:08:27 GMT
there's a "use-when" attribute for fields.  There are
plenty of examples throughout the code.  otherwise you
can do a <row-action element to set variables so that
both cases can be written the same way.

--- Amit Shinde <amit@amicontech.com> wrote:

> Hello,
> 	I am using a form to display a list of items in a
> data grid. All items
> under "Name" column in the grid are supposed to be a
> hyperlink. We need
> different hyperlinks for each row depending on the
> type. Is there an if-else
> ability in forms?
> 
> 	Currently it is this way -
> 
> 	<form type="list" name="products"
> list-name="productList"
> default-title-style="tableheadtext"
> default-tooltip-style="tabletext"
> 		default-widget-style="table"
> paginate-target="ListProducts">
> 
> 		<field name="productName" title="Name"
>
header-link="ListProducts?orderByField=productName&amp;productTypeId=OTHERS"
> >
> 			<hyperlink  description="${productName}"
> target="EditProduct?productId=${productId}"/>
> 		</field>
> 
> 	</form>
> 
> 
> 	Can we have something like this -
> 
> 	<form type="list" name="products"
> list-name="productList"
> default-title-style="tableheadtext"
> default-tooltip-style="tabletext"
> 		default-widget-style="table"
> paginate-target="ListProducts">
> 
> 		<field name="productName" title="Name"
>
header-link="ListProducts?orderByField=productName&amp;productTypeId=OTHERS"
> >
> 			<if some condition>
> 				<hyperlink  description="${productName}"
> target="EditProduct?productId=${productId}"/>
> 			<else>
> 				<hyperlink  description="${productName}"
> target="EditPrototype?productId=${productId}"/>
> 			</else>
> 			</if>
> 		</field>
> 
> 	</form>
> 
> 	Any pointers will be appreciated.
> 
> 
> Thanks,
> Amit Shinde
> 
> 
> 


Mime
View raw message