If the action invocation as described in the previous post is used, then an interesting possibility to do components arise. Basically, if one wants to do HMVC type pages (where a page consists of many smaller "portlets") then it's useful to have a "card layout" of sorts, which can switch what to do and display depending on some parameter. In WW we had a CardPane action which handled this. Here we can do something similar, but a little more interesting with the following config XML:
<action name="mycomponent" class="Component">
<interceptors-ref name="default"/>
<result name="success" view="mycomponent.component"/>
<result name="pane1" view="pane1.jsp"/>
<result name="pane2" view="pane2.jsp"/>
<result name="pane3" view="pane3.jsp"/>
</action>

So if you include "mycomponent.component" in a JSP page the filter will be triggered and the Component action is executed. Now, of course there's no such view, but execute() will never return SUCCESS anyway, so that doesn't matter. Instead it will return pane1/2/3 depending on some parameter ("mycomponent=pane1" for example).

Could work.

/Rickard

--
Rickard Öberg
[EMAIL PROTECTED]
Senselogic

Got blog? I do. http://dreambean.com



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to