1 Reply Latest reply on Apr 17, 2008 9:03 AM by tinico

    custom-window-state

      Hi,

      I've read lot of pages about that... But When I want to reproduce all what I've read, it doesn't work... That why I post a new subject in order to help me...

      The problem : I just want to add a custom-window-state called "solo" (in order to display the portlet on page without any other portlet, header, footer, etc...).

      I've add the following lines on my application portlet.xml :

       ...
       <custom-window-state>
       <window-state>solo</window-state>
       </custom-window-state>
      </portlet-app>
      


      On the *-object.xml, I've added :

       ...
       <supported-modes>
       <mode>view</mode>
       <mode>edit</mode>
       <mode>help</mode>
       <mode>admin</mode>
       </supported-modes>
       ...
      


      On all my personal layout, I've add :

       <layout>
       <name>HGPP-Layout-4R</name>
       <uri>/layouts/HGPP-Layout-4R/index.jsp</uri>
       <uri state="maximized">/layouts/generic/maximized.jsp</uri>
       <uri state="solo">/layouts/generic/solo.jsp</uri>
       <regions>
       <region name="top"/>
       <region name="LeftColumn"/>
       <region name="RightColumn"/>
       <region name="bottom"/>
       </regions>
       </layout>
      


      And I declare my /layouts/generic/solo.jsp like that :

      <%@ page import="org.jboss.portal.server.PortalConstants"%>
      <%@ taglib uri="/WEB-INF/theme/portal-layout.tld" prefix="p" %>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
       <title>Printed Mode</title>
       <meta http-equiv="Content-Type" content="text/html;"/>
       <!-- to correct the unsightly Flash of Unstyled Content. -->
       <script type="text/javascript"></script>
       <!-- inject the theme; default to the HGPP-Theme theme if nothing is selected for the portal or the page -->
       <p:theme themeName='Printed-Theme'/>
       <!-- inject header content that was generated by the portlets on the requested page -->
       <p:headerContent/>
      </head>
      
      <body id="body">
       <p:region regionName='solo' regionID='regionSolo' />
      </body>
      </html>
      


      I've declare a "Printed-Theme" without header, and in the css, I've add

      .portlet-mode-solo {
       background-image: url( images/ico_16_maximize.gif );
       background-repeat: no-repeat;
       width: 16px;
       height: 16px;
       float: left;
       display: inline;
       cursor: pointer;
       padding-left: 3px;
      }
      
      .portlet-mode-solo:hover {
       text-decoration: none;
      }
      


      My application is like that :

      + layouts
       + generic
       + solo.jsp
       + maximized.jsp
       + ...
      + themes
       + Printed-Theme
       + images
       + portal_styles.css
       + ...
      + WEB-INF
       + *.layouts.xml
       + *.themes.xml
       + porlets-object.xml
      


      The problem is : the state "solo" doesn't work... The render is like "normal" state and I havn't any error message...

      Thank you in advance for your help !!

        • 1. Re: custom-window-state

          Sorry... In *.object.xml I've added this liens :

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