You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ar...@apache.org on 2008/04/05 03:43:57 UTC

svn commit: r645007 - in /myfaces/trinidad/branches/ar_panelBorderLayout_positioning: src/site/xdoc/ trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/ trinidad-examples/trinidad-demo/src/main/webapp/WEB-INF/ trinid...

Author: arobinson74
Date: Fri Apr  4 18:43:55 2008
New Revision: 645007

URL: http://svn.apache.org/viewvc?rev=645007&view=rev
Log:
TRINIDAD-1032 : add DIV positioning layout to the panel border
layout component so that it can stretch to its container (i.e. 100%
height)

Modified:
    myfaces/trinidad/branches/ar_panelBorderLayout_positioning/src/site/xdoc/skin-selectors.xml
    myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelBorderLayout.xml
    myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-examples/trinidad-demo/src/main/webapp/WEB-INF/web.xml
    myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-examples/trinidad-demo/src/main/webapp/components/panelBorderLayout.jspx
    myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelBorderLayoutRenderer.java
    myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java
    myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.xss

Modified: myfaces/trinidad/branches/ar_panelBorderLayout_positioning/src/site/xdoc/skin-selectors.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_panelBorderLayout_positioning/src/site/xdoc/skin-selectors.xml?rev=645007&r1=645006&r2=645007&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_panelBorderLayout_positioning/src/site/xdoc/skin-selectors.xml (original)
+++ myfaces/trinidad/branches/ar_panelBorderLayout_positioning/src/site/xdoc/skin-selectors.xml Fri Apr  4 18:43:55 2008
@@ -1706,6 +1706,66 @@
           </tr>
         </table>
       </subsection>
+      <a name="panelBorderLayout"></a>
+      <subsection name="tr:panelBorderLayout">
+        <p>The panel border layout currently only has skin selectors for the positioned layout.
+        </p>
+        <table>
+          <tr>
+            <th colspan="2">
+              <i>Style Selectors</i>
+            </th>
+          </tr>
+          <tr>
+            <th>Name</th>
+            <th>Description</th>
+          </tr>
+          <tr>
+            <td>af|panelBorderLayout-positioned</td>
+            <td>The default style class for the root element</td>
+          </tr>
+          <tr>
+            <td>af|panelBorderLayout-positioned::top</td>
+            <td>The style class for the top facet element</td>
+          </tr>
+          <tr>
+            <td>af|panelBorderLayout-positioned::inner-top</td>
+            <td>The style class for the inner top facet element</td>
+          </tr>
+          <tr>
+            <td>af|panelBorderLayout-positioned::bottom</td>
+            <td>The style class for the bottom facet element</td>
+          </tr>
+          <tr>
+            <td>af|panelBorderLayout-positioned::inner-bottom</td>
+            <td>The style class for the bottom facet element</td>
+          </tr>
+          <tr>
+            <td>af|panelBorderLayout-positioned::start</td>
+            <td>The style class for the start (or left/right depending on text direction) facet element</td>
+          </tr>
+          <tr>
+            <td>af|panelBorderLayout-positioned::inner-start</td>
+            <td>The style class for the start (or left/right depending on text direction) facet element</td>
+          </tr>
+          <tr>
+            <td>af|panelBorderLayout-positioned::end</td>
+            <td>The style class for the start (or left/right depending on text direction) facet element</td>
+          </tr>
+          <tr>
+            <td>af|panelBorderLayout-positioned::inner-end</td>
+            <td>The style class for the start (or left/right depending on text direction) facet element</td>
+          </tr>
+          <tr>
+            <td>af|panelBorderLayout-positioned::center</td>
+            <td>The style class for the center element that contains the inner facets and content</td>
+          </tr>
+          <tr>
+            <td>af|panelBorderLayout-positioned::inner-center</td>
+            <td>The style class for the element that holds the component children</td>
+          </tr>
+        </table>
+      </subsection>
       <a name="panelBox"></a>
       <subsection name="tr:panelBox">
         <p>The panelBox contains the body region, which

Modified: myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelBorderLayout.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelBorderLayout.xml?rev=645007&r1=645006&r2=645007&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelBorderLayout.xml (original)
+++ myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelBorderLayout.xml Fri Apr  4 18:43:55 2008
@@ -159,6 +159,211 @@
       </facet-extension>
     </facet>
 
