tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Dam" <lars...@gmail.com>
Subject Proper way to use a definition attribute as argument or parameter for an action?
Date Mon, 28 Apr 2008 12:30:20 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message