incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r453802 [1/8] - in /incubator/adffaces/trunk/trinidad: trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/ trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/ trinidad-impl/s...
Date Fri, 06 Oct 2006 23:06:52 GMT
Author: awiner
Date: Fri Oct  6 16:06:50 2006
New Revision: 453802

URL: http://svn.apache.org/viewvc?view=rev&rev=453802
Log:
ADFFACES-207: Add halign property to tr:panelButtonBar;  and made the renderer Faces-major
with a root style class

Added:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PanelButtonBarRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelButtonBarRenderer.java
Removed:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/PageButtonBarRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/PageButtonBarRenderer.java
Modified:
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelButtonBar.xml
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelHorizontalLayout.xml
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/PanelButtonBar.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaRenderKit.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelGroupLayoutRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelHorizontalLayoutRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/UIConstants.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/PdaHtmlLookAndFeel.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/NavigationBarRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/ProcessChoiceBarRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLookAndFeel.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/faces-bean.properties
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/panelButtonBar-minimal-golden.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/panelButtonBar-minimalIE-golden.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/panelButtonBar-minimalIERtl-golden.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/panelButtonBar-minimalInacc-golden.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/panelButtonBar-minimalPPC-golden.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/panelButtonBar-minimalSaf-golden.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/panelButtonBar-minimalScrRdr-golden.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/testScripts/panelButtonBar.xml

Modified: incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelButtonBar.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelButtonBar.xml?view=diff&rev=453802&r1=453801&r2=453802
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelButtonBar.xml
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelButtonBar.xml
Fri Oct  6 16:06:50 2006
@@ -26,147 +26,20 @@
     </icon>
     <component-type>org.apache.myfaces.trinidad.CorePanelButtonBar</component-type>
     <component-class>org.apache.myfaces.trinidad.component.core.layout.CorePanelButtonBar</component-class>
+
+    <xi:include href="includes/CommonAttrs.xml" xpointer="/faces-config/component/*"/>
+    <xi:include href="includes/CoreJSEvents.xml" xpointer="/faces-config/component/*"/>
+
     <property>
-      <description><![CDATA[the short description of the bean.  This text
-         is commonly used by user agents to display tooltip help text.]]>
-      </description>
-      <property-name>shortDesc</property-name>
+      <description><![CDATA[the horizontal alignment to one of start, end, left,
+right, or center.]]></description>
+      <property-name>halign</property-name>
       <property-class>java.lang.String</property-class>
       <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("CORE_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[the IDs of the components that should trigger a partial
update.
-         This component will listen on the trigger components. If one of the
-         trigger components receives an event that will cause it to update
-         in some way, this component will request to be updated too.]]>
-      </description>
-      <property-name>partialTriggers</property-name>
-      <property-class>java.lang.String[]</property-class>
-    </property>
-    <property>
-      <description><![CDATA[an onclick Javascript handler.]]></description>
-      <property-name>onclick</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[an ondblclick Javascript handler.]]></description>
-      <property-name>ondblclick</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[an onmousedown Javascript handler.]]></description>
-      <property-name>onmousedown</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[an onmouseup Javascript handler.]]></description>
-      <property-name>onmouseup</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[an onmouseover Javascript handler.]]></description>
-      <property-name>onmouseover</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[an onmousemove Javascript handler.]]></description>
-      <property-name>onmousemove</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[an onmouseout Javascript handler.]]></description>
-      <property-name>onmouseout</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[an onkeypress Javascript handler.]]></description>
-      <property-name>onkeypress</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[an onkeydown Javascript handler.]]></description>
-      <property-name>onkeydown</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[an onkeyup Javascript handler.]]></description>
-      <property-name>onkeyup</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[the CSS style class of the bean.]]></description>
-      <property-name>styleClass</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("CORE_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[the inline CSS style for this element]]></description>
-      <property-name>inlineStyle</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("CORE_GROUP")}</mfp:group>
-        </mfp:property-metadata>
+        <mfp:property-values>right start left end center</mfp:property-values>
       </property-extension>
     </property>
