You can set the value of argument either using EL in the value=""
attribute, or using JSP in the body of the putAttribute tag.
Example:
<tiles:insertTemplate template="/someminorjsppage.jsp">
<tiles:putAttribute name="title" value="some.title.i18n.key"/>
<tiles:putAttribute name="argument" value="${myArgument}"/>
</tiles:insertTemplate>
<tiles:insertTemplate template="/someminorjsppage.jsp">
<tiles:putAttribute name="title" value="some.title.i18n.key"/>
<tiles:putAttribute name="argument"><s:property
value="%{ognlValue}"/></tiles:putAttribute>
</tiles:insertTemplate>
(*Chris*)
On Mon, Apr 28, 2008 at 5:30 AM, Lars Dam <[EMAIL PROTECTED]> wrote:
> I am trying to make some kind of jsp 'component' page that can be reused
> multiple times with different datasets on a single jsp page. When defining
> the templates i use i can give some arguments that i can access on the
> template page, but how can i use these arguments on the action?
>
> If i have a jsp page that contains two templates like:
> :
> <tiles:insertTemplate template="/someminorjsppage.jsp">
> <tiles:putAttribute name="title" value="some.title.i18n.key"/>
> <tiles:putAttribute name="argument" value="someargument"/>
> </tiles:insertTemplate>
> :
> <tiles:insertTemplate template="/someminorjsppage.jsp">
> <tiles:putAttribute name="title" value="some.title.i18n.key"/>
> <tiles:putAttribute name="argument" value="anotherargument"/>
> </tiles:insertTemplate>
> :
>
> What would be the proper way to send the value of "argument" to the action,
> so the action could use this to find data for the jsp page?
>
> Would it be possible to have some kind of callback to the action that gets
> the 'argument' attribute as parameter?
>
> Or am i on some completely wrong track of how to do this?
>
> kr. Lars Dam
>