Re: [Actionframework-users] Variable show-template
Status: Inactive
Brought to you by:
ptoman
|
From: Petr T. <Pet...@pi...> - 2003-01-09 09:21:27
|
> At <on-return> element I can't show a 'variable template' with attribute
> 'show-template'. I want to use many(or lots of) different templates
> depending input parameters.
>
> Something like this wrong code:
>
> '''''''''''''''''
> <action name="/view/$section/$name" method="dummy(String section,
> String name)">
> <on-return value="OK" show-template="$section/$name/poll.vm">
> <output-variable name="seccion" value ="$section" />
> <output-variable name="nombre" value ="$name" />
> </on-return>
> </action>
> '''''''''''''''''
>
> It is something similar to 'show-url' attribute which can be variable.
>
> Any idea to solve this question?
I'm considering to reschedule evaluation of show-template for 0.94beta2.
Currently, you have to use show-value-of attribute - for example:
<on-return value="OK" show-value-of="tmpl">
<output-variable name="seccion" value ="$section" />
<output-variable name="nombre" value ="$name" />
<output-variable name="name" value ="$section/$name/poll.vm" />
<output-variable name="tmpl"
value ="$as.getTemplate($name)" />
</on-return>
where $as is a reference to ActionServlet (or its subclass), which
you can put to Context in overriden ActionServlet.handle() method.
Hope it helps.
-Petr
[ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ]
|