You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Thijs Vonk <vo...@gmail.com> on 2008/05/12 15:46:44 UTC
Portlet 2.0 implementation in Wicket
I've started on implementing the portlet 2.0 specifications. I've opened
https://issues.apache.org/jira/browse/WICKET-1620 to apply patches to
when I get something useful.
But I have some questions before I can go any further.
First of all, do we drop portlet 1.0 in favor of portlet 2.0? I suppose
we do because we need java 5 to support 2.0 but portlet 1.0 doesn't
support java 5.
If I understand correctly I can drop de ResourceUrlFactory because this
is provided by the portal. I should then also be able to drop the wicket
WicketPortlet.PORTLET_RESOURCE_URL_PARAMETER and
PORTLET_RESOURCE_URL_ATTR. Because the lifecycle of the request tells if
the request is a resource request or not.
What I'm not sure about is the ServletContextProvider. (from apache
portal bridges) I can't really determine if I can drop this as well. For
now I've left it in and it seems to work (on Liferay) but I could be
doing some hybrid crossover now :)
And now I'm a bit stuck :) Liferay seems to have a problem with adding
http headers in a portlet response. Preventing some ajax stuff from
working. It looks like the PortletResponse.addProperty(etc) is not
implemented. So I've setup glassfisch with openportal-container 2.0 rc2,
but that's not helping either I haven't been able to get Wicket running
properly yet. The portlet bridge i've written seems to work, but when I
click a link in the portletm, wicketfilterportletcontext.setupfilter()
isn't able to find any of the set values in the request (not the
RESPONSE_STATE_ATTR nor the REQUEST_TYPE_ATTR)
Ate, how is Jetspeed doing with portlet 2.0? If I download trunk, will
Wicket work and what is the status of jsr-286?
Thijs
Re: Portlet 2.0 implementation in Wicket
Posted by Thijs Vonk <vo...@gmail.com>.
Ate Douma wrote:
> Thijs Vonk wrote:
>> I've started on implementing the portlet 2.0 specifications. I've
>> opened https://issues.apache.org/jira/browse/WICKET-1620 to apply
>> patches to when I get something useful.
>> But I have some questions before I can go any further.
>>
>> First of all, do we drop portlet 1.0 in favor of portlet 2.0? I
>> suppose we do because we need java 5 to support 2.0 but portlet 1.0
>> doesn't support java 5.
> Portlet 1.0 doesn't require Java 5, that's not the same.
> I don't want to drop support for portlet 1.0 yet, certainly not until
> Jetspeed 2 provides portlet 2.0 support :)
>
> My proposal is adding a new WicketPortlet2 class (or something, I
> don't like the name but haven't come up with something better yet).
> This class should set a clear marker (like a new request or portlet
> context attribute or something) to indicate to the other supportive
> classes within Wicket which environment the current request is dealing
> with, and use the native Portlet API 2.0 methods if in context of the
> current request.
Yeah ok, I'm not sure if we'll introduce a lot of if-statements/casting
if we do it this way.
I was thinking that, because Wicket 1.3 is quite stable, people could
use Wicket 1.3 if they use a portlet 1.0 only portal. And because Wicket
1.5 won't be out for a while, portlet 2.0 might finally be released and
maybe Jetspeed/other portals could be heading in that direction as well.
(I have no insight in the JS-2 time frame)
However, I'll look into the WicketPortlet2 option as well.
>>
>> What I'm not sure about is the ServletContextProvider. (from apache
>> portal bridges) I can't really determine if I can drop this as well.
>> For now I've left it in and it seems to work (on Liferay) but I could
>> be doing some hybrid crossover now :)
> That one isn't needed anymore either for portlet 2.0. The
> PortletRequestDispatcher now supports all request types.
Ok, I'll need to look at those chapters again :)
> It would be great if you could attach a patch file of your changes to
> the new JIRA issue for example.
I'd rather not :) The work I've done isn't really publish worthy, as it
is more of a search for me to try and find my way around all the changes
and inner works of both the portlet specs and how they are implemented
in Wicket. (Writing a portlet and getting Wicket to behave like a
portlet are quite different things :))
But now that I have some direction I might get something out in the next
couple of weeks (If I can find a portal that'll support my changes :P)
> BTW: I won't be able to do much on this issue this week as I have to
> go to Dublin for a client.
Same here, I've got a deadline on Friday and probably a lot of cleaning
up in the week(s) after so this is not high on the priority list.
>
> Ate
>
>>
>> Thijs
>>
>
Re: Portlet 2.0 implementation in Wicket
Posted by Jonathan Locke <jo...@gmail.com>.
yeah, portlet events is one thing. another is to create an
application / requestcycle / request / response abstraction for
portlets. i think this may be a better and more maintainable
structure.
i think ate is busy for a few days. i'd like to wait to talk to him
before i proceed. it seems like one obvious way to do this would
be to let the existing code support 1.0 and to create a new package
with improvements and abstractions for 2.0. i think people will
not have much desire for 1.0 support in the long term. it has
some pretty serious limitations and i doubt we want to design
for that as a lowest common denominator.
Thijs wrote:
>
> Hi Jonathan,
>> It looks like I may have a significant amount of time to devote in the
>> next
>> couple of weeks to portlet support in Wicket.
>
> That would be great.
>
>> I have read about half of the
>> specification (will finish it soon) and have some ideas for how to
>> improve
>> abstractions already, but could use input in terms of people's wishes
>
> What kinds of wishes are you talking about?
> Things like portlet event handling, etc?
>
>> as
>> well as documentation of the existing implementation (particularly in
>> tricky
>> areas in the code).
>>
>
> Unfortunately I can't really help you with the documentation part, as I
> don't have it. My current knowledge is purely based on the use cases
> I've encountered with our project and where I've been stepping/debugging
> through the code. I hope to get enough knowledge so that I can actually
> document some of it in the code base, but I'm not there yet.
>
> Probably Ate can help you with some documentation/explanation, as he's
> the original designer.
>
> I'm looking forward to hearing your suggestions
>
> Thijs
>>
>> Thijs wrote:
>>
>>> Some more progress
>>>
>>> I think I fixed point 2. (see the jira)
>>> I've raised an issue at Liferay regarding point 1 (after re-reading the
>>> portlet 2.0 specs)
>>> I've also raissed an question on the mailing list of OpenPortal
>>> portlet-container about point 3. Because it turned out that no
>>> properties/headers are being set on the http-response when it is a
>>> resource response. It works for a render response. So probably just a
>>> bug.
>>>
>>> Some extra clarification on point 4: This is some lines of code in
>>> WicketPortlet.processRequest. After you patch wicket it's on line 423.
>>>
>>> The rest is still open.
>>>
>>> Thijs
>>>
>>>
>>> Thijs schreef:
>>>
>>>> Hi Ate,
>>>>
>>>> I've done some work, I've attached an initial patch to the Jira issue.
>>>> It has the following basic modifications.
>>>>
>>>> I've completely removed the servletContextProvider and
>>>> ResourceUrlFactory. I've added a PortletMimeServletResponseWrapper
>>>> that is extended by PortletResourceServletResponseWrapper and
>>>> PortletRenderServletResponseWrapper, and I've implemented
>>>> serveResource. Also some other things, but you'll be able to see that
>>>> in the patch.
>>>>
>>>> The patch is based on the assumption that portlet 2.0 implementation
>>>> will replace the 1.0, but that's just because I started out that way,
>>>> I haven't looked at the 'side by side' option.
>>>>
>>>> There are some things;
>>>> 1. Calling resourceResponse.createRenderUrl: In Liferay this throws an
>>>> IllegalStateException. Because, according to them your not allowed to
>>>> create a renderUrl from a resourceresponse. This is a problem when we
>>>> want to do a setResponsePage(new WebPage()) in a ajax call.
>>>> In openportal, I am allowed to create a renderUrl because they check
>>>> if the CacheLevel is equal to type PAGE (which it is) and so I get a
>>>> RenderURL back. Is the way OpenPortal does it correct? Because then
>>>> I'll open a jira issue for Liferay to handle that properly.
>>>>
>>>> 2. When in a ajax call (ResourceRequest) and we do
>>>> setResponsePage(WebPage.class), and WebPage.class is mounted, the
>>>> current implementation doesn't break out of the ResourceRequest, it
>>>> just creates a new ResourceURL. When this happens, I only get the
>>>> Markup of the portlet back, not the whole portal page.
>>>>
>>>> 3. The add/set property for a resourceresponse in openportal only
>>>> accepts cache-contol and similar headers. So the Ajax-Location header
>>>> does not work on this portal (jet)... So I can't test the ajax
>>>> redirect on it. I'll see if I can open an issue for it...
>>>> Can't we change the Ajax-Location to be inside the xml response? Then
>>>> we never have any trouble with that http header. (Because doesn't it
>>>> say in the portletspec somewhere that a portlet can't depend on the
>>>> headers being set?)
>>>>
>>>> 4. I have some open TODO's in the patch for some small issues, one is
>>>> the request.setCharacterEncoding which is allowed when not in an
>>>> actionrequest or resourcerequest. For now it doesn't do anything. But
>>>> there should be a check in what PHASE we are. (or add extra
>>>> sub-classes for every request, like we have for the response types)
>>>> Then there is the sendRedirect in a non ActionRequest, I've commented
>>>> that bit, but it needs to be fixed.
>>>>
>>>> 5. Do we want to do something with the Portlet.doHeader call? If I
>>>> understand the documentation correctly it should be possible to set
>>>> add markup to the <head> in that call if the portal supports it.
>>>> Liferay & OpenPortal don't at the moment. But if we do then we might
>>>> have to move all the processing logic to the doHeader call, and store
>>>> the rest of the response for the doView/etc calls?!
>>>>
>>>> 6. I have not yet thought about the processEvent.
>>>>
>>>> I hope with this patch you can run Wicket on Pluto also, at least
>>>> parts of it :)
>>>>
>>>> Thijs
>>>>
>>>>
>>>
>>>
>>
>>
>
>
>
--
View this message in context: http://www.nabble.com/Portlet-2.0-implementation-in-Wicket-tp17187909p17327505.html
Sent from the Wicket - Dev mailing list archive at Nabble.com.
Re: Portlet 2.0 implementation in Wicket
Posted by Thijs <vo...@gmail.com>.
Hi Jonathan,
> It looks like I may have a significant amount of time to devote in the next
> couple of weeks to portlet support in Wicket.
That would be great.
> I have read about half of the
> specification (will finish it soon) and have some ideas for how to improve
> abstractions already, but could use input in terms of people's wishes
What kinds of wishes are you talking about?
Things like portlet event handling, etc?
> as
> well as documentation of the existing implementation (particularly in tricky
> areas in the code).
>
Unfortunately I can't really help you with the documentation part, as I
don't have it. My current knowledge is purely based on the use cases
I've encountered with our project and where I've been stepping/debugging
through the code. I hope to get enough knowledge so that I can actually
document some of it in the code base, but I'm not there yet.
Probably Ate can help you with some documentation/explanation, as he's
the original designer.
I'm looking forward to hearing your suggestions
Thijs
>
> Thijs wrote:
>
>> Some more progress
>>
>> I think I fixed point 2. (see the jira)
>> I've raised an issue at Liferay regarding point 1 (after re-reading the
>> portlet 2.0 specs)
>> I've also raissed an question on the mailing list of OpenPortal
>> portlet-container about point 3. Because it turned out that no
>> properties/headers are being set on the http-response when it is a
>> resource response. It works for a render response. So probably just a bug.
>>
>> Some extra clarification on point 4: This is some lines of code in
>> WicketPortlet.processRequest. After you patch wicket it's on line 423.
>>
>> The rest is still open.
>>
>> Thijs
>>
>>
>> Thijs schreef:
>>
>>> Hi Ate,
>>>
>>> I've done some work, I've attached an initial patch to the Jira issue.
>>> It has the following basic modifications.
>>>
>>> I've completely removed the servletContextProvider and
>>> ResourceUrlFactory. I've added a PortletMimeServletResponseWrapper
>>> that is extended by PortletResourceServletResponseWrapper and
>>> PortletRenderServletResponseWrapper, and I've implemented
>>> serveResource. Also some other things, but you'll be able to see that
>>> in the patch.
>>>
>>> The patch is based on the assumption that portlet 2.0 implementation
>>> will replace the 1.0, but that's just because I started out that way,
>>> I haven't looked at the 'side by side' option.
>>>
>>> There are some things;
>>> 1. Calling resourceResponse.createRenderUrl: In Liferay this throws an
>>> IllegalStateException. Because, according to them your not allowed to
>>> create a renderUrl from a resourceresponse. This is a problem when we
>>> want to do a setResponsePage(new WebPage()) in a ajax call.
>>> In openportal, I am allowed to create a renderUrl because they check
>>> if the CacheLevel is equal to type PAGE (which it is) and so I get a
>>> RenderURL back. Is the way OpenPortal does it correct? Because then
>>> I'll open a jira issue for Liferay to handle that properly.
>>>
>>> 2. When in a ajax call (ResourceRequest) and we do
>>> setResponsePage(WebPage.class), and WebPage.class is mounted, the
>>> current implementation doesn't break out of the ResourceRequest, it
>>> just creates a new ResourceURL. When this happens, I only get the
>>> Markup of the portlet back, not the whole portal page.
>>>
>>> 3. The add/set property for a resourceresponse in openportal only
>>> accepts cache-contol and similar headers. So the Ajax-Location header
>>> does not work on this portal (jet)... So I can't test the ajax
>>> redirect on it. I'll see if I can open an issue for it...
>>> Can't we change the Ajax-Location to be inside the xml response? Then
>>> we never have any trouble with that http header. (Because doesn't it
>>> say in the portletspec somewhere that a portlet can't depend on the
>>> headers being set?)
>>>
>>> 4. I have some open TODO's in the patch for some small issues, one is
>>> the request.setCharacterEncoding which is allowed when not in an
>>> actionrequest or resourcerequest. For now it doesn't do anything. But
>>> there should be a check in what PHASE we are. (or add extra
>>> sub-classes for every request, like we have for the response types)
>>> Then there is the sendRedirect in a non ActionRequest, I've commented
>>> that bit, but it needs to be fixed.
>>>
>>> 5. Do we want to do something with the Portlet.doHeader call? If I
>>> understand the documentation correctly it should be possible to set
>>> add markup to the <head> in that call if the portal supports it.
>>> Liferay & OpenPortal don't at the moment. But if we do then we might
>>> have to move all the processing logic to the doHeader call, and store
>>> the rest of the response for the doView/etc calls?!
>>>
>>> 6. I have not yet thought about the processEvent.
>>>
>>> I hope with this patch you can run Wicket on Pluto also, at least
>>> parts of it :)
>>>
>>> Thijs
>>>
>>>
>>
>>
>
>
Re: Portlet 2.0 implementation in Wicket
Posted by Jonathan Locke <jo...@gmail.com>.
It looks like I may have a significant amount of time to devote in the next
couple of weeks to portlet support in Wicket. I have read about half of the
specification (will finish it soon) and have some ideas for how to improve
abstractions already, but could use input in terms of people's wishes as
well as documentation of the existing implementation (particularly in tricky
areas in the code).
Thijs wrote:
>
> Some more progress
>
> I think I fixed point 2. (see the jira)
> I've raised an issue at Liferay regarding point 1 (after re-reading the
> portlet 2.0 specs)
> I've also raissed an question on the mailing list of OpenPortal
> portlet-container about point 3. Because it turned out that no
> properties/headers are being set on the http-response when it is a
> resource response. It works for a render response. So probably just a bug.
>
> Some extra clarification on point 4: This is some lines of code in
> WicketPortlet.processRequest. After you patch wicket it's on line 423.
>
> The rest is still open.
>
> Thijs
>
>
> Thijs schreef:
>> Hi Ate,
>>
>> I've done some work, I've attached an initial patch to the Jira issue.
>> It has the following basic modifications.
>>
>> I've completely removed the servletContextProvider and
>> ResourceUrlFactory. I've added a PortletMimeServletResponseWrapper
>> that is extended by PortletResourceServletResponseWrapper and
>> PortletRenderServletResponseWrapper, and I've implemented
>> serveResource. Also some other things, but you'll be able to see that
>> in the patch.
>>
>> The patch is based on the assumption that portlet 2.0 implementation
>> will replace the 1.0, but that's just because I started out that way,
>> I haven't looked at the 'side by side' option.
>>
>> There are some things;
>> 1. Calling resourceResponse.createRenderUrl: In Liferay this throws an
>> IllegalStateException. Because, according to them your not allowed to
>> create a renderUrl from a resourceresponse. This is a problem when we
>> want to do a setResponsePage(new WebPage()) in a ajax call.
>> In openportal, I am allowed to create a renderUrl because they check
>> if the CacheLevel is equal to type PAGE (which it is) and so I get a
>> RenderURL back. Is the way OpenPortal does it correct? Because then
>> I'll open a jira issue for Liferay to handle that properly.
>>
>> 2. When in a ajax call (ResourceRequest) and we do
>> setResponsePage(WebPage.class), and WebPage.class is mounted, the
>> current implementation doesn't break out of the ResourceRequest, it
>> just creates a new ResourceURL. When this happens, I only get the
>> Markup of the portlet back, not the whole portal page.
>>
>> 3. The add/set property for a resourceresponse in openportal only
>> accepts cache-contol and similar headers. So the Ajax-Location header
>> does not work on this portal (jet)... So I can't test the ajax
>> redirect on it. I'll see if I can open an issue for it...
>> Can't we change the Ajax-Location to be inside the xml response? Then
>> we never have any trouble with that http header. (Because doesn't it
>> say in the portletspec somewhere that a portlet can't depend on the
>> headers being set?)
>>
>> 4. I have some open TODO's in the patch for some small issues, one is
>> the request.setCharacterEncoding which is allowed when not in an
>> actionrequest or resourcerequest. For now it doesn't do anything. But
>> there should be a check in what PHASE we are. (or add extra
>> sub-classes for every request, like we have for the response types)
>> Then there is the sendRedirect in a non ActionRequest, I've commented
>> that bit, but it needs to be fixed.
>>
>> 5. Do we want to do something with the Portlet.doHeader call? If I
>> understand the documentation correctly it should be possible to set
>> add markup to the <head> in that call if the portal supports it.
>> Liferay & OpenPortal don't at the moment. But if we do then we might
>> have to move all the processing logic to the doHeader call, and store
>> the rest of the response for the doView/etc calls?!
>>
>> 6. I have not yet thought about the processEvent.
>>
>> I hope with this patch you can run Wicket on Pluto also, at least
>> parts of it :)
>>
>> Thijs
>>
>
>
>
--
View this message in context: http://www.nabble.com/Portlet-2.0-implementation-in-Wicket-tp17187909p17308612.html
Sent from the Wicket - Dev mailing list archive at Nabble.com.
Re: Portlet 2.0 implementation in Wicket
Posted by Thijs <vo...@gmail.com>.
Some more progress
I think I fixed point 2. (see the jira)
I've raised an issue at Liferay regarding point 1 (after re-reading the
portlet 2.0 specs)
I've also raissed an question on the mailing list of OpenPortal
portlet-container about point 3. Because it turned out that no
properties/headers are being set on the http-response when it is a
resource response. It works for a render response. So probably just a bug.
Some extra clarification on point 4: This is some lines of code in
WicketPortlet.processRequest. After you patch wicket it's on line 423.
The rest is still open.
Thijs
Thijs schreef:
> Hi Ate,
>
> I've done some work, I've attached an initial patch to the Jira issue.
> It has the following basic modifications.
>
> I've completely removed the servletContextProvider and
> ResourceUrlFactory. I've added a PortletMimeServletResponseWrapper
> that is extended by PortletResourceServletResponseWrapper and
> PortletRenderServletResponseWrapper, and I've implemented
> serveResource. Also some other things, but you'll be able to see that
> in the patch.
>
> The patch is based on the assumption that portlet 2.0 implementation
> will replace the 1.0, but that's just because I started out that way,
> I haven't looked at the 'side by side' option.
>
> There are some things;
> 1. Calling resourceResponse.createRenderUrl: In Liferay this throws an
> IllegalStateException. Because, according to them your not allowed to
> create a renderUrl from a resourceresponse. This is a problem when we
> want to do a setResponsePage(new WebPage()) in a ajax call.
> In openportal, I am allowed to create a renderUrl because they check
> if the CacheLevel is equal to type PAGE (which it is) and so I get a
> RenderURL back. Is the way OpenPortal does it correct? Because then
> I'll open a jira issue for Liferay to handle that properly.
>
> 2. When in a ajax call (ResourceRequest) and we do
> setResponsePage(WebPage.class), and WebPage.class is mounted, the
> current implementation doesn't break out of the ResourceRequest, it
> just creates a new ResourceURL. When this happens, I only get the
> Markup of the portlet back, not the whole portal page.
>
> 3. The add/set property for a resourceresponse in openportal only
> accepts cache-contol and similar headers. So the Ajax-Location header
> does not work on this portal (jet)... So I can't test the ajax
> redirect on it. I'll see if I can open an issue for it...
> Can't we change the Ajax-Location to be inside the xml response? Then
> we never have any trouble with that http header. (Because doesn't it
> say in the portletspec somewhere that a portlet can't depend on the
> headers being set?)
>
> 4. I have some open TODO's in the patch for some small issues, one is
> the request.setCharacterEncoding which is allowed when not in an
> actionrequest or resourcerequest. For now it doesn't do anything. But
> there should be a check in what PHASE we are. (or add extra
> sub-classes for every request, like we have for the response types)
> Then there is the sendRedirect in a non ActionRequest, I've commented
> that bit, but it needs to be fixed.
>
> 5. Do we want to do something with the Portlet.doHeader call? If I
> understand the documentation correctly it should be possible to set
> add markup to the <head> in that call if the portal supports it.
> Liferay & OpenPortal don't at the moment. But if we do then we might
> have to move all the processing logic to the doHeader call, and store
> the rest of the response for the doView/etc calls?!
>
> 6. I have not yet thought about the processEvent.
>
> I hope with this patch you can run Wicket on Pluto also, at least
> parts of it :)
>
> Thijs
>
Re: Portlet 2.0 implementation in Wicket
Posted by Thijs <vo...@gmail.com>.
Hi Ate,
I've done some work, I've attached an initial patch to the Jira issue.
It has the following basic modifications.
I've completely removed the servletContextProvider and
ResourceUrlFactory. I've added a PortletMimeServletResponseWrapper that
is extended by PortletResourceServletResponseWrapper and
PortletRenderServletResponseWrapper, and I've implemented serveResource.
Also some other things, but you'll be able to see that in the patch.
The patch is based on the assumption that portlet 2.0 implementation
will replace the 1.0, but that's just because I started out that way, I
haven't looked at the 'side by side' option.
There are some things;
1. Calling resourceResponse.createRenderUrl: In Liferay this throws an
IllegalStateException. Because, according to them your not allowed to
create a renderUrl from a resourceresponse. This is a problem when we
want to do a setResponsePage(new WebPage()) in a ajax call.
In openportal, I am allowed to create a renderUrl because they check if
the CacheLevel is equal to type PAGE (which it is) and so I get a
RenderURL back. Is the way OpenPortal does it correct? Because then I'll
open a jira issue for Liferay to handle that properly.
2. When in a ajax call (ResourceRequest) and we do
setResponsePage(WebPage.class), and WebPage.class is mounted, the
current implementation doesn't break out of the ResourceRequest, it just
creates a new ResourceURL. When this happens, I only get the Markup of
the portlet back, not the whole portal page.
3. The add/set property for a resourceresponse in openportal only
accepts cache-contol and similar headers. So the Ajax-Location header
does not work on this portal (jet)... So I can't test the ajax redirect
on it. I'll see if I can open an issue for it...
Can't we change the Ajax-Location to be inside the xml response? Then we
never have any trouble with that http header. (Because doesn't it say in
the portletspec somewhere that a portlet can't depend on the headers
being set?)
4. I have some open TODO's in the patch for some small issues, one is
the request.setCharacterEncoding which is allowed when not in an
actionrequest or resourcerequest. For now it doesn't do anything. But
there should be a check in what PHASE we are. (or add extra sub-classes
for every request, like we have for the response types)
Then there is the sendRedirect in a non ActionRequest, I've commented
that bit, but it needs to be fixed.
5. Do we want to do something with the Portlet.doHeader call? If I
understand the documentation correctly it should be possible to set add
markup to the <head> in that call if the portal supports it. Liferay &
OpenPortal don't at the moment. But if we do then we might have to move
all the processing logic to the doHeader call, and store the rest of the
response for the doView/etc calls?!
6. I have not yet thought about the processEvent.
I hope with this patch you can run Wicket on Pluto also, at least parts
of it :)
Thijs
Re: Portlet 2.0 implementation in Wicket
Posted by Ate Douma <at...@douma.nu>.
Thijs Vonk wrote:
> I've started on implementing the portlet 2.0 specifications. I've opened
> https://issues.apache.org/jira/browse/WICKET-1620 to apply patches to
> when I get something useful.
> But I have some questions before I can go any further.
>
> First of all, do we drop portlet 1.0 in favor of portlet 2.0? I suppose
> we do because we need java 5 to support 2.0 but portlet 1.0 doesn't
> support java 5.
Portlet 1.0 doesn't require Java 5, that's not the same.
I don't want to drop support for portlet 1.0 yet, certainly not until Jetspeed 2 provides portlet 2.0 support :)
My proposal is adding a new WicketPortlet2 class (or something, I don't like the name but haven't come up with something
better yet). This class should set a clear marker (like a new request or portlet context attribute or something) to
indicate to the other supportive classes within Wicket which environment the current request is dealing with, and use
the native Portlet API 2.0 methods if in context of the current request.
>
> If I understand correctly I can drop de ResourceUrlFactory because this
> is provided by the portal. I should then also be able to drop the wicket
> WicketPortlet.PORTLET_RESOURCE_URL_PARAMETER and
> PORTLET_RESOURCE_URL_ATTR. Because the lifecycle of the request tells if
> the request is a resource request or not.
Correct.
>
> What I'm not sure about is the ServletContextProvider. (from apache
> portal bridges) I can't really determine if I can drop this as well. For
> now I've left it in and it seems to work (on Liferay) but I could be
> doing some hybrid crossover now :)
That one isn't needed anymore either for portlet 2.0. The PortletRequestDispatcher now supports all request types.
>
> And now I'm a bit stuck :) Liferay seems to have a problem with adding
> http headers in a portlet response. Preventing some ajax stuff from
> working. It looks like the PortletResponse.addProperty(etc) is not
> implemented. So I've setup glassfisch with openportal-container 2.0 rc2,
> but that's not helping either I haven't been able to get Wicket running
> properly yet. The portlet bridge i've written seems to work, but when I
> click a link in the portletm, wicketfilterportletcontext.setupfilter()
> isn't able to find any of the set values in the request (not the
> RESPONSE_STATE_ATTR nor the REQUEST_TYPE_ATTR)
Well, that is something we need to look into, but in general add/setProperty better be supported on those containers :)
>
> Ate, how is Jetspeed doing with portlet 2.0? If I download trunk, will
> Wicket work and what is the status of jsr-286?
No, not yet.
Jetspeed-2 trunk hasn't been upgraded to Pluto 2.0 yet so is still based on portlet 1.0.
I've started some preliminary work on getting Wicket working with the Pluto 2.0 (trunk) Portal Driver myself.
Doesn't work yet as I haven't had enough time to dive really deep into it, but I'm definitely interested in the changes
you've made so far and see how we can join our effort on this.
It would be great if you could attach a patch file of your changes to the new JIRA issue for example.
BTW: I won't be able to do much on this issue this week as I have to go to Dublin for a client.
Ate
>
> Thijs
>