7 Replies Latest reply on Dec 6, 2006 2:29 AM by Thomas Heute

    Creating a portlet instance of an unamed portlet

    Eric Gandt Newbie

      I have about 30 portlets added by a software program, and while they all show up on the list of portlets with an id such as "local./servlet.CreateContent" they have no name in the name column and if I click on them nothing happens, as there is no name I can not create an instance without first adding a name to the id of the portlet, how is this done, as I can find nothing in the documentation on how to name an unamed portlet id.


      ERIC GANDT

        • 1. Re: Creating a portlet instance of an unamed portlet
          Eric Gandt Newbie

          Sorry I should mention that this is with Portal 2.4 and I did not see this issue with 2.2.1

          • 3. Re: Creating a portlet instance of an unamed portlet
            Eric Gandt Newbie

            Here it is:

            <?xml version="1.0" encoding="UTF-8"?>
            <portlet-app version="1.0" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet">

            <portlet-name>ActiveContent</portlet-name>
            <portlet-class>com.fatwire.flame.portlets.MyActiveList</portlet-class>
            <init-param>
            com.fatwire.cs.portals.portlet.CSPortlet.config.renderpage
            OpenMarket/Flame/MyActiveList/View
            </init-param>
            <init-param>
            com.fatwire.cs.portals.portlet.CSPortlet.config.mode
            WCM
            </init-param>

            <mime-type>text/html</mime-type>
            <portlet-mode>view</portlet-mode>

            <portlet-info>
            Active Content
            </portlet-info>


            <portlet-name>ActiveDocuments</portlet-name>
            <portlet-class>com.fatwire.flame.portlets.MyActiveList</portlet-class>
            <init-param>
            com.fatwire.cs.portals.portlet.CSPortlet.config.renderpage
            OpenMarket/Flame/MyActiveList/View
            </init-param>
            <init-param>
            com.fatwire.cs.portals.portlet.CSPortlet.config.mode
            DM
            </init-param>

            <mime-type>text/html</mime-type>
            <portlet-mode>view</portlet-mode>

            <portlet-info>
            Active Documents
            </portlet-info>


            <portlet-name>CheckedoutContent</portlet-name>
            <portlet-class>com.fatwire.flame.portlets.MyCheckouts</portlet-class>
            <init-param>
            com.fatwire.cs.portals.portlet.CSPortlet.config.renderpage
            OpenMarket/Flame/MyCheckouts/View
            </init-param>
            <init-param>
            com.fatwire.cs.portals.portlet.CSPortlet.config.mode
            WCM
            </init-param>

            <mime-type>text/html</mime-type>
            <portlet-mode>view</portlet-mode>

            <portlet-info>
            Checked-out Content
            </portlet-info>


            <portlet-name>CheckedoutDocuments</portlet-name>
            <portlet-class>com.fatwire.flame.portlets.MyCheckouts</portlet-class>
            <init-param>
            com.fatwire.cs.portals.portlet.CSPortlet.config.renderpage
            OpenMarket/Flame/MyCheckouts/View
            </init-param>
            <init-param>
            com.fatwire.cs.portals.portlet.CSPortlet.config.mode
            DM
            </init-param>

            <mime-type>text/html</mime-type>
            <portlet-mode>view</portlet-mode>

            <portlet-info>
            Checked-out Documents
            </portlet-info>


            <portlet-name>ContentAssignments</portlet-name>
            <portlet-class>com.fatwire.flame.portlets.MyAssignments</portlet-class>
            <init-param>
            com.fatwire.cs.portals.portlet.CSPortlet.config.renderpage
            OpenMarket/Flame/MyAssignments/View
            </init-param>
            <init-param>
            com.fatwire.cs.portals.portlet.CSPortlet.config.mode
            WCM
            </init-param>

            <mime-type>text/html</mime-type>
            <portlet-mode>view</portlet-mode>

            <portlet-info>
            Content Assignments
            </portlet-info>

            </portlet-app>

            • 4. Re: Creating a portlet instance of an unamed portlet
              Thomas Heute Master

              What does your software do ?
              Is it using the internal API ? If yes, then you shouldn't.

              You could just make it write your -object.xml and -instance.xm files and let JBoss Portal do the work.

              Quite frankly, I may not have understood your problem

              • 5. Re: Creating a portlet instance of an unamed portlet
                Eric Gandt Newbie

                The problem is that the portlets are registered with the portal, but in the display they have only got an id and no name, there are 4 columns: id, name, remote, remote able
                The last 2 remote, remotable are check boxes, my portlets only have an id and no name so I can not create an instance. Even when I create a portlet-instance.xml file:

                <?xml version="1.0" standalone="yes"?>



                <instance-id>ActiveContentInstance</instance-id>
                <portlet-ref>ActiveContent</portlet-ref>




                <instance-id>ActiveDocumentsInstance</instance-id>
                <portlet-ref>ActiveDocuments</portlet-ref>




                I get instances of portlets, but the instance point to '-' because the portlet name field is not filled in and apparently the name field is used to map to an instance. This makes no sense to me as my portlets have a name, its just not being used. Also in Portal 2.2.1 this was not a problem.

                ERIC

                • 6. Re: Creating a portlet instance of an unamed portlet
                  Eric Gandt Newbie

                  The problem was I did not have the following defined for each portlet:
                  <portlet-name>ActiveContent</portlet-name>
                  new: <display-name>Active Content</display-name>
                  new: Spark Portlet
                  <portlet-class>com.fatwire.flame.portlets.MyActiveList</portlet-class>

                  the key descriptor is <display-name> as the portal seems to just not like any portlet without it (they are displayed, but nothing can be done with them) The second descriptor is and while optional it makes sense to have.

                  Thanks,
                  ERIC

                  • 7. Re: Creating a portlet instance of an unamed portlet
                    Thomas Heute Master

                    And display-name is not mandatory, so this is a bug.

                    Could you please file a JIRA bug report ? jira.jboss.org