10 Replies Latest reply on Feb 13, 2009 3:31 PM by analyzediz

    multiple header support

    pedalshoe

      Does JBossPortal support a different Header.jsp and tabs.jsp for each portal
      instance in one JBossPortal container?

      For example:

      JBossP O R T A L
      ----------------------
      1. "out of the box" Portal: runing at: localhost:8080/portal -
      header and tabs are located in /portal-core/WEB-INF/jsp/...
      2. MyPortal-1: running at: localhost:8080/portal/portal/MyPortal-1 -
      header and tabs are located in /MyPortal-1/WEB-INF/jsp/...
      3. MyPortal-2: running at: localhost:8080/portal/portal/MyPortal-2 -
      header and tabs are located in /MyPortal-2/WEB-INF/jsp/...

      Is this possible? Or should i just have another JBossPortal running on a
      different port?
      -Christopher

        • 1. Re: multiple header support
          antoine_h

          You can do it !

          when you define a portal (or even just a new page), you define a layout and a theme for this portal (or page).

          Then, you can define several layout and theme, and package them in one big "my_layouts_and_themes.war" package, or in as many war you want.
          (ie : "my_layout_and_theme_1.war", "my_layout_and_theme_2.war", etc...).

          Also the layout can be in the war, with other portlets...
          but I find it more clean to have a separate project and separate war package for the layout. That depends on your preferred way.

          then, you define each portal with the layout and theme you want.
          (you can also change the L/T for each user, during the session, etc...).

          All in the same instance of JBoss and of JBoss Portal (multiple portal feature).



          • 2. Re: multiple header support
            pedalshoe

            So, i can have a layout and theme defined in MyPortal-1.war and ia different one defined in MyPortal-2.war.

            I have to work on this, because it isn't picking up the Layout and Theme that i placed in MyPortal-1.war. it is still using the default layout and theme.

            • 3. Re: multiple header support
              explorer

              Hi pedalshoe,

              Did you get this working.

              I was having a similar issue, Trying to include my custom defined header. The thing is its not being picked up. Rather its picking the defualt header.jsp and tab.jsp inside the core.

              Please help me in getting this working.

              Thanks

              • 4. Re: multiple header support

                 

                "explorer" wrote:
                Trying to include my custom defined header. The thing is its not being picked up. Rather its picking the defualt header.jsp and tab.jsp inside the core.


                this is set in jboss-portal.sar/META-INF/jboss-service.xml :

                mbean PageCustomizerInterceptor:

                <mbean
                 code="org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor"
                 name="portal:service=Interceptor,type=Command,name=PageCustomizer"
                 xmbean-dd=""
                 xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
                 <xmbean/>
                 <attribute name="TargetContextPath">/portal-core</attribute>
                 <attribute name="HeaderPath">/WEB-INF/jsp/header/header.jsp</attribute>
                 <attribute name="TabsPath">/WEB-INF/jsp/header/tabs.jsp</attribute>
                 <!-- Overrides the value of core.login.namespace in config.xml -->
                 <attribute name="LoginNamespace">dashboard</attribute>
                 <depends
                 optional-attribute-name="Config"
                 proxy-type="attribute">portal:service=ServerConfig</depends>
                 <depends
                 optional-attribute-name="PortalAuthorizationManagerFactory"
                 proxy-type="attribute">portal:service=PortalAuthorizationManagerFactory</depends>
                 </mbean>



                in my project theme.war, i use a SimpleTagSupport to realize my own header menu.



                • 5. Re: multiple header support
                  explorer

                  Thanks fore the reply,
                  Well i came across making changes there.. but my concern is. I have a myProjectTheme.war outside the portal.sar. How would this context be picked up.

                  • 6. Re: multiple header support
                    pucky

                    I'm trying to do something similar and I think I'm just getting more confused.

                    I have 2 portals and one portal needs to have the header links wrapped in divs but the other needs them to be wrapped in a table.

                    Looking at the documentation and reading this forum makes me think that you can only have one PageCustomizer. Is that correct?

                    Can I have portal1 have Portal1PageCustomizer and portal2 have Portal2PageCustomizer?

                    Thanks.

                    Pucky

                    • 7. Re: multiple header support
                      pedalshoe

                      Interestingly, I ran into this problem again. I thought I didn't have to worry about this anymore. I'm still trying to render multiple headers. I have the portal1.war and i would like to have all customizations for this portal in this file. Customizing the interceptor is an idea but that will mean the portal-core will render the way portal1.war should render... this isn't what i need. I'm experimenting with changing the name of the Interceptor to portal1PageCustomizer and placing it in the portal1.war META-INF/ directory.

                      • 8. Re: multiple header support
                        viggo.navarsete

                        if I create my own theme/layout and bundles it into a separate war file, and if I have the exact path for the header.jsp and tabs.jsp as described here:

                        <mbean
                         code="org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor"
                         name="portal:service=Interceptor,type=Command,name=PageCustomizer"
                         xmbean-dd=""
                         xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
                         <xmbean/>
                         <attribute name="TargetContextPath">/portal-core</attribute>
                         <attribute name="HeaderPath">/WEB-INF/jsp/header/header.jsp</attribute>
                         <attribute name="TabsPath">/WEB-INF/jsp/header/tabs.jsp</attribute>
                         <!-- Overrides the value of core.login.namespace in config.xml -->
                         <attribute name="LoginNamespace">dashboard</attribute>
                         <depends
                         optional-attribute-name="Config"
                         proxy-type="attribute">portal:service=ServerConfig</depends>
                         <depends
                         optional-attribute-name="PortalAuthorizationManagerFactory"
                         proxy-type="attribute">portal:service=PortalAuthorizationManagerFactory</depends>
                         </mbean>
                        
                        

                        would then my own header.jsp and tabs.jsp from my own war file be preferred when rendering my portal?
                        Or am I forced to change the jboss-portal.sar/META-INF/jboss-service.xml in order to use my own customized header and tabs?

                        • 9. Re: multiple header support
                          viggo.navarsete

                          anyone?

                          • 10. Re: multiple header support

                            Did any one of you guys find a solution to this problem?

                            Any pointers would be very much appreciated.