+
     <component-extension>
       <mfp:component-supertype>org.apache.myfaces.trinidad.Panel</mfp:component-supertype>
       <mfp:renderer-type>org.apache.myfaces.trinidad.ButtonBar</mfp:renderer-type>

Modified: incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelHorizontalLayout.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelHorizontalLayout.xml?view=diff&rev=453802&r1=453801&r2=453802
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelHorizontalLayout.xml
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelHorizontalLayout.xml
Fri Oct  6 16:06:50 2006
@@ -34,6 +34,10 @@
                 other children.]]></description>
       <facet-name>separator</facet-name>
     </facet>
+
+    <xi:include href="includes/CommonAttrs.xml" xpointer="/faces-config/component/*"/>
+    <xi:include href="includes/CoreJSEvents.xml" xpointer="/faces-config/component/*"/>
+
     <property>
       <description><![CDATA[the vertical alignment to one of top, bottom, middle,
or baseline.]]></description>
       <property-name>valign</property-name>
@@ -51,147 +55,7 @@
         <mfp:property-values>right start left end center</mfp:property-values>
       </property-extension>
     </property>
-    <property>
-      <description><![CDATA[the short description of the bean.  This text
-         is commonly used by user agents to display tooltip help text.]]>
-      </description>
-      <property-name>shortDesc</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("CORE_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[the IDs of the components that should trigger a partial
update.
-         This component will listen on the trigger components. If one of the
-         trigger components receives an event that will cause it to update
-         in some way, this component will request to be updated too.]]>
-      </description>
-      <property-name>partialTriggers</property-name>
-      <property-class>java.lang.String[]</property-class>
-    </property>
-    <property>
-      <description><![CDATA[an onclick Javascript handler.]]></description>
-      <property-name>onclick</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[an ondblclick Javascript handler.]]></description>
-      <property-name>ondblclick</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[an onmousedown Javascript handler.]]></description>
-      <property-name>onmousedown</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[an onmouseup Javascript handler.]]></description>
-      <property-name>onmouseup</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[an onmouseover Javascript handler.]]></description>
-      <property-name>onmouseover</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[an onmousemove Javascript handler.]]></description>
-      <property-name>onmousemove</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[an onmouseout Javascript handler.]]></description>
-      <property-name>onmouseout</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[an onkeypress Javascript handler.]]></description>
-      <property-name>onkeypress</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[an onkeydown Javascript handler.]]></description>
-      <property-name>onkeydown</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[an onkeyup Javascript handler.]]></description>
-      <property-name>onkeyup</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("EVENTS_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[the CSS style class of the bean.]]></description>
-      <property-name>styleClass</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("CORE_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
-    <property>
-      <description><![CDATA[the inline CSS style for this element]]></description>
-      <property-name>inlineStyle</property-name>
-      <property-class>java.lang.String</property-class>
-      <property-extension>
-        <mfp:property-metadata>
-          <mfp:group>${md:getTranslatedString("CORE_GROUP")}</mfp:group>
-        </mfp:property-metadata>
-      </property-extension>
-    </property>
+
     <component-extension>
       <mfp:component-supertype>org.apache.myfaces.trinidad.Panel</mfp:component-supertype>
       <mfp:renderer-type>org.apache.myfaces.trinidad.HorizontalLayout</mfp:renderer-type>

Modified: incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/PanelButtonBar.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/PanelButtonBar.xml?view=diff&rev=453802&r1=453801&r2=453802
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/PanelButtonBar.xml
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/PanelButtonBar.xml
Fri Oct  6 16:06:50 2006
@@ -21,7 +21,7 @@
     <renderer>
       <component-family>org.apache.myfaces.trinidad.Panel</component-family>
       <renderer-type>org.apache.myfaces.trinidad.ButtonBar</renderer-type>
-      <renderer-class>org.apache.myfaces.trinidadinternal.uinode.UINodeRendererBase</renderer-class>
+      <renderer-class>org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelButtonBarRenderer</renderer-class>
       <renderer-extension>
         <mfp:component-type>org.apache.myfaces.trinidad.CorePanelButtonBar</mfp:component-type>
       </renderer-extension>

Added: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PanelButtonBarRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PanelButtonBarRenderer.java?view=auto&rev=453802
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PanelButtonBarRenderer.java
(added)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PanelButtonBarRenderer.java
Fri Oct  6 16:06:50 2006
@@ -0,0 +1,56 @@
+/*
+ * Copyright  2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.trinidadinternal.renderkit.core.pda;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.apache.myfaces.trinidad.bean.FacesBean;
+import org.apache.myfaces.trinidad.component.core.layout.CorePanelButtonBar;
+
+import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelGroupLayoutRenderer;
+import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlConstants;
+
+/**
+ * On PDA, just render the buttons consecutively with non-breaking spaces.
+ */
+public class PanelButtonBarRenderer extends PanelGroupLayoutRenderer
+{
+  public PanelButtonBarRenderer()
+  {
+    super(CorePanelButtonBar.TYPE);
+  }
+
+  protected Object getLayout(FacesBean bean)
+  {
+    return null;
+  }
+
+  /**
+   * Render a single separator
+   */
+  @Override
+  protected void encodeSeparator(
+    FacesContext context,
+    UIComponent  separator,
+    boolean      isHorizontal) throws IOException
+  {
+    context.getResponseWriter().writeText(XhtmlConstants.NBSP_STRING, null);
+  }
+
+}

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaRenderKit.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaRenderKit.java?view=diff&rev=453802&r1=453801&r2=453802
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaRenderKit.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaRenderKit.java
Fri Oct  6 16:06:50 2006
@@ -34,6 +34,9 @@
     addRenderer("org.apache.myfaces.trinidad.Frame",
                 "org.apache.myfaces.trinidad.Frame",
                 new FrameRenderer());
+    addRenderer("org.apache.myfaces.trinidad.Panel",
+                "org.apache.myfaces.trinidad.ButtonBar",
+                new PanelButtonBarRenderer());
   }
 
   @Override

Added: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelButtonBarRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelButtonBarRenderer.java?view=auto&rev=453802
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelButtonBarRenderer.java
(added)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelButtonBarRenderer.java
Fri Oct  6 16:06:50 2006
@@ -0,0 +1,97 @@
+/*
+ * Copyright  2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.apache.myfaces.trinidad.bean.FacesBean;
+import org.apache.myfaces.trinidad.component.core.data.CoreSelectRangeChoiceBar;
+import org.apache.myfaces.trinidad.component.core.nav.CoreSingleStepButtonBar;
+import org.apache.myfaces.trinidad.component.core.layout.CorePanelButtonBar;
+
+import org.apache.myfaces.trinidad.context.RenderingContext;
+
+public class PanelButtonBarRenderer extends PanelHorizontalLayoutRenderer
+{
+  public PanelButtonBarRenderer()
+  {
+    super(CorePanelButtonBar.TYPE);
+  }
+
+  // Not currently supported, but would be easy to add...
+  @Override
+  protected Object getValign(FacesBean bean)
+  {
+    return null;
+  }
+
+  /**
+   * This is how we can render both the user defined styleClass and our
+   * component style class.
+   */
+  @Override
+  protected void renderStyleAttributes(
+    FacesContext        context,
+    RenderingContext arc,
+    FacesBean           bean) throws IOException
+  {
+    renderStyleAttributes(context, arc, bean, 
+      SkinSelectors.AF_PANEL_BUTTON_BAR_STYLE_CLASS);
+  }
+
+  /**
+   * Render a single child (or the separator facet)
+   */
+  @Override
+  protected void encodeChild(
+    FacesContext context,
+    UIComponent  child,
+    Object       vAlign) throws IOException
+  {
+    // These two components render themselves
+    if ((child instanceof CoreSingleStepButtonBar) ||
+        (child instanceof CoreSelectRangeChoiceBar))
+    {
+      encodeChild(context, child);
+    }
+    else
+    {
+      super.encodeChild(context, child, vAlign);
+    }
+  }
+
+
+  /**
+   * Render a separator 
+   */
+  @Override
+  protected void encodeSeparator(
+    FacesContext context,
+    UIComponent  separator,
+    Object       vAlign) throws IOException
+  {
+    // FIXME Use proper skinning techniques
+    RenderingContext rc = RenderingContext.getCurrentInstance();
+    ResponseWriter writer = context.getResponseWriter();
+    writer.startElement("td", null);
+    renderSpacer(context, rc, "10", "1");
+    writer.endElement("td");
+  }
+}
\ No newline at end of file

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelGroupLayoutRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelGroupLayoutRenderer.java?view=diff&rev=453802&r1=453801&r2=453802
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelGroupLayoutRenderer.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelGroupLayoutRenderer.java
Fri Oct  6 16:06:50 2006
@@ -33,7 +33,12 @@
 {
   public PanelGroupLayoutRenderer()
   {
-    super(CorePanelGroupLayout.TYPE);
+    this(CorePanelGroupLayout.TYPE);
+  }
+
+  protected PanelGroupLayoutRenderer(FacesBean.Type type)
+  {
+    super(type);
   }
   
   @Override
@@ -127,22 +132,32 @@
       {
         if (isVertical)
           rw.startElement("div", null);
-        if (separator != null)
-          _encodeChild(context, separator, isHorizontal);
+        encodeSeparator(context, separator, isHorizontal);
         if (isVertical)
           rw.endElement("div");
       }
 
-      _encodeChild(context, child, isHorizontal);
-      if ((separator != null) || isVertical)
-        needSeparator = true;
+      encodeChild(context, child, isHorizontal);
+      needSeparator = true;
     }
   }
 
   /**
+   * Render a single separator
+   */
+  protected void encodeSeparator(
+    FacesContext context,
+    UIComponent  separator,
+    boolean      isHorizontal) throws IOException
+  {
+    if (separator != null)
+      encodeChild(context, separator, isHorizontal);
+  }
+
+  /**
    * Render a single child (or the separator facet)
    */
