3 Replies Latest reply on Jul 19, 2006 9:59 AM by julien1

    get page-name in java

    pedrosacosta

      In *-object.xml, we have the element page-name.

      In my portal, i want use sendRedirect eith the following uri:

      /portal/auth/index.html?ctrl:cmd=render&ctrl:window=sigo." + pageName + ".EventsListPortletWindow"


      I want to know how can i get the page-name of the portal that is running in java?

      Thanks,
      Pedro

        • 1. Re: get page-name in java
          pedrosacosta

          I've found it.

          Use request.getPortalContext().getProperty("portal.defaultObjectName");

          • 2. Re: get page-name in java
            pedrosacosta

            Opppss. This isn't quite what i want.

            The attribute "portal.defaultObjectName" gives me the default page-name of the portlet which is running. If i use the same portlet in differente pages i only get one default page name, and not the page name of the instance it's running.

            So, the question maintains:

            1- What method of the API of the Portal i can use to get the page-name of the portal that is running?

            2- How can i get programatically the values defined in *-object.xml?

            Thanks,
            Pedro

            • 3. Re: get page-name in java

              Use the code :

              ((JBossRenderRequest)req)).getPortalNode().getParent().getName();