+    <property>
+      <description>
+        <![CDATA[Changes how the panel is rendered. The default is to expand the panel to fix the size of its contents.
+        Setting the value to positioned will force the panel to use the size given to it via CSS (either via the
+        styleClass, inlineStyle or via the skin). The facets are sized using the height and width attributes and
+        the center is given the remainder. With a positioned layout the height and width should be set and the
+        position should be set to relative or absolute. Note that due to limitations in IE6, the positioned layout
+        uses JavaScript resizing that will affect performance. Expand is the default.]]>
+      </description>
+      <property-name>layout</property-name>
+      <property-class>java.lang.String</property-class>
+      <default-value>expand</default-value>
+      <property-extension>
+        <mfp:required>false</mfp:required>
+        <mfp:property-metadata>
+          <mfp:property-values>expand positioned</mfp:property-values>
+          <mfp:preferred>true</mfp:preferred>
+        </mfp:property-metadata>
+      </property-extension>
+    </property>
+    <property>
+      <description>
+        <![CDATA[Specifies the CSS height to give to the top facet in valid CSS units.
+        Used if the layout is positioned and the top facet is present and rendered. Defaults to 25%.]]>
+      </description>
+      <property-name>topHeight</property-name>
+      <property-class>java.lang.String</property-class>
+      <default-value>25%</default-value>
+      <property-extension>
+        <mfp:required>false</mfp:required>
+        <mfp:property-metadata>
+          <mfp:preferred>true</mfp:preferred>
+        </mfp:property-metadata>
+      </property-extension>
+    </property>
+    <property>
+      <description>
+        <![CDATA[Specifies the CSS height to give to the bottom facet in valid CSS units.
+        Used if the layout is positioned and the bottom facet is present and rendered. Defaults to 25%.]]>
+      </description>
+      <property-name>bottomHeight</property-name>
+      <property-class>java.lang.String</property-class>
+      <default-value>25%</default-value>
+      <property-extension>
+        <mfp:required>false</mfp:required>
+        <mfp:property-metadata>
+          <mfp:preferred>true</mfp:preferred>
+        </mfp:property-metadata>
+      </property-extension>
+    </property>
+    <property>
+      <description>
+        <![CDATA[Specifies the CSS height to give to the inner top facet in valid CSS units.
+        Used if the layout is positioned and the inner top facet is present and rendered. Defaults to 25%.]]>
+      </description>
+      <property-name>innerTopHeight</property-name>
+      <property-class>java.lang.String</property-class>
+      <default-value>25%</default-value>
+      <property-extension>
+        <mfp:required>false</mfp:required>
+        <mfp:property-metadata>
+          <mfp:preferred>true</mfp:preferred>
+        </mfp:property-metadata>
+      </property-extension>
+    </property>
+    <property>
+      <description>
+        <![CDATA[Specifies the CSS height to give to the inner bottom facet in valid CSS units.
+        Used if the layout is positioned and the inner bottom facet is present and rendered. Defaults to 25%.]]>
+      </description>
+      <property-name>innerBottomHeight</property-name>
+      <property-class>java.lang.String</property-class>
+      <default-value>25%</default-value>
+      <property-extension>
+        <mfp:required>false</mfp:required>
+        <mfp:property-metadata>
+          <mfp:preferred>true</mfp:preferred>
+        </mfp:property-metadata>
+      </property-extension>
+    </property>
+    <property>
+      <description>
+        <![CDATA[Specifies the CSS width to give to the start facet in valid CSS units.
+        Used if the layout is positioned and the start facet is present and rendered and the left or right facet
+        is not used instead. Defaults to 25%.]]>
+      </description>
+      <property-name>startWidth</property-name>
+      <property-class>java.lang.String</property-class>
+      <default-value>25%</default-value>
+      <property-extension>
+        <mfp:required>false</mfp:required>
+        <mfp:property-metadata>
+          <mfp:preferred>true</mfp:preferred>
+        </mfp:property-metadata>
+      </property-extension>
+    </property>
+    <property>
+      <description>
+        <![CDATA[Specifies the CSS width to give to the end facet in valid CSS units.
+        Used if the layout is positioned and the end facet is present and rendered and the left or right facet
+        is not used instead. Defaults to 25%.]]>
+      </description>
+      <property-name>endWidth</property-name>
+      <property-class>java.lang.String</property-class>
+      <default-value>25%</default-value>
+      <property-extension>
+        <mfp:required>false</mfp:required>
+        <mfp:property-metadata>
+          <mfp:preferred>true</mfp:preferred>
+        </mfp:property-metadata>
+      </property-extension>
+    </property>
+    <property>
+      <description>
+        <![CDATA[Specifies the CSS width to give to the left facet in valid CSS units.
+        Used if the layout is positioned and the left facet is present and rendered. Defaults to 25%.]]>
+      </description>
+      <property-name>leftWidth</property-name>
+      <property-class>java.lang.String</property-class>
+      <default-value>25%</default-value>
+      <property-extension>
+        <mfp:required>false</mfp:required>
+        <mfp:property-metadata>
+          <mfp:preferred>true</mfp:preferred>
+        </mfp:property-metadata>
+      </property-extension>
+    </property>
+    <property>
+      <description>
+        <![CDATA[Specifies the CSS width to give to the right facet in valid CSS units.
+        Used if the layout is positioned and the right facet is present and rendered. Defaults to 25%.]]>
+      </description>
+      <property-name>rightWidth</property-name>
+      <property-class>java.lang.String</property-class>
+      <default-value>25%</default-value>
+      <property-extension>
+        <mfp:required>false</mfp:required>
+        <mfp:property-metadata>
+          <mfp:preferred>true</mfp:preferred>
+        </mfp:property-metadata>
+      </property-extension>
+    </property>
+    <property>
+      <description>
+        <![CDATA[Specifies the CSS width to give to the inner start facet in valid CSS units.
+        Used if the layout is positioned and the inner start facet is present and rendered and the inner left or right facet
+        is not used instead. Defaults to 25%.]]>
+      </description>
+      <property-name>innerStartWidth</property-name>
+      <property-class>java.lang.String</property-class>
+      <default-value>25%</default-value>
+      <property-extension>
+        <mfp:required>false</mfp:required>
+        <mfp:property-metadata>
+          <mfp:preferred>true</mfp:preferred>
+        </mfp:property-metadata>
+      </property-extension>
+    </property>
+    <property>
+      <description>
+        <![CDATA[Specifies the CSS width to give to the inner end facet in valid CSS units.
+        Used if the layout is positioned and the inner end facet is present and rendered and the inner left or right facet
+        is not used instead. Defaults to 25%.]]>
+      </description>
+      <property-name>innerEndWidth</property-name>
+      <property-class>java.lang.String</property-class>
+      <default-value>25%</default-value>
+      <property-extension>
+        <mfp:required>false</mfp:required>
+        <mfp:property-metadata>
+          <mfp:preferred>true</mfp:preferred>
+        </mfp:property-metadata>
+      </property-extension>
+    </property>
+    <property>
+      <description>
+        <![CDATA[Specifies the CSS width to give to the inner left facet in valid CSS units.
+        Used if the layout is positioned and the inner left facet is present and rendered. Defaults to 25%.]]>
+      </description>
+      <property-name>innerLeftWidth</property-name>
+      <property-class>java.lang.String</property-class>
+      <default-value>25%</default-value>
+      <property-extension>
+        <mfp:required>false</mfp:required>
+        <mfp:property-metadata>
+          <mfp:preferred>true</mfp:preferred>
+        </mfp:property-metadata>
+      </property-extension>
+    </property>
+    <property>
+      <description>
+        <![CDATA[Specifies the CSS width to give to the inner right facet in valid CSS units.
+        Used if the layout is positioned and the inner right facet is present and rendered. Defaults to 25%.]]>
+      </description>
+      <property-name>innerRightWidth</property-name>
+      <property-class>java.lang.String</property-class>
+      <default-value>25%</default-value>
+      <property-extension>
+        <mfp:required>false</mfp:required>
+        <mfp:property-metadata>
+          <mfp:preferred>true</mfp:preferred>
+        </mfp:property-metadata>
+      </property-extension>
+    </property>
+
     <xi:include href="includes/CommonAttrs.xml" xpointer="/faces-config/component/*"/>
     <xi:include href="includes/CoreJSEvents.xml" xpointer="/faces-config/component/*"/>
 

Modified: myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-examples/trinidad-demo/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-examples/trinidad-demo/src/main/webapp/WEB-INF/web.xml?rev=645007&r1=645006&r2=645007&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-examples/trinidad-demo/src/main/webapp/WEB-INF/web.xml (original)
+++ myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-examples/trinidad-demo/src/main/webapp/WEB-INF/web.xml Fri Apr  4 18:43:55 2008
@@ -61,12 +61,12 @@
     <param-name>org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE</param-name>
     <param-value>false</param-value>
   </context-param>
-<!-- Uncomment this if you are debugging skinning and want the styleclasses to not be compressed  
+<!-- Uncomment this if you are debugging skinning and want the styleclasses to not be compressed-->  
 <context-param>
  <param-name>org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION</param-name>
  <param-value>true</param-value>
 </context-param>
--->
+<!-- -->
 
   <!-- If this parameter is enabled, Trinidad will automatically
        check the modification date of your JSPs, and discard saved

Modified: myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-examples/trinidad-demo/src/main/webapp/components/panelBorderLayout.jspx
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-examples/trinidad-demo/src/main/webapp/components/panelBorderLayout.jspx?rev=645007&r1=645006&r2=645007&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-examples/trinidad-demo/src/main/webapp/components/panelBorderLayout.jspx (original)
+++ myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-examples/trinidad-demo/src/main/webapp/components/panelBorderLayout.jspx Fri Apr  4 18:43:55 2008
@@ -82,7 +82,56 @@
               </table>
             </f:verbatim>
           </tr:panelBorderLayout>
-          <jsp:directive.include file="editor.jspf"/>
+          <jsp:directive.include file="editor.jspf"/>
+          <tr:panelHeader text="Positioned layout with 90% width:">
+            <tr:panelBorderLayout
+              layout="positioned"
+              inlineStyle="height: 300px; width: 90%; position: relative; border: 2px solid black;">
+              <f:facet name="top">
+                <tr:outputText
+                  value="Top facet"
+                  inlineStyle="position:absolute;display:block;height:100%;width:100%;background-color:#F00;" />
+              </f:facet>
+              <f:facet name="innerTop">
+                <tr:outputText
+                  value="Inner top facet"
+                  inlineStyle="position:absolute;display:block;height:100%;width:100%;background-color:#800;color:white;" />
+              </f:facet>
+              <f:facet name="bottom">
+                <tr:outputText
+                  value="Bottom facet"
+                  inlineStyle="position:absolute;display:block;height:100%;width:100%;background-color:#0F0;" />
+              </f:facet>
+              <f:facet name="innerBottom">
+                <tr:outputText
+                  value="Inner bottom facet"
+                  inlineStyle="position:absolute;display:block;height:100%;width:100%;background-color:#080;color:white;" />
+              </f:facet>
+              <f:facet name="left">
+                <tr:outputText
+                  value="Left facet"
+                  inlineStyle="position:absolute;display:block;height:100%;width:100%;background-color:#00F;color:white;" />
+              </f:facet>
+              <f:facet name="innerLeft">
+                <tr:outputText
+                  value="Inner left facet"
+                  inlineStyle="position:absolute;display:block;height:100%;width:100%;background-color:#008;color:white;" />
+              </f:facet>
+              <f:facet name="right">
+                <tr:outputText
+                  value="Right facet"
+                  inlineStyle="position:absolute;display:block;height:100%;width:100%;background-color:#CCC;" />
+              </f:facet>
+              <f:facet name="innerRight">
+                <tr:outputText
+                  value="Inner right facet"
+                  inlineStyle="position:absolute;display:block;height:100%;width:100%;background-color:#555;color:white;" />
+              </f:facet>
+              <tr:outputText
+                value="Child"
+                inlineStyle="position:absolute;display:block;height:100%;width:100%;background-color:yellow;" />
+            </tr:panelBorderLayout>
+          </tr:panelHeader>
         </tr:panelGroupLayout>
       </tr:form>
     </tr:document>

