tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashish Mishra" <amis...@webifyservices.com>
Subject Re: Converting Code from Struts to Tapestry...
Date Wed, 20 Aug 2003 12:52:53 GMT
Hi all,

I want to display odd values in one column and even values in other column.

$portlets contain the List containing the String object i.e. directly the
data.

Regards

Ashish
----- Original Message -----
From: "Mindbridge" <mindbridgeweb@yahoo.com>
To: "Tapestry users" <tapestry-user@jakarta.apache.org>; "Ashish Mishra"
<amishra@webifyservices.com>
Sent: Wednesday, August 20, 2003 5:24 PM
Subject: Re: Converting Code from Struts to Tapestry...


> Hi,
>
> What you sent is roughly equivalent to:
>
> <span jwcid="foreach@Foreach" source="ognl:portletlist">
>     <tr>
>         <td><span jwcid="@Insert"
> value="ognl:components.foreach.value"/></td>
>     </tr>
> </span>
>
> You would need to have getPortletlist() in your Java bean.
>
> The index can be accessed by doing 'components.foreach.index' or by making
a
> property in Java bean and binding Foreach's index parameter to that
property
> (<span jwcid="foreach@Foreach" source="ognl:portletlist"
> index="ognl:index">).
>
>
> What exactly do you want to achieve? Position the items in the list in two
> columns? And what are the portlets? Strings, other objects, HTML, other
> stuff?
>
> Best regards,
> -mb
>
>
>
> ----- Original Message -----
> From: "Ashish Mishra" <amishra@webifyservices.com>
> To: "Tapestry users" <tapestry-user@jakarta.apache.org>
> Sent: Wednesday, August 20, 2003 11:39 AM
> Subject: Converting Code from Struts to Tapestry...
>
>
> Hi all,
>
> I have the following code in struts-velocity
>
> #set($x=0)
>
> #foreach($portlet in $portletlist)
>
> <tr>
>
> #if($x%2==0)
>
> <td>$portlet</td>
>
> #else
>
> <td>$portlet</td>
>
> #end
>
> </tr>
>
> #set($x=$x+1)
>
> #end
>
>
>
> I need to convert it into Tapestry.Can anyone provide me with the code
> related to getting the index value and using it to my requirements.
>
>
>
> Regards
>
> Ashish
>
>
>


Mime
View raw message