You can use OGNL in the result like this:

 <action name="test" class="com.acme.TestAction">
   <result name="success" type="freemarker">${template}</result>
</action>

then you can have a getTemplate() method in your action that returns
the right template.

musachy

On Thu, Jun 5, 2008 at 10:18 AM, Kibo <[EMAIL PROTECTED]> wrote:
>
>  Hi Conference
>
> I  use Struts 2 and freemarker:
>
>  <action name="test" class="com.acme.TestAction">
>    <result name="success" type="freemarker">success.ftl</result>
> </action>
>
> but
> I need load freemarker template dynamically. For example:
> In page is selectBox (<select>) with items:
> - template1
> - tempalte 2
> - template 3
> When user click in item template1, I want to return him view, which use
> template1.
> When user click in item tempate2, I want to return him view, which use
> tempate2.
> etc.
>
> I need help how to do. I need not exactly code way, only help how can i do
> it.
>
> Thank for help very much.
>
>
> -----
> Tomas Jurman
> Czech Republic
> --
> View this message in context: 
> http://www.nabble.com/dynamically-view-templates-tp17670937p17670937.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to