Modified: myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelBorderLayoutRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelBorderLayoutRenderer.java?rev=645007&r1=645006&r2=645007&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelBorderLayoutRenderer.java (original)
+++ myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelBorderLayoutRenderer.java Fri Apr  4 18:43:55 2008
@@ -25,14 +25,34 @@
 import javax.faces.context.ResponseWriter;
 
 import org.apache.myfaces.trinidad.bean.FacesBean;
+import org.apache.myfaces.trinidad.bean.PropertyKey;
+import org.apache.myfaces.trinidad.bean.FacesBean.Type;
 import org.apache.myfaces.trinidad.component.core.layout.CorePanelBorderLayout;
+import org.apache.myfaces.trinidad.context.Agent;
 import org.apache.myfaces.trinidad.context.RenderingContext;
+import org.apache.myfaces.trinidad.util.ComponentUtils;
+import org.apache.myfaces.trinidadinternal.agent.TrinidadAgent;
+import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.jsLibs.Scriptlet;
 
 /**
  * @version $Name:  $ $
  */
 public class PanelBorderLayoutRenderer extends XhtmlRenderer
 {
+  private PropertyKey _layoutKey;
+  private PropertyKey _topHeightKey;
+  private PropertyKey _innerTopHeightKey;
+  private PropertyKey _bottomHeightKey;
+  private PropertyKey _innerBottomHeightKey;
+  private PropertyKey _leftWidthKey;
+  private PropertyKey _innerLeftWidthKey;
+  private PropertyKey _rightWidthKey;
+  private PropertyKey _innerRightWidthKey;
+  private PropertyKey _startWidthKey;
+  private PropertyKey _innerStartWidthKey;
+  private PropertyKey _endWidthKey;
+  private PropertyKey _innerEndWidthKey;
+  
   public PanelBorderLayoutRenderer()
   {
     super(CorePanelBorderLayout.TYPE);
@@ -43,22 +63,140 @@
   {
     return true;
   }
+  
+  /**
+   * @see org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlRenderer#getDefaultStyleClass(
+   * org.apache.myfaces.trinidad.bean.FacesBean)
+   */
+  @Override
+  protected String getDefaultStyleClass(FacesBean bean)
+  {
+    return "positioned".equals(getLayout(bean)) ? SkinSelectors.AF_PANEL_BORDER_POSITIONED_ROOT_STYLE_CLASS : null;
+  }
+  
+  /**
+   * @see org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlRenderer#shouldRenderId(
+   * javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+   */
+  @Override
+  protected boolean shouldRenderId(FacesContext context, UIComponent component)
+  {
+    return true;
+  }
+  
+  /**
+   * @see org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlRenderer#findTypeConstants(
+   * org.apache.myfaces.trinidad.bean.FacesBean.Type)
+   */
+  @Override
+  protected void findTypeConstants(Type type)
+  {
+    super.findTypeConstants(type);
+    _layoutKey = type.findKey("layout");
+    _topHeightKey = type.findKey("topHeight");
+    _innerTopHeightKey = type.findKey("innerTopHeight");
+    _bottomHeightKey = type.findKey("bottomHeight");
+    _innerBottomHeightKey = type.findKey("innerBottomHeight");
+    _leftWidthKey = type.findKey("leftWidth");
+    _innerLeftWidthKey = type.findKey("innerLeftWidth");
+    _rightWidthKey = type.findKey("rightWidth");
+    _innerRightWidthKey = type.findKey("innerRightWidth");
+    _startWidthKey = type.findKey("startWidth");
+    _innerStartWidthKey = type.findKey("innerStartWidth");
+    _endWidthKey = type.findKey("endWidth");
+    _innerEndWidthKey = type.findKey("innerEndWidth");
+  }
+  
+  protected String getLayout(FacesBean bean)
+  {
+    return ComponentUtils.resolveString(bean.getProperty(_layoutKey), (String)_layoutKey.getDefault());
+  }
+  
+  protected String getTopHeight(FacesBean bean)
+  {
+    return ComponentUtils.resolveString(bean.getProperty(_topHeightKey), (String)_topHeightKey.getDefault());
+  }
+  
+  protected String getinnerTopHeight(FacesBean bean)
+  {
+    return ComponentUtils.resolveString(bean.getProperty(_innerTopHeightKey), (String)_innerTopHeightKey.getDefault());
+  }
+  
+  protected String getBottomHeight(FacesBean bean)
+  {
+    return ComponentUtils.resolveString(bean.getProperty(_bottomHeightKey), (String)_bottomHeightKey.getDefault());
+  }
+  
+  protected String getinnerBottomHeight(FacesBean bean)
+  {
+    return ComponentUtils.resolveString(bean.getProperty(_innerBottomHeightKey), (String)_innerBottomHeightKey.getDefault());
+  }
+  
+  protected String getLeftWidth(FacesBean bean)
+  {
+    return ComponentUtils.resolveString(bean.getProperty(_leftWidthKey), (String)_leftWidthKey.getDefault());
+  }
+  
+  protected String getinnerLeftWidth(FacesBean bean)
+  {
+    return ComponentUtils.resolveString(bean.getProperty(_innerLeftWidthKey), (String)_innerLeftWidthKey.getDefault());
+  }
+  
+  protected String getRightWidth(FacesBean bean)
+  {
+    return ComponentUtils.resolveString(bean.getProperty(_rightWidthKey), (String)_rightWidthKey.getDefault());
+  }
+  
+  protected String getinnerRightWidth(FacesBean bean)
+  {
+    return ComponentUtils.resolveString(bean.getProperty(_innerRightWidthKey), (String)_innerRightWidthKey.getDefault());
+  }
+  
+  protected String getEndWidth(FacesBean bean)
+  {
+    return ComponentUtils.resolveString(bean.getProperty(_endWidthKey), (String)_endWidthKey.getDefault());
+  }
+  
+  protected String getEndInnerWidth(FacesBean bean)
+  {
+    return ComponentUtils.resolveString(bean.getProperty(_innerEndWidthKey), (String)_innerEndWidthKey.getDefault());
+  }
+  
+  protected String getStartWidth(FacesBean bean)
+  {
+    return ComponentUtils.resolveString(bean.getProperty(_startWidthKey), (String)_startWidthKey.getDefault());
+  }
+  
+  protected String getStartInnerWidth(FacesBean bean)
+  {
+    return ComponentUtils.resolveString(bean.getProperty(_innerStartWidthKey), (String)_innerStartWidthKey.getDefault());
+  }
 
   @Override
   protected void encodeAll(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
-    boolean hasSideFacets = _hasSideFacets(arc, component);
-    if (hasSideFacets)
+    String layout = getLayout(bean);
+    
+    if ("positioned".equals(layout))
     {
-      _encodeAllWithSideFacets(context, arc, component, bean);
-    } 
+      _encodeAllPositioned(context, rc, component, bean);
+    }
     else
     {
-      _encodeAllInDiv(context, arc, component, bean);
+      boolean hasSideFacets = _hasSideFacets(rc, component);
+      if (hasSideFacets)
+      {
+        _encodeAllWithSideFacets(context, rc, component, bean);
+      }
+      else
+      {
+        _encodeAllInDiv(context, rc, component, bean);
+      }
     }
   }
 
@@ -79,7 +217,6 @@
             (getFacet(component, CorePanelBorderLayout.INNER_END_FACET) != null));
   }
 
-
   protected void _encodeAllWithSideFacets(
     FacesContext        context,
     RenderingContext arc,
@@ -181,8 +318,8 @@
       rw.endElement("tr");
     }
 
