3 Replies Latest reply on Oct 2, 2008 3:26 AM by kmekme

    change portlet titlebar style

    kmekme

      Hi,

      I need to change the structure of my portlets.

      Instead of using 3 images for the titlebar, I want to use 5.
      I changed the images in the CSS, but I couldn't find how to separate the titlebar in 5 parts.

      Is there a way to change this?

        • 1. Re: change portlet titlebar style
          kmekme

          Anyone?

          I'm using JBoss server 4.2.2, Jboss Portal 2.6.4 and JSR-168 portlets.
          I didn't see anything about that in JSR-168 spec.

          • 2. Re: change portlet titlebar style
            peterj

            The title bar is created in:

            org.jboss.portal.theme.impl.render.div.DivDecorationRenderer.render()

            which calls

            org.jboss.portal.theme.impl.render.div.DivDecorationRenderer.renderTriggerableActions()

            which in turn places an icon for every valid action. The valid actions are maintained by the class

            org.jboss.portal.theme.page.WindowContext

            which in turn is initialized by this statement in the *-object.xml file:

            <supported-window-states>
             <window-state>normal</window-state>
             <window-state>minimized</window-state>
             <window-state>maximized</window-state>
            </supported-window-states>


            So the first step would appear to be adding to the supported states, and updating the css to reference the icons (example: the "help" state creates an anchor with class "portlet-mode-help", and in the css this class references image images/help.gif ).

            If you look at the code I mentioned, you will notice that the states are divided into "mode" and "windowstate" states. I have not dug deep enough to determine how to get a new state mapped to one of these.

            Hopefully this will get you far enough to at least know where to look.

            Disclaimer: I have not tried this so I do not know if it will even work.

            • 3. Re: change portlet titlebar style
              kmekme

              Ok, thank you Peter.
              I'll try to look that way.