0 Replies Latest reply on Oct 9, 2007 10:25 AM by dssa das

    Extending UserPortlet, getting UserModule

    dssa das Newbie

      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