You can getting away of scriptlet by using <logic:insert> ... with a jsp 1.2 compliant server, or use jstl <c:forEach>.
The examples provided in tiles-documentation should be jsp1.1 compliant, so they use a loop in a scriptlet. But this doesn't really matter, as this scriptlet only occur in a well located jsp. You can think of this jsp as a black box, and don't bother at what there is inside. Your jsp can contain only tag with no scriptlet, and use some layout containing the scriptlet.
Cedric
Hookom, Jacob John wrote:
Why can't the tag or the tiles controller do something along the lines of instanceof, if the property is a list-type, then process each member of the list to the page? I thought everyone was getting away from scriptlets....
-Jacob
-----Original Message----- From: Cedric Dumoulin [mailto:[EMAIL PROTECTED] Sent: Mon 3/31/2003 3:50 AM To: Struts Users Mailing List Cc: Subject: Re: [Tiles] putList() Displaying
Hi,
The tiles:insert tag don't check if the attribute is a list because
element of the list can be of several kind (def name, URL, Item, custom
bean, ...). Doing an insert on a attribute of type list doesn't means
that you want to insert each element of the list. Maybe you simply want
to display the element.
Take for example the menu layout. It requires as input a list of
"Item". One can customized the "Item": how the insert tag can take into
account such customization ?
In the current proposal, the insert tag just pass the list as is, and
let the programmer play with the list according to what have been pushed
in the list.
Cedric
Jacob Hookom wrote:
>I was wondering if I missed something in the documentation pertaining to
>displaying lists of includes without using scriptlets.
>
>The tiles example war uses putLists to describe menus, but then uses a
>scriptlet with an Iterator to actually display them. Why doesn't the
>tiles:insert tag know if it's a list and iterate over the results to display
>them-- again, I may have completely missed it in the documentation?
>
>Best Regards,
>Jacob Hookom
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
------------------------------------------------------------------------
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