-  private void _encodeChild(
+  protected void encodeChild(
     FacesContext context,
     UIComponent  child,
     boolean      isHorizontal) throws IOException

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelHorizontalLayoutRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelHorizontalLayoutRenderer.java?view=diff&rev=453802&r1=453801&r2=453802
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelHorizontalLayoutRenderer.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelHorizontalLayoutRenderer.java
Fri Oct  6 16:06:50 2006
@@ -33,7 +33,12 @@
 {
   public PanelHorizontalLayoutRenderer()
   {
-    super(CorePanelHorizontalLayout.TYPE);
+    this(CorePanelHorizontalLayout.TYPE);
+  }
+
+  protected PanelHorizontalLayoutRenderer(FacesBean.Type type)
+  {
+    super(type);
   }
   
   @Override
@@ -141,22 +146,18 @@
 
       if (needSeparator)
       {
-        if (separator != null)
-        {
-          _encodeChild(context, separator, vAlign);
-        }
+        encodeSeparator(context, separator, vAlign);
       }
 
-      _encodeChild(context, child, vAlign);
-      if (separator != null )
-        needSeparator = true;
+      encodeChild(context, child, vAlign);
+      needSeparator = true;
     }
   }
 
   /**
    * Render a single child (or the separator facet)
    */
-  private void _encodeChild(
+  protected void encodeChild(
     FacesContext context,
     UIComponent  child,
     Object       vAlign) throws IOException
@@ -168,7 +169,19 @@
     encodeChild(context, child);
 
     rw.endElement("td");
+  }
 
