[jboss-user] [JBoss Portal] - Extending UserPortlet, getting UserModule
k3nnymusic
do-not-reply at jboss.com
Tue Oct 9 10:26:00 EDT 2007
I am using jboss as 4.0.5 and jboss portal 2.4.2. I am trying to extend UserPortlet with my own functionality. First I created new portlet with existing sources such as UserPortlet.java, UserPortletConstants, all *.jsp from oryginal UserPortlet. I copied all sections of UserPortlet from core descriptors to my own ones and I added to project portal-lib.tld and portlet.tld.
I debbuged portlet and I have got init excepions in lines:
userModule = (UserModule)getPortletContext().getAttribute("UserModule");
| roleModule = (RoleModule)getPortletContext().getAttribute("RoleModule");
| mailModule = (MailModule)getPortletContext().getAttribute("MailModule");
| portletHelper = new PortletHelper(this);
|
| //
| if (userModule == null)
| {
| throw new PortletException("No user module");
| }
| if (roleModule == null)
| {
| throw new PortletException("No role module");
| }
| if (mailModule == null)
| {
| throw new PortletException("No mail module");
| }
because portlet context return nulls. What should I do? I must set this three attributes first? Where? Might be I forgot something in descriptors?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093057#4093057
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093057
More information about the jboss-user
mailing list