Re: Problem with custom mode
Ate Douma <[email protected]>
| Newsgroups | gmane.comp.jakarta.pluto.user |
|---|---|
| Message-ID | <[email protected]> |
Nicolas Lafaury wrote:
> Hello
>
> I use uPortal that use pluto to run portlet.
>
> I am trying to build custom mode in my portlet, but I have an error.
>
> In portlet.xml, I add
>
> *<custom-portlet-mode>*
>
> *<description>Mode pour l'impression</description>*
>
> *<name>print</name>*
>
> *</custom-portlet-mode>*
>
> In my *"public class ExemplePortlet extends GenericPortlet {"*, I add,
> as I see on the forum,
>
> public final static PortletMode PRINT =3D new PortletMode("print");
>
> but when I tried to create a link to this custom mode, I have an error :
> /javax.portlet.PortletModeException: unsupported Portlet Mode used: print/
>
> Do I need to do something else to create my own custom mode?
I don't know what other restrictions uPortal might have, but one thing you
at least need to do is specifying your portlet actually supports it.
Like:
<portlet>
...
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>print</portlet-mode>
</supports>
...
</portlet>
>
> thanks for your help.
>
> Nicolas
>
>
> Nicolas LAFAURY
> Smile- Motoriste Internet
> 01-41-40-11-05
> [email protected] <mailto:[email protected]>
>
>