+
+  /**
+   * Render a separator 
+   */
+  protected void encodeSeparator(
+    FacesContext context,
+    UIComponent  separator,
+    Object       vAlign) throws IOException
+  {
+    if (separator != null)
+      encodeChild(context, separator, vAlign);
   }
 
   private PropertyKey _valignKey;

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java?view=diff&rev=453802&r1=453801&r2=453802
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java
Fri Oct  6 16:06:50 2006
@@ -642,6 +642,17 @@
    public static final String AF_PANEL_BOX_BOTTOM_END_STYLE_CLASS =
      AF_PANEL_BOX_ROOT_STYLE_CLASS + "::bottom-end";
 
+   //                                                                         //
+   //                                                                         //
+   // ========================= tr:panelButtonBar ========================== //
+   //                                                                         //
+   //                                                                         //
+   
+   // ============================ Style classes ============================ //
+   // Root class
+   public static final String AF_PANEL_BUTTON_BAR_STYLE_CLASS =
+     "af|panelButtonBar";
+
 
    //                                                                         //
    //                                                                         //

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/UIConstants.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/UIConstants.java?view=diff&rev=453802&r1=453801&r2=453802
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/UIConstants.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/UIConstants.java
Fri Oct  6 16:06:50 2006
@@ -438,7 +438,6 @@
   public static final String NAVIGATION_BAR_NAME = "navigationBar";
   public static final String OPTION_NAME   = "option";
   public static final String PAGE_NAME   = "page";
