Wicket 1.5.x Portlet functionality

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Wicket 1.5.x Portlet functionality

Elger van Boxtel-2
We have an existing Wicket application which we would also like to address as a Portlet. Documentation on this topic is sparse, and experience of others is barely available

After Wicket dropped support of Portlets in 1.4.x, the Portlet functionality has been transferred to WicketStuff. I use the PortletFilter, but I doesn't detect a Portlet request.

Does anybody has any experience with how to use Wicket 1.5.x icw Portlet functionality? Can you supply directions on how to use the wicketstuff Portlet.

We are currently using Wicket 1.5.7 and the Liferay portal. Portlet jars can be found at http://repo1.maven.org/maven2/org/wicketstuff/wicketstuff-portlet/1.5.7/.

Thanks.

Elger van Boxtel
Software Engineer, Development
______________________________

Planon B.V.
Wijchenseweg 8
6537 TL Nijmegen
P.O. Box 38074
6503 AB Nijmegen
The Netherlands
T:  +31 (0) 24 648 7662
F:  +31 (0) 24 642 2942
E: [hidden email]<mailto:[hidden email]>
W: www.planon-fm.com<http://www.planon-fm.com>

Deze email en alle bijlagen zijn slechts voor gebruik door de beoogde ontvanger. De email kan intellectueel eigendom en/of vertrouwelijke informatie bevatten. Het mag niet worden gekopieerd, openbaar gemaakt, bewaard of gebruikt worden door anderen dan waarvoor deze bestemd is. Bent u niet de beoogde ontvanger,verwijdert u dan deze email met alle bijlagen en kopieën onmiddellijk en informeer de afzender.

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.

Reply | Threaded
Open this post in threaded view
|

Re: Wicket 1.5.x Portlet functionality

Martin Grigorov-4
Hi,

Peter Pastrnak - the reporter of
https://issues.apache.org/jira/browse/WICKET-4019 and maintainer of
WicketStuff can give you some help.
Ping him to join this discussion, so other users can also benefit from it.

On Fri, Aug 3, 2012 at 9:45 AM, Elger van Boxtel
<[hidden email]> wrote:

> We have an existing Wicket application which we would also like to address as a Portlet. Documentation on this topic is sparse, and experience of others is barely available
>
> After Wicket dropped support of Portlets in 1.4.x, the Portlet functionality has been transferred to WicketStuff. I use the PortletFilter, but I doesn't detect a Portlet request.
>
> Does anybody has any experience with how to use Wicket 1.5.x icw Portlet functionality? Can you supply directions on how to use the wicketstuff Portlet.
>
> We are currently using Wicket 1.5.7 and the Liferay portal. Portlet jars can be found at http://repo1.maven.org/maven2/org/wicketstuff/wicketstuff-portlet/1.5.7/.
>
> Thanks.
>
> Elger van Boxtel
> Software Engineer, Development
> ______________________________
>
> Planon B.V.
> Wijchenseweg 8
> 6537 TL Nijmegen
> P.O. Box 38074
> 6503 AB Nijmegen
> The Netherlands
> T:  +31 (0) 24 648 7662
> F:  +31 (0) 24 642 2942
> E: [hidden email]<mailto:[hidden email]>
> W: www.planon-fm.com<http://www.planon-fm.com>
>
> Deze email en alle bijlagen zijn slechts voor gebruik door de beoogde ontvanger. De email kan intellectueel eigendom en/of vertrouwelijke informatie bevatten. Het mag niet worden gekopieerd, openbaar gemaakt, bewaard of gebruikt worden door anderen dan waarvoor deze bestemd is. Bent u niet de beoogde ontvanger,verwijdert u dan deze email met alle bijlagen en kopieën onmiddellijk en informeer de afzender.
>
> This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.
>



--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
Reply | Threaded
Open this post in threaded view
|

Re: Wicket 1.5.x Portlet functionality

pasto
In reply to this post by Elger van Boxtel-2
Hi,

wicket portlet support released under wicket stuff 1.5.7 (or any earlier version) is probably broken, as I have submitted the changes to github too late. It is better to use wicket-portlet-1.5.7.2.zip from jira 4019 (https://issues.apache.org/jira/browse/WICKET-4019), that was tested with liferay 6.0.5 and wicket 1.5.7, but you can try it with other versions too.

I dont have any functional example for you, but (from the top of my head) these are basic settings you need:

in  portlet.xml:

        <portlet>
                <portlet-name>PortalPrototype</portlet-name>
                <display-name>Portal - prototype</display-name>
                <portlet-class>org.apache.wicket.portlet.WicketPortlet</portlet-class>
                <init-param>
                        <name>wicketFilterPath</name>
                        <value>/PortalPrototype</value>
                </init-param>
                <supports>
                        <mime-type>text/html</mime-type>
                        <portlet-mode>VIEW</portlet-mode>
                </supports>
                <portlet-info>
                        <title>Portal - prototype</title>
                        <short-title>PortalPrototype</short-title>
                        <keywords>Portal prototype</keywords>
                </portlet-info>
        </portlet>

in web.xml:

        <filter>
                <filter-name>PortalPrototypeFilter</filter-name>
                <filter-class>org.apache.wicket.portlet.PortletFilter</filter-class>
                <init-param>
                        <param-name>applicationClassName</param-name>
                        <param-value>sk.portal.prototyp.PortalPrototypeApplication</param-value>
                </init-param>
                <init-param>
                        <param-name>filterMappingUrlPattern</param-name>
                        <param-value>/PortalPrototype/*</param-value>
                </init-param>
        </filter>
        <filter-mapping>
                <filter-name>PortalPrototypeFilter</filter-name>
                <url-pattern>/PortalPrototype/*</url-pattern>
                <dispatcher>REQUEST</dispatcher>
                <dispatcher>INCLUDE</dispatcher>
                <dispatcher>FORWARD</dispatcher>
        </filter-mapping>

or just take some example based on wicket 1.4, change the libraries and try to run it. If you fail, just send me your portlet and I'll try to fix it. Best would be an example, that could be added to the wicketstuff project for others.

Peter.