Author: awiner
Date: Thu Oct 12 10:23:24 2006
New Revision: 463333
URL: http://svn.apache.org/viewvc?view=rev&rev=463333
Log:
Re-support the 'actions' facet on tr:table
Modified:
incubator/adffaces/trunk/trinidad/src/site/xdoc/api-changes.xml
incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/includes/CommonTableAttrs.xml
incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/components/table.jspx
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/DesktopTableRenderer.java
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaTableRenderer.java
Modified: incubator/adffaces/trunk/trinidad/src/site/xdoc/api-changes.xml
URL:
http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/src/site/xdoc/api-changes.xml?view=diff&rev=463333&r1=463332&r2=463333
==============================================================================
--- incubator/adffaces/trunk/trinidad/src/site/xdoc/api-changes.xml (original)
+++ incubator/adffaces/trunk/trinidad/src/site/xdoc/api-changes.xml Thu Oct 12
10:23:24 2006
@@ -1978,11 +1978,6 @@
<td><b>Notes</b></td>
</tr>
<tr>
- <td>actions</td>
- <td> </td>
- <td>This facet was removed. The components in this facet should be moved
to the "toolbar" facet on the new decorateCollection component.</td>
- </tr>
- <tr>
<td>selection</td>
<td> </td>
<td>This facet was removed. Selection is now controlled by the new
"rowSelection" attribute. See the tableSelectOne and tableSelectMany components
for more details.</td>
Modified:
incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/includes/CommonTableAttrs.xml
URL:
http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/includes/CommonTableAttrs.xml?view=diff&rev=463333&r1=463332&r2=463333
==============================================================================
---
incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/includes/CommonTableAttrs.xml
(original)
+++
incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/includes/CommonTableAttrs.xml
Thu Oct 12 10:23:24 2006
@@ -21,6 +21,16 @@
<mfp:long-description>This component will be used to render the table
header.</mfp:long-description>
</facet-extension>
</facet>
+ <facet>
+ <description><![CDATA[Content to be rendered inline with the navigation
bar.]]>
+ </description>
+ <facet-name>actions</facet-name>
+ <facet-extension>
+ <mfp:facet-metadata>
+ <mfp:preferred>true</mfp:preferred>
+ </mfp:facet-metadata>
+ </facet-extension>
+ </facet>
<property>
<description>Specifies if the Horizontal GridLines are to be
drawn.</description>
<property-name>horizontalGridVisible</property-name>
Modified:
incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/components/table.jspx
URL:
http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/components/table.jspx?view=diff&rev=463333&r1=463332&r2=463333
==============================================================================
---
incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/components/table.jspx
(original)
+++
incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/components/table.jspx
Thu Oct 12 10:23:24 2006
@@ -37,22 +37,16 @@
rowBandingInterval="2"
value="#{periodicTable.tableData}" rows="10"
summary="Element information">
- <tr:column>
- <f:facet name="header">
- <tr:outputText value="Name"/>
- </f:facet>
+ <f:facet name="actions">
+ <tr:outputText value="(Actions)"/>
+ </f:facet>
+ <tr:column headerText="Name">
<tr:outputText value="#{row.name}"/>
</tr:column>
- <tr:column>
- <f:facet name="header">
- <tr:outputText value="Symbol"/>
- </f:facet>
+ <tr:column headerText="Symbol">
<tr:outputText value="#{row.symbol}"/>
</tr:column>
- <tr:column>
- <f:facet name="header">
- <tr:outputText value="Action Column"/>
- </f:facet>
+ <tr:column headerText="Action Column">
<tr:commandButton text="Action" action="#{row.action}"/>
</tr:column>
<f:facet name="detailStamp" >
@@ -71,16 +65,10 @@
<tr:table var="row"
value="#{periodicTable.tableData}" rows="5"
summary="Element information">
- <tr:column>
- <f:facet name="header">
- <tr:outputText value="Name"/>
- </f:facet>
+ <tr:column headerText="Name">
<tr:inputText value="#{row.name}" shortDesc="#{row.name}"/>
</tr:column>
- <tr:column>
- <f:facet name="header">
- <tr:outputText value="Symbol"/>
- </f:facet>
+ <tr:column headerText="Symbol">
<tr:inputText value="#{row.symbol}"
shortDesc="#{row.symbol}"/>
</tr:column>
</tr:table>
@@ -92,16 +80,10 @@
<tr:outputFormatted styleUsage="instruction" value="<b>Empty
table</b>"/>
<tr:table var="row" emptyText="No Records Found" rows="10"
summary="Empty Table">
- <tr:column>
- <f:facet name="header">
- <tr:outputText value="Int"/>
- </f:facet>
+ <tr:column headerText="int">
<tr:inputText value="#{row.int}" shortDesc="#{row.int}"/>
</tr:column>
- <tr:column>
- <f:facet name="header">
- <tr:outputText value="String"/>
- </f:facet>
+ <tr:column headerText="String">
<tr:inputText value="#{row.string}" shortDesc="#{row.string}"/>
</tr:column>
</tr:table>
Modified:
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/DesktopTableRenderer.java
URL:
http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/DesktopTableRenderer.java?view=diff&rev=463333&r1=463332&r2=463333
==============================================================================
---
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/DesktopTableRenderer.java
(original)
+++
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/DesktopTableRenderer.java
Thu Oct 12 10:23:24 2006
@@ -545,6 +545,13 @@
renderStyleClass(context, arc, style);
writer.startElement(XhtmlConstants.TABLE_ROW_ELEMENT, null);
+ UIComponent action = getFacet(component, CoreTable.ACTIONS_FACET);
+ if (action != null)
+ {
+ writer.startElement(XhtmlConstants.TABLE_DATA_ELEMENT, null);
+ encodeChild(context, action);
+ writer.endElement(XhtmlConstants.TABLE_DATA_ELEMENT);
+ }
writer.startElement(XhtmlConstants.TABLE_DATA_ELEMENT, null);
writer.writeAttribute(XhtmlConstants.WIDTH_ATTRIBUTE,
XhtmlConstants.ONE_HUNDRED_PERCENT_ATTRIBUTE_VALUE, null);
Modified:
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaTableRenderer.java
URL:
http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaTableRenderer.java?view=diff&rev=463333&r1=463332&r2=463333
==============================================================================
---
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaTableRenderer.java
(original)
+++
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaTableRenderer.java
Thu Oct 12 10:23:24 2006
@@ -73,6 +73,14 @@
renderStyleClass(context, arc,
SkinSelectors.AF_TABLE_CONTROL_BAR_TOP_STYLE);
+ UIComponent action = getFacet(component, CoreTable.ACTIONS_FACET);
+ if (action != null)
+ {
+ writer.startElement(XhtmlConstants.TABLE_DATA_ELEMENT, null);
+ encodeChild(context, action);
+ writer.endElement(XhtmlConstants.TABLE_DATA_ELEMENT);
+ }
+
if ( hasNav)
{
writer.startElement("div", null);