> What I find unclear, is the way it functions. It extends a wicker
> portlet, but the application is ran from WebApplication instance that
> mounts EditPage, HeaderPage, and doesn't seem to have any direct link
> to the WicketPortlet.

The link is via the filter mapping and page mounting. Case in point:

1) You use a WicketFilter in web.xml as normal, this is the one that knows of 
the Application. However, for the portlet case you need to add 
                <init-param>
                        <param-name>detectPortletContext</param-name>
                        <param-value>true</param-value>
                </init-param>
to the filter definition so that it can detect the portlet API things like 
PortletRequest etc.

2) In portlet.xml you use WicketPortlet, but need at least two things :

2.1) To tell the portlet of the path. This would be the same path that the 
associated filter-mapping in web.xml:
                <init-param>
                        <name>wicketFilterPath</name>
                        <value>/foo</value>
                </init-param>
2.2) Tell it the paths to use for the various modes, at least VIEW; These need 
to be bookmarkable, mounted Pages:
                <init-param>
                        <name>viewPage</name>
                        <value>/foo/view</value>
                </init-param>
in this case the Application needs to have mountBookmarkablePage("/view", 
SomePage.class);

Note that you normally either need one Application per portlet, or few ones 
with multiple Pages mounted for the various portlets.

- Tor Iver

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to