Carol Jones/Raleigh/IBM wrote:
> 
> Raphael,
> 
> I was trying to get the WML portlets to work, and I noticed a problem in
> the WAPPorletController class. (My snapshot is a few days old, so
> ignore me if this is already fixed!)
>

AFAIK, I didn't write that class but I still may be able to help... ;)
 
> The problem is in the method getDefaultContent, where it is gettting
> the elements of the portlet set enumeration.
> 
> Currently, it does this:
>      Portlet portlet = (Portlet)en.nextElement();
> 
> but that line returns the ClearPortletControl, not the actual portlet.
> I think the line should be this instead:
> 
>      Portlet portlet = ((PortletControl)en.nextElement()).getPortlet();
> 

What do you need to access the real Portlet object ? If you just want to get 
its content calling getContent() on the PortletControl will work and send 
you the content of the Portlet (Portlet/PortletSet/PortletControl follow 
a composite pattern, PortletController is a layout strategy for PortletSet)

In fact PortletControl delegates all Portlet API calls to its controlled 
portlet, so it should really behave as you were returned the correct Portlet.

--
Rapha�l Luta - [EMAIL PROTECTED]


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to