0 Replies Latest reply on Apr 11, 2006 8:34 AM by Vecchio Fabrizio

    acess PortalObjectContainer from jsf managed bean

    Vecchio Fabrizio Newbie

      hi,
      my question is .. there is a way to retrieve PortalObjectContainer from a jsf managed bean ?
      I see the code of jboss-portal-core and i made this steps :

      jboss-portlet.xml :
      ...

      <service-name>PortalObjectContainer</service-name>
      <service-class>org.jboss.portal.core.model.portal.PortalObjectContainer</service-class>
      <service-ref>:container=PortalObject</service-ref>

      ...

      faces-config.xml:
      ....
      <managed-bean>


      <display-name></display-name>
      <managed-bean-name>PortletManager</managed-bean-name>
      <managed-bean-class>mytest.PortletManager</managed-bean-class>
      <managed-bean-scope>application</managed-bean-scope>
      <managed-property>
      <property-name>portalObjectContainer</property-name>
      #{applicationScope.PortalObjectContainer}
      </managed-property>
      </managed-bean>
      ....

      PortletManager.java:
      .....
      public void setPortalObjectContainer(PortalObjectContainer poc) {
      this.poc = poc;
      }
      public PortalObjectContainer getPortalObjectContainer() {
      return this.poc;
      }
      ....


      but when i try to use "poc" (PortalObjectContainer) i got an exception (that don't say nothing about the problem). I think that i miss a step, if anyone can help me ....
      Thanks