-    /* render the inner bottom child. start a new TR only if the 
-       right side nodes have been rendered, and render the 
+    /* render the inner bottom child. start a new TR only if the
+       right side nodes have been rendered, and render the
        right side nodes if they have not been rendered.  */
     isRightSideRendered |=
       _renderMiddleFacet(context, arc, component,
@@ -192,7 +329,7 @@
 
     /* if a right hand side still has not been rendered then we need
        to render it here */
-    if (!isRightSideRendered) 
+    if (!isRightSideRendered)
     {
       _renderRightFacets(context, arc, component, rowSpan);
       rw.endElement("tr");
@@ -204,7 +341,7 @@
     UIComponent bottomFacet = getFacet(component,
                                        CorePanelBorderLayout.BOTTOM_FACET);
     if (bottomFacet != null)
-    {       
+    {
       rw.startElement("tr", null);
       _renderMarginSpacer(context, arc, null);
         
@@ -220,7 +357,6 @@
     rw.endElement("table");
   }
 
-
   protected void _encodeAllInDiv(
     FacesContext        context,
     RenderingContext arc,
@@ -285,7 +421,6 @@
     writer.endElement("td");
   }
 
-
   private boolean _renderMiddleFacet(FacesContext context,
                                      RenderingContext arc,
                                      UIComponent component,
@@ -299,7 +434,7 @@
     UIComponent middleFacet = getFacet(component, middleFacetName);
     if (middleFacet != null)
     {
-      if (startTableRow) 
+      if (startTableRow)
         writer.startElement("tr", null);
     
       _renderInnerFacet(context, middleFacet);
@@ -358,7 +493,6 @@
     return facetRendered;
   }
   
-
   /**
    * Renders one of the inner nodes.
    */
@@ -375,7 +509,6 @@
     writer.endElement("td");
   }
 
-
   private void _renderMarginSpacer(
     FacesContext     context,
     RenderingContext arc,
@@ -392,7 +525,6 @@
       renderSpacer(context, arc, spacerWidth.toString(), "0");
     writer.endElement("td");
   }
-    
 
   /**
    * Returns the row span to use for the left and right children
@@ -416,7 +548,6 @@
     return (rowSpan > 0) ? rowSpan : null;
   }
 
-
   /**
    * Returns the column span to use for the top and bottom children.
    */
@@ -431,13 +562,13 @@
     // increment the colspan if we have a left side node
     if (getFacet(component, _getSideFacet(component, arc, true)) != null)
     {
-      colSpan++;      
+      colSpan++;
     }
 
     // increment the colspan if we have an inner left side node
     if (getFacet(component, _getInnerSideFacet(component, arc, true)) != null)
     {
-      colSpan++;      
+      colSpan++;
     }
 
     // increment the colspan if we have any center nodes.
@@ -462,7 +593,6 @@
     return (colSpan > 0) ? colSpan : null;
   }
 
-
   /**
    * Returns the name of the node to use for the left or right side of the
    * layout, following bi-di rules.
@@ -504,7 +634,6 @@
     return exactName;
   }
 
-
   /**
    * Returns the name of the node to use for the left or right side of the
    * layout, following bi-di rules.
@@ -545,4 +674,378 @@
 
     return exactName;
   }
+  
+  /**
+   * Encode the panel for a positioned layout
+   */
+  private void _encodeAllPositioned(
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
+  {
+    ResponseWriter writer = context.getResponseWriter();
+    
+    // IE6 does not support stretching by setting both top & bottom or left & right,
+    // so we have to use some ugly code.
+    TrinidadAgent agent = (TrinidadAgent)rc.getAgent();
+    boolean isIE6 = Agent.AGENT_IE.equals(agent.getAgentName()) &&
+      agent.getAgentMajorVersion() == 6;
+    if (isIE6)
+    {
+      // send down the JS that we need to stretch the components
+      XhtmlUtils.addLib(context, rc, IE6_SCRIPT.getScriptletKey());
+    }
+    
+    writer.startElement("div", component);
+    renderId(context, component);
+    if (isIE6)
+    {
+      writer.writeAttribute("onresize", "TrPanelBorderLayoutResizeIE6(this)", null);
+    }
+    renderAllAttributes(context, rc, bean);
+        
+    UIComponent topFacet = getFacet(component, CorePanelBorderLayout.TOP_FACET);
+    UIComponent bottomFacet = getFacet(component, CorePanelBorderLayout.BOTTOM_FACET);
+    UIComponent leftFacet = getFacet(component, CorePanelBorderLayout.LEFT_FACET);
+    UIComponent rightFacet = getFacet(component, CorePanelBorderLayout.RIGHT_FACET);
+    UIComponent innerTopFacet = getFacet(component, CorePanelBorderLayout.INNER_TOP_FACET);
+    UIComponent innerBottomFacet = getFacet(component, CorePanelBorderLayout.INNER_BOTTOM_FACET);
+    UIComponent innerLeftFacet = getFacet(component, CorePanelBorderLayout.INNER_LEFT_FACET);
+    UIComponent innerRightFacet = getFacet(component, CorePanelBorderLayout.INNER_RIGHT_FACET);
+    
+    // Don't make room for non-rendered facets
+    if (topFacet != null && !topFacet.isRendered()) topFacet = null;
+    if (bottomFacet != null && !bottomFacet.isRendered()) bottomFacet = null;
+    if (innerTopFacet != null && !innerTopFacet.isRendered()) innerTopFacet = null;
+    if (innerBottomFacet != null && !innerBottomFacet.isRendered()) innerBottomFacet = null;
+    
+    boolean useLR = leftFacet != null || rightFacet != null
+      || innerLeftFacet != null || innerRightFacet != null;
+    boolean ltr = !rc.isRightToLeft();
+    
+    if (!useLR)
+    {
+      leftFacet = getFacet(component, ltr ?
+        CorePanelBorderLayout.START_FACET : CorePanelBorderLayout.END_FACET);
+      innerLeftFacet = getFacet(component, ltr ?
+        CorePanelBorderLayout.INNER_START_FACET : CorePanelBorderLayout.INNER_END_FACET);
+      rightFacet = getFacet(component, ltr ?
+        CorePanelBorderLayout.END_FACET : CorePanelBorderLayout.START_FACET);
+      innerRightFacet = getFacet(component, ltr ?
+        CorePanelBorderLayout.INNER_END_FACET : CorePanelBorderLayout.INNER_START_FACET);
+    }
+    // Don't make room for non-rendered facets
+    if (innerLeftFacet != null && !innerLeftFacet.isRendered()) innerLeftFacet = null;
+    if (innerRightFacet != null && !innerRightFacet.isRendered()) innerRightFacet = null;
+    if (innerLeftFacet != null && !innerLeftFacet.isRendered()) innerLeftFacet = null;
+    if (innerRightFacet != null && !innerRightFacet.isRendered()) innerRightFacet = null;
+    
+    String topHeight = (topFacet == null) ? "0px" : getTopHeight(bean);
+    String innerTopHeight = (innerTopFacet == null) ? "0px" : getinnerTopHeight(bean);
+    String bottomHeight = (bottomFacet == null) ? "0px" : getBottomHeight(bean);
+    String innerBottomHeight = (innerBottomFacet == null) ? "0px" : getinnerBottomHeight(bean);
+    String leftWidth = (leftFacet == null) ? "0px" :
+      (useLR ? getLeftWidth(bean) : (ltr ? getStartWidth(bean) : getEndWidth(bean)));
+    String rightWidth = (rightFacet == null) ? "0px" :
+      (useLR ? getRightWidth(bean) : (ltr ? getEndWidth(bean) : getStartWidth(bean)));
+    String innerLeftWidth = (innerLeftFacet == null) ? "0px" :
+      (useLR ? getinnerLeftWidth(bean) :
+        (ltr ? getStartInnerWidth(bean) : getEndInnerWidth(bean)));
+    String innerRightWidth = (innerRightFacet == null) ? "0px" :
+      (useLR ? getinnerRightWidth(bean) :
+        (ltr ? getEndInnerWidth(bean) : getStartInnerWidth(bean)));
+    
+    String clientId = component.getClientId(context);
+    
+    _encodePositionedFacetGroup(context, rc, bean, writer, clientId, component,
+      topFacet, topHeight,
+      rightFacet, rightWidth,
+      bottomFacet, bottomHeight,
+      leftFacet, leftWidth,
+      false, useLR, isIE6, ltr);
+    
+    writer.startElement("div", null);
+    writer.writeAttribute("id", _createSubId(clientId, "center"), null);
+    writer.writeAttribute("style", _buildPositionedCenterCss(
+      topHeight, bottomHeight, leftWidth, rightWidth, isIE6), null);
+    renderStyleClass(context, rc, SkinSelectors.AF_PANEL_BORDER_POSITIONED_CENTER_STYLE_CLASS);
+    
+    _encodePositionedFacetGroup(context, rc, bean, writer, clientId, component,
+      innerTopFacet, innerTopHeight,
+      innerRightFacet, innerRightWidth,
+      innerBottomFacet, innerBottomHeight,
+      innerLeftFacet, innerLeftWidth,
+      true, useLR, isIE6, ltr);
+
+    writer.startElement("div", null);
+    writer.writeAttribute("id", _createSubId(clientId, "innerCenter"), null);
+    writer.writeAttribute("style", _buildPositionedCenterCss(
+      innerTopHeight, innerBottomHeight, innerLeftWidth, innerRightWidth, isIE6), null);
+    renderStyleClass(context, rc, SkinSelectors.AF_PANEL_BORDER_POSITIONED_INNER_CENTER_STYLE_CLASS);
+
+    encodeAllChildren(context, component);
+    
+    writer.endElement("div");
+    writer.endElement("div");
+    writer.endElement("div");
+    
+    if (isIE6)
+    {
+      // force the resize code to run at earliest moment
+      writer.startElement(XhtmlConstants.SCRIPT_ELEMENT, null);
+      renderScriptDeferAttribute(context, rc);
+      renderScriptTypeAttribute(context, rc);
+      writer.writeText(
+        new StringBuilder(clientId.length() + 58)
+          .append("TrPanelBorderLayoutResizeIE6(document.getElementById('")
+          .append(clientId)
+          .append("'));").toString(), null);
+      writer.endElement(XhtmlConstants.SCRIPT_ELEMENT);
+    }
+  }
+  
+  private String _buildPositionedCenterCss(
+    String topHeight,
+    String bottomHeight,
+    String leftWidth,
+    String rightWidth,
+    boolean isIE6)
+  {
+    return isIE6 ?
+      new StringBuilder(10 + topHeight.length() + leftWidth.length())
+        .append("top:") // 4
+        .append(topHeight)
+        .append(";left:") // 6
+        .append(leftWidth)
+        .toString()
+      :
+      new StringBuilder(25 + topHeight.length() + leftWidth.length() +
+        rightWidth.length() + bottomHeight.length())
+        .append("top:") // 4
+        .append(topHeight)
+        .append(";bottom:") // 8
+        .append(bottomHeight)
+        .append(";left:") // 6
+        .append(leftWidth)
+        .append(";right:") // 7
+        .append(rightWidth)
+        .toString();
+  }
+  
+  private void _encodePositionedFacetGroup(
+    FacesContext     context,
+    RenderingContext rc,
+    FacesBean        bean,
+    ResponseWriter   writer,
+    String           clientId,
+    UIComponent      component,
+    UIComponent      topFacet,
+    String           topHeight,
+    UIComponent      rightFacet,
+    String           rightWidth,
+    UIComponent      bottomFacet,
+    String           bottomHeight,
+    UIComponent      leftFacet,
+    String           leftWidth,
+    boolean          isInner,
+    boolean          useLR,
+    boolean          isIE6,
+    boolean          ltr
+    ) throws IOException
+  {
+    if (topFacet != null)
+    {
+      _encodePositionedHeightFacet(context, rc, topFacet, bean, writer, clientId, topHeight,
+        isInner ? SkinSelectors.AF_PANEL_BORDER_POSITIONED_INNER_TOP_STYLE_CLASS :
+          SkinSelectors.AF_PANEL_BORDER_POSITIONED_TOP_STYLE_CLASS,
+        isInner, true, isIE6);
+    }
+    if (leftFacet != null)
+    {
+      _encodePositionedWidthFacet(context, rc, leftFacet, bean, writer, clientId, leftWidth,
+        topHeight, bottomHeight,
+        (isInner ?
+          (ltr ? SkinSelectors.AF_PANEL_BORDER_POSITIONED_INNER_START_STYLE_CLASS :
+            SkinSelectors.AF_PANEL_BORDER_POSITIONED_INNER_END_STYLE_CLASS)
+          : (ltr ? SkinSelectors.AF_PANEL_BORDER_POSITIONED_START_STYLE_CLASS :
+            SkinSelectors.AF_PANEL_BORDER_POSITIONED_END_STYLE_CLASS)),
+        isInner, true, isIE6);
+    }
+    if (rightFacet != null)
+    {
+      _encodePositionedWidthFacet(context, rc, rightFacet, bean, writer, clientId, rightWidth,
+        topHeight, bottomHeight,
+        (isInner ?
+          (ltr ? SkinSelectors.AF_PANEL_BORDER_POSITIONED_INNER_END_STYLE_CLASS :
+            SkinSelectors.AF_PANEL_BORDER_POSITIONED_INNER_START_STYLE_CLASS)
+          : (ltr ? SkinSelectors.AF_PANEL_BORDER_POSITIONED_END_STYLE_CLASS :
+            SkinSelectors.AF_PANEL_BORDER_POSITIONED_START_STYLE_CLASS)),
+        isInner, false, isIE6);
+    }
+    if (bottomFacet != null)
+    {
+      _encodePositionedHeightFacet(context, rc, bottomFacet, bean, writer, clientId, bottomHeight,
+        isInner ? SkinSelectors.AF_PANEL_BORDER_POSITIONED_INNER_BOTTOM_STYLE_CLASS :
+          SkinSelectors.AF_PANEL_BORDER_POSITIONED_BOTTOM_STYLE_CLASS,
+        isInner, false, isIE6);
+    }
+  }
+  
+  private String _createSubId(
+    String clientId,
+    String name)
+  {
+    return new StringBuilder(clientId.length() + name.length() + 2)
+      .append(clientId)
+      .append("::")
+      .append(name)
+      .toString();
+  }
+  
+  private void _encodePositionedHeightFacet(
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean,
+    ResponseWriter   writer,
+    String           clientId,
+    String           cssHeight,
+    String           cssClass,
+    boolean          isInner,
+    boolean          isTop,
+    boolean          isIE6
+    ) throws IOException
+  {
+    writer.startElement("div", null);
+    writer.writeAttribute("id", _createSubId(clientId,
+      isInner ? (isTop ? "innerTop" : "innerBottom") : (isTop ? "top" : "bottom")), null);
+    renderStyleClass(context, rc, cssClass);
+    String style = new StringBuilder(7 + cssHeight.length())
+      .append("height:") // 7 chars
+      .append(cssHeight)
+      .toString();
+    renderInlineStyleAttribute(context, rc, style);
+    encodeChild(context, component);
+    writer.endElement("div");
+  }
+  
+  private void _encodePositionedWidthFacet(
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean,
+    ResponseWriter   writer,
+    String           clientId,
+    String           cssWidth,
+    String           cssTopHeight,
+    String           cssBottomHeight,
+    String           cssClass,
+    boolean          isInner,
+    boolean          isLeft,
+    boolean          isIE6
+    ) throws IOException
+  {
+    writer.startElement("div", null);
+    writer.writeAttribute("id", _createSubId(clientId,
+      isInner ? (isLeft ? "innerLeft" : "innerRight") : (isLeft ? "left" : "right")), null);
+    renderStyleClass(context, rc, cssClass);
+    String style;
+    
+    if (isIE6)
+    {
+      style = new StringBuilder(11 + cssTopHeight.length() + cssWidth.length())
+        .append("width:") // 6 chars
+        .append(cssWidth)
+        .append(";top:") // 5 chars
+        .append(cssTopHeight)
+        .toString();
+    }
+    else
+    {
+      style = new StringBuilder(19 + cssTopHeight.length() + cssBottomHeight.length() +
+          cssWidth.length())
+          .append("width:") // 6 chars
+          .append(cssWidth)
+          .append(";top:") // 5 chars
+          .append(cssTopHeight)
+          .append(";bottom:") // 8 chars
+          .append(cssBottomHeight)
+          .toString();
+    }
+    renderInlineStyleAttribute(context, rc, style);
+    encodeChild(context, component);
+    writer.endElement("div");
+  }
+  
+  // Since IE6 cannot stretch components using docking, we are forced to use
+  // JavaScript to do the dirty work
+  private static final Scriptlet IE6_SCRIPT = new Scriptlet()
+  {
+    private static final String IE_JS_CODE =
+      "function TrPanelBorderLayoutResizeIE6(elem)\n" +
+      "{\n" +
+      "  var id = elem.id;\n" +
+      "  var innerElems = elem._trInnerElems;\n" +
+      "  if (innerElems == null)\n" +
+      "  {\n" +
+      "    innerElems = elem._trInnerElems = new Array(\n" +
+      "      document.getElementById(id + '::top'),\n" +
+      "      document.getElementById(id + '::bottom'),\n" +
+      "      document.getElementById(id + '::left'),\n" +
+      "      document.getElementById(id + '::right'),\n" +
+      "      document.getElementById(id + '::center'),\n" +
+      "      document.getElementById(id + '::innerTop'),\n" +
+      "      document.getElementById(id + '::innerBottom'),\n" +
+      "      document.getElementById(id + '::innerLeft'),\n" +
+      "      document.getElementById(id + '::innerRight'),\n" +
+      "      document.getElementById(id + '::innerCenter'));\n" +
+      "  }\n" +
+      "  var topHeight = innerElems[0] ? innerElems[0].offsetHeight : 0;\n" +
+      "  var bottomHeight = innerElems[1] ? innerElems[1].offsetHeight : 0;\n" +
+      "  var leftWidth = innerElems[2] ? innerElems[2].offsetWidth : 0;\n" +
+      "  var rightWidth = innerElems[3] ? innerElems[3].offsetWidth : 0;\n" +
+      "  var center = innerElems[4];\n" +
+      "  var innerCenter = innerElems[9];\n" +
+      "  var width = elem.clientWidth;\n" +
+      "  var height = elem.clientHeight;\n" +
+      "  var centerHeight = (height - topHeight - bottomHeight);\n" +
+      "  var centerWidth = (width - leftWidth - rightWidth);\n" +
+      "  center.style.height = centerHeight + 'px';\n" +
+      "  center.style.width = centerWidth + 'px';\n" +
+      "  if (innerElems[2]) innerElems[2].style.height = centerHeight + 'px';\n" +
+      "  if (innerElems[3]) innerElems[3].style.height = centerHeight + 'px';\n" +
+      "  var innerTopHeight = innerElems[5] ? innerElems[5].offsetHeight : 0;\n" +
+      "  var innerBottomHeight = innerElems[6] ? innerElems[6].offsetHeight : 0;\n" +
+      "  var innerLeftWidth = innerElems[7] ? innerElems[7].offsetWidth : 0;\n" +
+      "  var innerRightWidth = innerElems[8] ? innerElems[8].offsetWidth : 0;\n" +
+      "  var innerCenterHeight = (centerHeight - innerTopHeight - innerBottomHeight);\n" +
+      "  var innerCenterWidth = (centerWidth - innerLeftWidth - innerRightWidth);\n" +
+      "  innerCenter.style.height = innerCenterHeight + 'px';\n" +
+      "  innerCenter.style.width = innerCenterWidth + 'px';\n" +
+      "  if (innerElems[7]) innerElems[7].style.height = innerCenterHeight + 'px';\n" +
+      "  if (innerElems[8]) innerElems[8].style.height = innerCenterHeight + 'px';\n" +
+      "}";
+    
+    @Override
+    public Object getScriptletKey()
+    {
+      return "TrPanelBorderLayoutResizeIE6()";
+    };
+    
+    @Override
+    protected void outputScriptletContent(
+      FacesContext context,
+      RenderingContext rc
+      ) throws IOException
+    {
+      context.getResponseWriter().writeText(IE_JS_CODE, null);
+    };
+  };
+  
+  static
+  {
+    XhtmlUtils.registerScriptlet(IE6_SCRIPT.getScriptletKey(), IE6_SCRIPT);
+  };
 }

Modified: myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java?rev=645007&r1=645006&r2=645007&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java (original)
+++ myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java Fri Apr  4 18:43:55 2008
@@ -19,7 +19,7 @@
 package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml;
 
 /**
- * This class contains all skin selectors used by the various Trinidad 
+ * This class contains all skin selectors used by the various Trinidad
  * components.
  * 
  */
@@ -31,12 +31,12 @@
   
   private SkinSelectors(){}
 
-  /* The selectors are sorted by component, alphabetically. 
+  /* The selectors are sorted by component, alphabetically.
    * 
-   * The selectors not linked to any specific components like aliases are 
+   * The selectors not linked to any specific components like aliases are
    * presented before any component specific selectors.
    * 
-   * The selector regarding the style classes are presented first, the 
+   * The selector regarding the style classes are presented first, the
    * selectors concerning the icons are presented after.
    */
   //                                                                         //
@@ -61,17 +61,17 @@
    "AFAccessKeyStyle";
   public static final String AF_LINKACCESSKEY_STYLE_CLASS =
    "AFLinkAccessKeyStyle";
-  public static final String ERROR_ICON_STYLE_CLASS = 
+  public static final String ERROR_ICON_STYLE_CLASS =
     "AFErrorIconStyle";
-  public static final String INFO_ICON_STYLE_CLASS = 
+  public static final String INFO_ICON_STYLE_CLASS =
     "AFInfoIconStyle";
-  public static final String WARNING_ICON_STYLE_CLASS = 
+  public static final String WARNING_ICON_STYLE_CLASS =
     "AFWarningIconStyle";
-  public static final String QUICK_SELECT_DISABLED_ICON_STYLE_CLASS = 
+  public static final String QUICK_SELECT_DISABLED_ICON_STYLE_CLASS =
     "AFQuickSelectDisabledIconStyle";
-  public static final String QUICK_SELECT_ICON_STYLE_CLASS = 
+  public static final String QUICK_SELECT_ICON_STYLE_CLASS =
     "AFQuickSelectIconStyle";
-  public static final String REQUIRED_ICON_STYLE_CLASS = 
+  public static final String REQUIRED_ICON_STYLE_CLASS =
     "AFRequiredIconStyle";
   public static final String SORTABLE_HEADER_SORT_ICON_STYLE_CLASS =
     "AFSortableHeaderSortIcon";
@@ -109,41 +109,41 @@
     "OraPageStampText";
   public static final String TABLE_BAND_SELECT_CELL_STYLE =
     "OraTableCellSelectBand";
-  public static final String TABLE_BORDER_0001_STYLE = 
+  public static final String TABLE_BORDER_0001_STYLE =
     "OraTableBorder0001";
-  public static final String TABLE_BORDER_0010_STYLE = 
+  public static final String TABLE_BORDER_0010_STYLE =
     "OraTableBorder0010";
-  public static final String TABLE_BORDER_0011_STYLE = 
+  public static final String TABLE_BORDER_0011_STYLE =
     "OraTableBorder0011";
-  public static final String TABLE_BORDER_0100_STYLE = 
+  public static final String TABLE_BORDER_0100_STYLE =
     "OraTableBorder0100";
-  public static final String TABLE_BORDER_0101_STYLE = 
+  public static final String TABLE_BORDER_0101_STYLE =
     "OraTableBorder0101";
-  public static final String TABLE_BORDER_0110_STYLE = 
+  public static final String TABLE_BORDER_0110_STYLE =
     "OraTableBorder0110";
-  public static final String TABLE_BORDER_0111_STYLE = 
+  public static final String TABLE_BORDER_0111_STYLE =
     "OraTableBorder0111";
-  public static final String TABLE_BORDER_1000_STYLE = 
+  public static final String TABLE_BORDER_1000_STYLE =
     "OraTableBorder1000";
-  public static final String TABLE_BORDER_1001_STYLE = 
+  public static final String TABLE_BORDER_1001_STYLE =
     "OraTableBorder1001";
-  public static final String TABLE_BORDER_1010_STYLE = 
+  public static final String TABLE_BORDER_1010_STYLE =
     "OraTableBorder1010";
-  public static final String TABLE_BORDER_1011_STYLE = 
+  public static final String TABLE_BORDER_1011_STYLE =
     "OraTableBorder1011";
-  public static final String TABLE_BORDER_1100_STYLE = 
+  public static final String TABLE_BORDER_1100_STYLE =
     "OraTableBorder1100";
-  public static final String TABLE_BORDER_1101_STYLE = 
+  public static final String TABLE_BORDER_1101_STYLE =
     "OraTableBorder1101";
-  public static final String TABLE_BORDER_1110_STYLE = 
+  public static final String TABLE_BORDER_1110_STYLE =
     "OraTableBorder1110";
-  public static final String TABLE_BORDER_1111_STYLE = 
+  public static final String TABLE_BORDER_1111_STYLE =
     "OraTableBorder1111";
   public static final String TABLE_SELECT_CELL_STYLE =
     "OraTableCellSelect";
-  public static final String TIP_TEXT_STYLE_CLASS = 
+  public static final String TIP_TEXT_STYLE_CLASS =
     "OraTipText";
-  public static final String TIP_LABEL_STYLE_CLASS  = 
+  public static final String TIP_LABEL_STYLE_CLASS  =
     "OraTipLabel";
 
 
@@ -152,7 +152,7 @@
     "p_OraColorFieldSwatch";
   public static final String DISABLED_STYLE_CLASS =
     "p_OraDisabled";
-  public static final String HEADER_NEST_STYLE_CLASS = 
+  public static final String HEADER_NEST_STYLE_CLASS =
     "p_OraHeaderNest";
   public static final String HIDDEN_LABEL_STYLE_CLASS =
     "p_OraHiddenLabel";
@@ -164,17 +164,17 @@
     "p_OraProcessingStatus";
   public static final String QUICK_SEARCH_BOX_STYLE_CLASS =
     "p_OraQuickSearchBox";
-  public static final String STATE_DISABLED = 
+  public static final String STATE_DISABLED =
     STATE_PREFIX + "Disabled";
-  public static final String STATE_READ_ONLY = 
+  public static final String STATE_READ_ONLY =
     STATE_PREFIX + "ReadOnly";
-  public static final String STATE_REQUIRED = 
+  public static final String STATE_REQUIRED =
     STATE_PREFIX + "Required";
-  public static final String P_AF_DISABLED = 
+  public static final String P_AF_DISABLED =
     STATE_DISABLED;
 
   // ================================ Icons ================================ //
-  public static final String BUSY_ICON_ALIAS_NAME = 
+  public static final String BUSY_ICON_ALIAS_NAME =
     "AFBusyIcon";
   public static final String DETAIL_DISCLOSED_ICON_ALIAS_NAME =
     "AFDetailDisclosedIcon";
@@ -204,7 +204,7 @@
     "AFQuickSelectDisabledIcon";
   public static final String QUICK_SELECT_ICON_NAME =
     "AFQuickSelectIcon";
-  public static final String READY_ICON_ALIAS_NAME = 
+  public static final String READY_ICON_ALIAS_NAME =
     "AFReadyIcon";
   public static final String REQUIRED_ICON_ALIAS_NAME =
     "AFRequiredIcon";
@@ -229,15 +229,15 @@
   //                                                                         //
   private static final String AF_DIALOG_ROOT_STYLE_CLASS = "af|dialog";
 
-  public static final String AF_DIALOG_CONTAINER_STYLE_CLASS = 
+  public static final String AF_DIALOG_CONTAINER_STYLE_CLASS =
     AF_DIALOG_ROOT_STYLE_CLASS + "::container";
-  public static final String AF_DIALOG_CONTENT_STYLE_CLASS = 
+  public static final String AF_DIALOG_CONTENT_STYLE_CLASS =
     AF_DIALOG_ROOT_STYLE_CLASS + "::content";
-  public static final String AF_DIALOG_TITLEBAR_STYLE_CLASS = 
+  public static final String AF_DIALOG_TITLEBAR_STYLE_CLASS =
     AF_DIALOG_ROOT_STYLE_CLASS + "::title-bar";
-  public static final String AF_DIALOG_TITLE_STYLE_CLASS = 
+  public static final String AF_DIALOG_TITLE_STYLE_CLASS =
     AF_DIALOG_ROOT_STYLE_CLASS + "::title-text";
-  public static final String AF_DIALOG_CLOSE_ICON_STYLE_CLASS = 
+  public static final String AF_DIALOG_CLOSE_ICON_STYLE_CLASS =
     AF_DIALOG_ROOT_STYLE_CLASS + "::close-icon";
   public static final String AF_DIALOG_BLOCKED_AREA_STYLE_CLASS =
     AF_DIALOG_ROOT_STYLE_CLASS + "::blocked-area";
@@ -498,11 +498,11 @@
      "af|menuBar::disabled";
    public static final String AF_MENU_BAR_ENABLED_STYLE_CLASS =
      "af|menuBar::enabled";
-   public static final String AF_MENU_BAR_EMPTY_STYLE_CLASS = 
+   public static final String AF_MENU_BAR_EMPTY_STYLE_CLASS =
      "af|menuBar::empty";
-   public static final String AF_MENU_BAR_BODY_STYLE_CLASS = 
+   public static final String AF_MENU_BAR_BODY_STYLE_CLASS =
      "af|menuBar::body";
-   public static final String AF_MENU_BAR_TITLE_STYLE_CLASS = 
+   public static final String AF_MENU_BAR_TITLE_STYLE_CLASS =
      "af|menuBar::title";
    public static final String AF_MENU_BAR_SELECTED_STYLE_CLASS =
      "af|menuBar::selected";
@@ -569,7 +569,7 @@
    // ============================ Style classes ============================ //
    public static final String AF_MESSAGES_STYLE_CLASS =
      "af|messages";
-   public static final String AF_MESSAGES_BODY_STYLE_CLASS = 
+   public static final String AF_MESSAGES_BODY_STYLE_CLASS =
      "af|messages::body";
    public static final String AF_MESSAGES_ERROR_STYLE_CLASS =
      "af|messages::error";
@@ -730,13 +730,13 @@
    //                                                                         //
    
    // ============================ Style classes ============================ //
-   public static final String AF_OUTPUT_DOCUMENT_STYLE_CLASS = 
+   public static final String AF_OUTPUT_DOCUMENT_STYLE_CLASS =
      "af|outputDocument";
-   public static final String AF_OUTPUT_DOCUMENT_PARAGRAPH_STYLE_CLASS = 
+   public static final String AF_OUTPUT_DOCUMENT_PARAGRAPH_STYLE_CLASS =
      "af|outputDocument::paragraph";
-   public static final String AF_OUTPUT_DOCUMENT_SEPARATOR_STYLE_CLASS = 
+   public static final String AF_OUTPUT_DOCUMENT_SEPARATOR_STYLE_CLASS =
      "af|outputDocument::separator";
-   public static final String AF_OUTPUT_DOCUMENT_TITLE_STYLE_CLASS = 
+   public static final String AF_OUTPUT_DOCUMENT_TITLE_STYLE_CLASS =
      "af|outputDocument::title";
 
    
@@ -765,6 +765,34 @@
    public static final String AF_PANELACCORDION_TOOLBAR_STYLE_CLASS =
      "af|panelAccordion::toolbar";
 
+   
+   //                                                                         //
+   //                                                                         //
+   // ============================= tr:panelBorderLayout ==================== //
+   //                                                                         //
+   //                                                                         //
+   public static final String AF_PANEL_BORDER_POSITIONED_ROOT_STYLE_CLASS =
+     "af|panelBorderLayout-positioned";
+   public static final String AF_PANEL_BORDER_POSITIONED_TOP_STYLE_CLASS =
+     "af|panelBorderLayout-positioned::top";
+   public static final String AF_PANEL_BORDER_POSITIONED_INNER_TOP_STYLE_CLASS =
+     "af|panelBorderLayout-positioned::inner-top";
+   public static final String AF_PANEL_BORDER_POSITIONED_BOTTOM_STYLE_CLASS =
+     "af|panelBorderLayout-positioned::bottom";
+   public static final String AF_PANEL_BORDER_POSITIONED_INNER_BOTTOM_STYLE_CLASS =
+     "af|panelBorderLayout-positioned::inner-bottom";
+   public static final String AF_PANEL_BORDER_POSITIONED_START_STYLE_CLASS =
+     "af|panelBorderLayout-positioned::start";
+   public static final String AF_PANEL_BORDER_POSITIONED_INNER_START_STYLE_CLASS =
+     "af|panelBorderLayout-positioned::inner-start";
+   public static final String AF_PANEL_BORDER_POSITIONED_END_STYLE_CLASS =
+     "af|panelBorderLayout-positioned::end";
+   public static final String AF_PANEL_BORDER_POSITIONED_INNER_END_STYLE_CLASS =
+     "af|panelBorderLayout-positioned::inner-end";
+   public static final String AF_PANEL_BORDER_POSITIONED_CENTER_STYLE_CLASS =
+     "af|panelBorderLayout-positioned::center";
+   public static final String AF_PANEL_BORDER_POSITIONED_INNER_CENTER_STYLE_CLASS =
+     "af|panelBorderLayout-positioned::inner-center";
 
    //                                                                         //
    //                                                                         //
@@ -946,7 +974,7 @@
    // ============================ Style classes ============================ //
    public static final String AF_PANEL_SIDE_BAR_STYLE_CLASS =
      "af|panelSideBar";
-   public static final String AF_PANEL_SIDE_BAR_BODY_STYLE_CLASS = 
+   public static final String AF_PANEL_SIDE_BAR_BODY_STYLE_CLASS =
      "af|panelSideBar::body";
    
    //                                                                         //
@@ -978,19 +1006,19 @@
   //                                                                         //
   private static final String AF_PANEL_POPUP_ROOT_STYLE_CLASS = "af|panelPopup";
 
-  public static final String AF_PANEL_POPUP_LINK_STYLE_CLASS = 
+  public static final String AF_PANEL_POPUP_LINK_STYLE_CLASS =
     AF_PANEL_POPUP_ROOT_STYLE_CLASS + "::link";
-  public static final String AF_PANEL_POPUP_TRIGGER_STYLE_CLASS = 
+  public static final String AF_PANEL_POPUP_TRIGGER_STYLE_CLASS =
     AF_PANEL_POPUP_ROOT_STYLE_CLASS + "::trigger";
-  public static final String AF_PANEL_POPUP_CONTAINER_STYLE_CLASS = 
+  public static final String AF_PANEL_POPUP_CONTAINER_STYLE_CLASS =
     AF_PANEL_POPUP_ROOT_STYLE_CLASS + "::container";
-  public static final String AF_PANEL_POPUP_CONTENT_STYLE_CLASS = 
+  public static final String AF_PANEL_POPUP_CONTENT_STYLE_CLASS =
     AF_PANEL_POPUP_ROOT_STYLE_CLASS + "::content";
-  public static final String AF_PANEL_POPUP_TITLEBAR_STYLE_CLASS = 
+  public static final String AF_PANEL_POPUP_TITLEBAR_STYLE_CLASS =
     AF_PANEL_POPUP_ROOT_STYLE_CLASS + "::title-bar";
-  public static final String AF_PANEL_POPUP_TITLE_STYLE_CLASS = 
+  public static final String AF_PANEL_POPUP_TITLE_STYLE_CLASS =
     AF_PANEL_POPUP_ROOT_STYLE_CLASS + "::title-text";
-  public static final String AF_PANEL_POPUP_CLOSE_ICON_STYLE_CLASS = 
+  public static final String AF_PANEL_POPUP_CLOSE_ICON_STYLE_CLASS =
     AF_PANEL_POPUP_ROOT_STYLE_CLASS + "::close-icon";
 
    //                                                                         //
@@ -1337,7 +1365,7 @@
    // ============================ Style classes ============================ //
    // Root class
    public static final String AF_TRAIN_ROOT_STYLE_CLASS =
-     DEFAULT_NAMESPACE + "|train";  
+     DEFAULT_NAMESPACE + "|train";
    
    // Joins
    public static final String AF_TRAIN_JOIN_STYLE_CLASS =
@@ -1509,7 +1537,7 @@
     "p_OraTreeRowSelected";
   public static final String TREE_ICON_STYLE_CLASS = "p_OraTreeIcon";
   public static final String TREE_DISCLOSED_SYMBOL_STYLE_CLASS =
-    "p_OraTreeDisclosedSymbol";  
+    "p_OraTreeDisclosedSymbol";
 
   // ================================ Icons ================================ //
   public static final String AF_TREE_EXPANDED_ICON =

Modified: myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.xss
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.xss?rev=645007&r1=645006&r2=645007&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.xss (original)
+++ myfaces/trinidad/branches/ar_panelBorderLayout_positioning/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.xss Fri Apr  4 18:43:55 2008
@@ -1633,7 +1633,54 @@
   </style>
   <style selector="af|panelFormLayout::message-cell">
     <includeStyle selector="af|panelFormLayout::cell"/>
-  </style> 
+  </style>
+  
+  <!--
+    panelBorderLayout styles
+
+    Note: the skin is used to reduce the DOM size. The positioned elements
+    depend on these CSS styles to render correctly.
+  -->
+  <style selector="af|panelBorderLayout-positioned">
+    <property name="position">relative</property>
+    <property name="height">480px</property>
+    <property name="width">640px</property>
+  </style>
+  <style selector="af|panelBorderLayout-positioned::top">
+    <property name="position">absolute</property>
+    <property name="top">0px</property>
+    <property name="width">100%</property>
+  </style>
+  <style selector="af|panelBorderLayout-positioned::inner-top">
+    <includeStyle selector="af|panelBorderLayout-positioned::top" />
+  </style>
+  <style selector="af|panelBorderLayout-positioned::bottom">
+    <property name="position">absolute</property>
+    <property name="bottom">0px</property>
+    <property name="width">100%</property>
+  </style>
+  <style selector="af|panelBorderLayout-positioned::inner-bottom">
+    <includeStyle selector="af|panelBorderLayout-positioned::bottom" />
+  </style>
+  <style selector="af|panelBorderLayout-positioned::start">
+    <includeStyle name="AFPanelBorderLayoutStart" />
+  </style>
+  <style selector="af|panelBorderLayout-positioned::inner-start">
+    <includeStyle name="AFPanelBorderLayoutStart" />
+  </style>
+  <style selector="af|panelBorderLayout-positioned::end">
+    <includeStyle name="AFPanelBorderLayoutEnd" />
+  </style>
+  <style selector="af|panelBorderLayout-positioned::inner-end">
+    <includeStyle name="AFPanelBorderLayoutEnd" />
+  </style>
+  <style selector="af|panelBorderLayout-positioned::center">
+    <property name="position">absolute</property>
+  </style>
+  <style selector="af|panelBorderLayout-positioned::inner-center">
+    <includeStyle selector="af|panelBorderLayout-positioned::center" />
+  </style>
+  
    <!--
       panelBox Styles
   
@@ -3873,6 +3920,17 @@
 
 </styleSheet>
 
+<styleSheet direction="ltr">
+  <style name="AFPanelBorderLayoutStart">
+    <property name="position">absolute</property>
+    <property name="left">0px</property>
+  </style>
+  <style name="AFPanelBorderLayoutEnd">
+    <property name="position">absolute</property>
+    <property name="right">0px</property>
+  </style>
+</styleSheet>
+
 <styleSheet direction="rtl">
 
   <style name="LTROverride">
@@ -3963,7 +4021,17 @@
   <style selector=".p_OraHeaderImage">
     <property name="margin">0pt 0pt 0pt 2pt</property>
   </style>
+
+  <style name="AFPanelBorderLayoutStart">
+    <property name="position">absolute</property>
+    <property name="right">0px</property>
+  </style>
   
+  <style name="AFPanelBorderLayoutEnd">
+    <property name="position">absolute</property>
+    <property name="left">0px</property>
+  </style>
+
 </styleSheet>
 
 <styleSheet browsers="ie">