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 <[EMAIL PROTECTED]> 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
> 
> 
> 

Reply via email to