-  public static final String PAGE_BUTTON_BAR_NAME   = "pageButtonBar";
   public static final String PAGE_HEADER_LAYOUT_NAME = "pageHeaderLayout";
   public static final String PAGE_LAYOUT_NAME = "pageLayout";
   public static final String PAGE_MENU_BAR_NAME = "pageMenuBar";

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/PdaHtmlLookAndFeel.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/PdaHtmlLookAndFeel.java?view=diff&rev=453802&r1=453801&r2=453802
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/PdaHtmlLookAndFeel.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/PdaHtmlLookAndFeel.java
Fri Oct  6 16:06:50 2006
@@ -89,7 +89,6 @@
     MENU_LIST_NAME,
     MESSAGE_BOX_NAME,
     NAVIGATION_BAR_NAME,
-    PAGE_BUTTON_BAR_NAME,
     PAGE_HEADER_LAYOUT_NAME,
     PAGE_LAYOUT_NAME,
     PROCESS_CHOICE_BAR_NAME,

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/NavigationBarRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/NavigationBarRenderer.java?view=diff&rev=453802&r1=453801&r2=453802
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/NavigationBarRenderer.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/NavigationBarRenderer.java
Fri Oct  6 16:06:50 2006
@@ -17,9 +17,11 @@
 
 import java.io.IOException;
 
+import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.context.ResponseWriter;
 
+import org.apache.myfaces.trinidad.component.core.layout.CorePanelButtonBar;
 import org.apache.myfaces.trinidad.context.RenderingContext;
 import org.apache.myfaces.trinidad.skin.Skin;
 
@@ -31,6 +33,7 @@
 import org.apache.myfaces.trinidadinternal.ui.UIConstants;
 import org.apache.myfaces.trinidadinternal.ui.AttributeKey;
 import org.apache.myfaces.trinidadinternal.ui.MutableUINode;
+import org.apache.myfaces.trinidadinternal.ui.NodeUtils;
 import org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext;
 import org.apache.myfaces.trinidadinternal.ui.TextNode;
 import org.apache.myfaces.trinidadinternal.ui.UINode;
@@ -409,7 +412,7 @@
 
     // start the rendering
     ResponseWriter writer = context.getResponseWriter();
