3 Replies Latest reply on Apr 17, 2007 11:13 AM by Antoine Herzog

    Custom Window State

    Anette Engel Newbie

      Does the JBoss Portal (2.4) support custom window states? Which class do I need to overwrite if I want to add my custom window state?

      For printing the content of a portlet I quite like to introduce a custom window state 'print' which is mapped by by layout descriptor to print.jsp, which will only display the portlet without heading or navigation.

       <uri state="maximized">/layouts/mylayout/maximized.jsp</uri>
       <uri state="print">/layouts/mylayout/print.jsp</uri>
       <region name="left"/>
       <region name="center"/>
       <region name="navigation"/>

      Is that possible?



        • 1. Re: Custom Window State
          Antoine Herzog Master

          yes, this seems the right way, for what I know.
          look at the jsr-168 for defining custom window states.
          there is an example with "1/2 maximized" state, if I remember well.
          To make sure you have declared all that is needed for this state in other places (portal description, etc...).

          By the way, thanks for your post about Acegi :
          And so the wiki.

          I have a question : to use a SecurityContextHolder, I used the acegi filters.
          As you don't talk about it : is it because you did another way ?
          I will complement the wiki with the filter stuff, when my integration is finished (and clean).
          If you don't want to post for security matters, you can contact me by mail (on my website).

          • 2. Re: Custom Window State
            Anette Engel Newbie

            Hi Antoine,

            Sorry I can't help you as I only used Acegi to login but didn't do any filtering and I haven't used it since. I am currently using the LdapExtLoginModule to authenticate against my LDAP server which is sufficient for the time being.

            With regards to custom window states I have added the my custom window state to the portal descriptor:

             <parent-ref />

            I have added the custom window state to the portlet descriptor:

            <?xml version="1.0" encoding="UTF-8"?>
             <description>window without header and menu for printing</description>

            The portal accepts the window state but uses the default jsp 'index.jsp'. I don't know what I have to do for the portal to use the 'print.jsp'

            Best Regards,


            • 3. Re: Custom Window State
              Antoine Herzog Master

              It seems more a pb of wiring.

              did you look at the layout strategy source code ?
              may be this feature has not been much tested (used ?), and there is a bug, when routing to the proper jsp file.
              as you can write your own, you may do one and see with logs what happen and why it does not work...

              best regards,