-    boolean renderAsTable = _renderAsTable(context);
+    boolean renderAsTable = _renderAsTable(context, navBar);
 
     if (renderAsTable)
     {
@@ -999,7 +1002,7 @@
 
     // ready to render
     ResponseWriter writer = context.getResponseWriter();
-    boolean renderAsTable = _renderAsTable(context);
+    boolean renderAsTable = _renderAsTable(context, navBar);
 
 
 
@@ -2362,13 +2365,15 @@
 
   // don't render as a table in certain locations like a page button bar
   private boolean _renderAsTable(
-    UIXRenderingContext context
+    UIXRenderingContext context,
+    UINode              navBar
     )
   {
-    UINode ancestor = NodeRoleUtils.getStructuralAncestor(context);
-    return (ancestor == null) ||
-           (!PAGE_BUTTON_BAR_NAME.equals(ancestor.getLocalName())) ||
-           (!MARLIN_NAMESPACE.equals(ancestor.getNamespaceURI()));
+    UIComponent component = NodeUtils.getUIComponent(context, navBar);
+    if (component.getParent() instanceof CorePanelButtonBar)
+      return false;
+
+    return true;
   }
 
   // Utility method which tests whether the nav bar should validate

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/ProcessChoiceBarRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/ProcessChoiceBarRenderer.java?view=diff&rev=453802&r1=453801&r2=453802
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/ProcessChoiceBarRenderer.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/ProcessChoiceBarRenderer.java
Fri Oct  6 16:06:50 2006
@@ -23,6 +23,7 @@
 import org.apache.myfaces.trinidad.component.UIXHierarchy;
 import org.apache.myfaces.trinidad.component.UIXCommand;
 import org.apache.myfaces.trinidad.component.UIXProcess;
+import org.apache.myfaces.trinidad.component.core.layout.CorePanelButtonBar;
 
 import org.apache.myfaces.trinidadinternal.share.url.FormEncoder;
 import org.apache.myfaces.trinidadinternal.share.url.URLEncoder;
@@ -376,7 +377,7 @@
 
     // start the rendering
     ResponseWriter writer = context.getResponseWriter();
-    boolean renderAsTable = _renderAsTable(context);
+    boolean renderAsTable = _renderAsTable(context, node);
 
     if (renderAsTable)
     {
@@ -444,7 +445,7 @@
 
       // start rendering
       ResponseWriter writer = context.getResponseWriter();
-      boolean renderAsTable = _renderAsTable(context);
+      boolean renderAsTable = _renderAsTable(context, node);
       // don't render the next button on last step
       if (nextButton != null)
       {
@@ -544,13 +545,15 @@
 
   // don't render as a table in certain locations like a page button bar
   private boolean _renderAsTable(
-    UIXRenderingContext context
+    UIXRenderingContext context,
+    UINode              node
     )
   {
-    UINode ancestor = NodeRoleUtils.getStructuralAncestor(context);
-    return (ancestor == null) ||
-           (!PAGE_BUTTON_BAR_NAME.equals(ancestor.getLocalName())) ||
-           (!MARLIN_NAMESPACE.equals(ancestor.getNamespaceURI()));
+    UIComponent component = NodeUtils.getUIComponent(context, node);
+    if (component.getParent() instanceof CorePanelButtonBar)
+      return false;
+
+    return true;
   }
 
 

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLookAndFeel.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLookAndFeel.java?view=diff&rev=453802&r1=453801&r2=453802
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLookAndFeel.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLookAndFeel.java
Fri Oct  6 16:06:50 2006
@@ -112,7 +112,6 @@
     PAGE_NAME,
     PAGE_MENU_BUTTONS_NAME,
     PAGE_NAVIGATION_PATH_NAME,
-    PAGE_BUTTON_BAR_NAME,
     RESET_BUTTON_NAME,
     ROW_LAYOUT_NAME,
     SCRIPT_NAME,

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/faces-bean.properties
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/faces-bean.properties?view=diff&rev=453802&r1=453801&r2=453802
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/faces-bean.properties
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/faces-bean.properties
Fri Oct  6 16:06:50 2006
@@ -34,7 +34,6 @@
 org.apache.myfaces.trinidad.component.core.output.CoreLegend=org.apache.myfaces.trinidadinternal.uinode.UINodeFacesBean
 org.apache.myfaces.trinidad.component.core.output.CoreMedia=org.apache.myfaces.trinidadinternal.uinode.UINodeFacesBean
 org.apache.myfaces.trinidad.component.core.output.CoreSeparator=org.apache.myfaces.trinidadinternal.uinode.UINodeFacesBean
-org.apache.myfaces.trinidad.component.core.layout.CorePanelButtonBar=org.apache.myfaces.trinidadinternal.uinode.UINodeFacesBean
 org.apache.myfaces.trinidad.component.core.layout.CorePanelPage=org.apache.myfaces.trinidadinternal.uinode.UINodeFacesBean
 org.apache.myfaces.trinidad.component.core.layout.CorePanelTabbed=org.apache.myfaces.trinidadinternal.uinode.UINodeFacesBean
 ### ShowDetailItem on its own does not need UINodeFacesBean;  but panelTabbed requires that...
 when panelTabbed is Faces-Major, delete this



Mime
View raw message