JBoss Rich Faces SVN: r4147 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2007-11-21 11:55:55 -0500 (Wed, 21 Nov 2007)
New Revision: 4147
Modified:
trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml
Log:
RF-391 - fix simple code for 'selection' attribute in the Details of Usage of scrollableDataTable
Modified: trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml 2007-11-21 16:47:06 UTC (rev 4146)
+++ trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml 2007-11-21 16:55:55 UTC (rev 4147)
@@ -138,7 +138,7 @@
</emphasis> component you can use the <emphasis><property>"selection"</property></emphasis> attribute. Simple code is placed below.
</para>
<programlisting role="XML"><![CDATA[...
-<rich:scrollableDataTable value="#{bean.unLinkedThemes}" var="cur" selection="#{bean.selection}">
+<rich:scrollableDataTable value="#{bean.property1}" var="cur" selection="#{bean.selection}">
<rich:column width="100px">
<f:facet name="header" >
<h:outputText value="State"/>
18 years, 5 months
JBoss Rich Faces SVN: r4146 - branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-11-21 11:47:06 -0500 (Wed, 21 Nov 2007)
New Revision: 4146
Modified:
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
Log:
http://jira.jboss.com/jira/browse/RF-1388
Modified: branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-11-21 16:39:04 UTC (rev 4145)
+++ branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-11-21 16:47:06 UTC (rev 4146)
@@ -27,8 +27,15 @@
.ol_button_press{background : top left repeat-x #EAF0F8; border : 1px solid #E79A00; padding : 2px 0px 0px 2px;font-family : Arial; font-size :11px;}
.ol_center_button_col_valign{vertical-align : middle}
.ol_right_button_col_valign{vertical-align : middle}
-.ol_button_content{font-family : Arial; font-size :11px; padding : 0px 4px 0px 1px; text-align : left;}
+.ol_button_content {
+ font-family : Arial;
+ font-size :11px;
+ padding : 0px 4px 0px 1px;
+ text-align : left;
+ white-space: nowrap;
+}
+
.ol_button_content img {
margin-right: 2px;
vertical-align: middle;
18 years, 5 months
JBoss Rich Faces SVN: r4145 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2007-11-21 11:39:04 -0500 (Wed, 21 Nov 2007)
New Revision: 4145
Modified:
trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml
Log:
RF-391 - fix simple code for 'selection' attribute in the Details of Usage of scrollableDataTable
Modified: trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml 2007-11-21 16:24:07 UTC (rev 4144)
+++ trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml 2007-11-21 16:39:04 UTC (rev 4145)
@@ -136,7 +136,8 @@
In order to access the selected rows in <emphasis role="bold">
<property><rich:scrollableDataTable></property>
</emphasis> component you can use the <emphasis><property>"selection"</property></emphasis> attribute. Simple code is placed below.
- <programlisting role="XML"><![CDATA[...
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:scrollableDataTable value="#{bean.unLinkedThemes}" var="cur" selection="#{bean.selection}">
<rich:column width="100px">
<f:facet name="header" >
@@ -151,9 +152,7 @@
</rich:scrollableDataTable>
...
]]></programlisting>
-
- </para>
-<para>
+ <para>
Finally, the component has the following extra attributes for event processing on the client:
<itemizedlist>
<listitem>onselectionchange</listitem>
18 years, 5 months
JBoss Rich Faces SVN: r4144 - trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-11-21 11:24:07 -0500 (Wed, 21 Nov 2007)
New Revision: 4144
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java
Log:
add writeEventHandlerFunction static method
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java 2007-11-21 16:23:02 UTC (rev 4143)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java 2007-11-21 16:24:07 UTC (rev 4144)
@@ -41,6 +41,7 @@
import javax.faces.convert.Converter;
import org.ajax4jsf.Messages;
+import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.renderkit.compiler.TemplateContext;
import org.ajax4jsf.resource.InternetResource;
import org.ajax4jsf.resource.Java2Dresource;
@@ -865,4 +866,18 @@
}
return target;
}
+
+ public static void writeEventHandlerFunction(FacesContext context,
+ UIComponent component, String eventName) throws IOException {
+
+ ResponseWriter writer = context.getResponseWriter();
+ Object script = component.getAttributes().get(eventName);
+ if (script != null && !script.equals("")) {
+ JSFunctionDefinition onEventDefinition = new JSFunctionDefinition();
+ onEventDefinition.addParameter("event");
+ onEventDefinition.addToBody(script);
+ writer.writeText(eventName + ": "
+ + onEventDefinition.toScript(), null);
+ }
+ }
}
\ No newline at end of file
18 years, 5 months
JBoss Rich Faces SVN: r4143 - trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-11-21 11:23:02 -0500 (Wed, 21 Nov 2007)
New Revision: 4143
Modified:
trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java
Log:
Modified: trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java
===================================================================
--- trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java 2007-11-21 16:16:52 UTC (rev 4142)
+++ trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java 2007-11-21 16:23:02 UTC (rev 4143)
@@ -29,6 +29,7 @@
import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.javascript.JSReference;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
+import org.ajax4jsf.renderkit.RendererUtils;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.richfaces.component.UISimpleTogglePanel;
import org.richfaces.event.SimpleToggleEvent;
@@ -67,16 +68,7 @@
public void writeEventHandlerFunction(FacesContext context,
UIComponent component, String eventName) throws IOException {
-
- ResponseWriter writer = context.getResponseWriter();
- Object script = component.getAttributes().get(eventName);
- if (script != null && !script.equals("")) {
- JSFunctionDefinition onEventDefinition = new JSFunctionDefinition();
- onEventDefinition.addParameter("event");
- onEventDefinition.addToBody(script);
- writer.writeText(eventName + ": "
- + onEventDefinition.toScript(), null);
- }
+ RendererUtils.writeEventHandlerFunction(context, component, eventName);
}
public void doDecode(FacesContext context, UIComponent component) {
18 years, 5 months
JBoss Rich Faces SVN: r4142 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2007-11-21 11:16:52 -0500 (Wed, 21 Nov 2007)
New Revision: 4142
Modified:
trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml
Log:
RF-391 - according to information from the forum add attribute 'selection' to the Details of Usage of scrollableDataTable
Modified: trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml 2007-11-21 16:10:06 UTC (rev 4141)
+++ trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml 2007-11-21 16:16:52 UTC (rev 4142)
@@ -132,6 +132,27 @@
</rich:scrollableDataTable>
...
]]></programlisting>
+ <para>
+ In order to access the selected rows in <emphasis role="bold">
+ <property><rich:scrollableDataTable></property>
+ </emphasis> component you can use the <emphasis><property>"selection"</property></emphasis> attribute. Simple code is placed below.
+ <programlisting role="XML"><![CDATA[...
+<rich:scrollableDataTable value="#{bean.unLinkedThemes}" var="cur" selection="#{bean.selection}">
+ <rich:column width="100px">
+ <f:facet name="header" >
+ <h:outputText value="State"/>
+ </f:facet>
+ <h:outputText value="#{cur.cell1}"/>
+ <f:facet name="footer">
+ <h:outputText value="State"/>
+ </f:facet>
+ </rich:column>
+ <!--...//Set of columns and header/footer facets-->
+</rich:scrollableDataTable>
+...
+]]></programlisting>
+
+ </para>
<para>
Finally, the component has the following extra attributes for event processing on the client:
<itemizedlist>
18 years, 5 months
JBoss Rich Faces SVN: r4141 - branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-11-21 11:10:06 -0500 (Wed, 21 Nov 2007)
New Revision: 4141
Modified:
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-1382
Modified: branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java 2007-11-21 16:00:09 UTC (rev 4140)
+++ branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java 2007-11-21 16:10:06 UTC (rev 4141)
@@ -174,8 +174,9 @@
encodeHeaderFacets(context, writer, headers, "ol_col rich-table-header-cell", headerClass, "header", "th", component);
writer.endElement("tr");
+
+ writer.endElement("thead");
}
- writer.endElement("thead");
}
protected void renderDefaultControl(FacesContext context,
@@ -290,7 +291,7 @@
if (facet != null && facet.isRendered()) {
renderChild(context, facet);
} else {
- writer.write(" ");
+ writer.write(" ");
}
writer.endElement("div");
18 years, 5 months
JBoss Rich Faces SVN: r4140 - in trunk/ui/simpleTogglePanel/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-11-21 11:00:09 -0500 (Wed, 21 Nov 2007)
New Revision: 4140
Modified:
trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java
trunk/ui/simpleTogglePanel/src/main/resources/org/richfaces/renderkit/html/scripts/simpleTogglePanel.js
Log:
Modified: trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java
===================================================================
--- trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java 2007-11-21 15:13:01 UTC (rev 4139)
+++ trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java 2007-11-21 16:00:09 UTC (rev 4140)
@@ -155,15 +155,7 @@
JSReference eventRef = new JSReference("event");
String panelId = tgComp.getClientId(context);
- //String userOnClick = (String)component.getAttributes().get("onclick");
- //if(userOnClick!=null) {
- // onClick.append(userOnClick);
- // if(!userOnClick.trim().endsWith(";")) {
- // onClick.append("; ");
- // }
- //}
-
- if (UISimpleTogglePanel.CLIENT_SWITCH_TYPE.equals(switchType)) {
+ if (UISimpleTogglePanel.CLIENT_SWITCH_TYPE.equals(switchType)) {
// Client
JSFunction function = new JSFunction("SimpleTogglePanelManager.toggleOnClient");
function.addParameter(eventRef);
Modified: trunk/ui/simpleTogglePanel/src/main/resources/org/richfaces/renderkit/html/scripts/simpleTogglePanel.js
===================================================================
--- trunk/ui/simpleTogglePanel/src/main/resources/org/richfaces/renderkit/html/scripts/simpleTogglePanel.js 2007-11-21 15:13:01 UTC (rev 4139)
+++ trunk/ui/simpleTogglePanel/src/main/resources/org/richfaces/renderkit/html/scripts/simpleTogglePanel.js 2007-11-21 16:00:09 UTC (rev 4140)
@@ -35,7 +35,7 @@
var switch_on = $(this.panelId+"_switch_on");
var switch_off = $(this.panelId+"_switch_off");
if (this.status=="false"){
- if (this.invokeEvent("expand",event,this.status,body)) {
+ if (this.invokeEvent("expand",event,"false",body)) {
Element.show(body);
this.status="true";
switch_off.style.display="none";
@@ -43,7 +43,7 @@
}
// this.timer = setTimeout(this.windowOnLoad.bind(this), 100);
// body.firstChild.style.width=body.clientWidth;
- } else if (this.invokeEvent("collapse",event,this.status,body)) {
+ } else if (this.invokeEvent("collapse",event,"true",body)) {
Element.hide(body);
body.firstChild.style.width="100%";
this.status="false";
@@ -122,12 +122,12 @@
}
if (this.panels[clientId].status == "true") {
- if (this.panels[clientId].invokeEvent("collapse",event,fInput.value,fInput)) {
+ if (this.panels[clientId].invokeEvent("collapse",event,"true",fInput)) {
this.panels[clientId].status="false";
}
} else {
- if (this.panels[clientId].invokeEvent("expand",event,fInput.value,fInput)) {
+ if (this.panels[clientId].invokeEvent("expand",event,"false",fInput)) {
this.panels[clientId].status="true";
}
}
@@ -143,14 +143,12 @@
}
SimpleTogglePanelManager.toggleOnAjax = function(event,panelId) {
+ var element = $(panelId);
+
if (this.panels[panelId].status == "true") {
- if(this.panels[panelId].options.oncollapse){
- //this.panels[panelId].onCollapseEvent(event);
- }
+ return this.panels[panelId].invokeEvent("collapse",event,"true",element);
} else {
- if (this.panels[panelId].options.onexpand) {
- //this.panels[panelId].onExpandEvent(event);
- }
+ return this.panels[panelId].invokeEvent("expand",event,"false",element);
}
}
18 years, 5 months
JBoss Rich Faces SVN: r4139 - trunk/ui/dataFilterSlider/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-11-21 10:13:01 -0500 (Wed, 21 Nov 2007)
New Revision: 4139
Modified:
trunk/ui/dataFilterSlider/src/main/java/org/richfaces/renderkit/DataFilterSliderRendererBase.java
Log:
Modified: trunk/ui/dataFilterSlider/src/main/java/org/richfaces/renderkit/DataFilterSliderRendererBase.java
===================================================================
--- trunk/ui/dataFilterSlider/src/main/java/org/richfaces/renderkit/DataFilterSliderRendererBase.java 2007-11-21 15:11:51 UTC (rev 4138)
+++ trunk/ui/dataFilterSlider/src/main/java/org/richfaces/renderkit/DataFilterSliderRendererBase.java 2007-11-21 15:13:01 UTC (rev 4139)
@@ -58,7 +58,7 @@
public String getEventHandlerFunction(UIDataFltrSlider slider,String eventName){
String returnScript = null;
- Object script = (String) slider.getAttributes().get(eventName);
+ Object script = slider.getAttributes().get(eventName);
if(script != null && !script.equals("")){
JSFunctionDefinition jsFunctionDefinition = new JSFunctionDefinition();
jsFunctionDefinition.addParameter("event");
18 years, 5 months
JBoss Rich Faces SVN: r4138 - in trunk/docs/userguide/en/src/main: resources/images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-11-21 10:11:51 -0500 (Wed, 21 Nov 2007)
New Revision: 4138
Added:
trunk/docs/userguide/en/src/main/resources/images/datagrid2.gif
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dataGrid.xml
Log:
http://jira.jboss.com/jira/browse/RF-657 - updated infor for dataGrid
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataGrid.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataGrid.xml 2007-11-21 15:09:43 UTC (rev 4137)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataGrid.xml 2007-11-21 15:11:51 UTC (rev 4138)
@@ -1,50 +1,51 @@
<?xml version='1.0' encoding='UTF-8'?>
<section>
-<sectioninfo>
-<keywordset>
-<keyword>grid</keyword>
-<keyword>rich:dataGrid</keyword>
-<keyword>HtmlDataGrid</keyword>
-</keywordset>
-</sectioninfo>
-
- <table>
- <title>Component identification parameters </title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Name</entry>
- <entry>Value</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>component-type</entry>
- <entry>org.richfaces.DataGrid</entry>
- </row>
- <row>
- <entry>component-class</entry>
- <entry>org.richfaces.component.html.HtmlDataGrid</entry>
- </row>
- <row>
+ <sectioninfo>
+ <keywordset>
+ <keyword>grid</keyword>
+ <keyword>rich:dataGrid</keyword>
+ <keyword>HtmlDataGrid</keyword>
+ </keywordset>
+ </sectioninfo>
+
+ <table>
+ <title>Component identification parameters </title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Value</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>component-type</entry>
+ <entry>org.richfaces.DataGrid</entry>
+ </row>
+ <row>
+ <entry>component-class</entry>
+ <entry>org.richfaces.component.html.HtmlDataGrid</entry>
+ </row>
+ <row>
<entry>component-family</entry>
<entry>org.richfaces.DataGrid</entry>
- </row>
- <row>
+ </row>
+ <row>
<entry>renderer-type</entry>
<entry>org.richfaces.DataGridRenderer</entry>
- </row>
- <row>
- <entry>tag-class</entry>
- <entry>org.richfaces.taglib.DataGridTag</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
+ </row>
+ <row>
+ <entry>tag-class</entry>
+ <entry>org.richfaces.taglib.DataGridTag</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
<section>
<title>Creating the Component with a Page Tag</title>
- <para>To create the simplest variant of <property>dataGrid</property> on a page, use the following syntax:</para>
+ <para>To create the simplest variant of <property>dataGrid</property> on a page, use the
+ following syntax:</para>
<para>
<emphasis role="bold">Example:</emphasis>
@@ -57,36 +58,95 @@
]]></programlisting>
</section>
<section>
- <title>Creating the Component Dynamically Using Java</title>
+ <title>Creating the Component Dynamically Using Java</title>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlDataGrid;
+ <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlDataGrid;
...
HtmlDataGrid myList = new HtmlDataGrid();
...
]]></programlisting>
-</section>
-<section>
-<title>Details of Usage</title>
-<para>The component takes a list from a model and outputs it the same way as with <emphasis role="bold"><property><h:PanelGrid></property></emphasis>
- for inline data. To define grid properties and styles, use the same definitions as for <emphasis role="bold"><property><h:panelGrid></property>.</emphasis>
- The component also has similar to ordinary UIData components output ways.</para>
-<itemizedlist>
-<listitem>A header and footer output</listitem>
-<listitem>Limitation of the output elements (the <emphasis ><property>"elements"</property></emphasis> attribute) and definition of the first
- element</listitem>
- <listitem>Binding to scrolling components of list pages</listitem>
- </itemizedlist>
- <para>The component is created basing on the <emphasis role="bold"><property><a4j:repeat></property></emphasis> component and as a result the component could
- be partially updated with AJAX.</para>
- <para>Here is an example for <link linkend="dataGrid">the first</link> screenshot:</para>
+ </section>
+ <section>
+ <title>Details of Usage</title>
+ <para>The component takes a list from a model and outputs it the same way as with <emphasis
+ role="bold">
+ <property><h:panelGrid></property>
+ </emphasis> for inline data. To define grid properties and styles, use the same definitions as
+ for <emphasis role="bold"><property><h:panelGrid></property>.</emphasis></para>
+ <para>The component allows to:</para>
+ <itemizedlist>
+ <listitem>Use <emphasis>
+ <property>"header"</property>
+ </emphasis> and <emphasis>
+ <property>"footer"</property>
+ </emphasis> facets for output</listitem>
+ <listitem>Limit number of output elements (<emphasis>
+ <property>"elements"</property>
+ </emphasis> attribute) and define first element (<emphasis>
+ <property>"first"</property>
+ </emphasis> attribute)</listitem>
+ <listitem>Bind list pages with <emphasis role="bold">
+ <property><rich:datascroller></property>
+ </emphasis> component</listitem>
+ </itemizedlist>
+ <para>Here is an example:</para>
+
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML"><![CDATA[...
+
+ <programlisting role="XML"><![CDATA[...
+ <rich:panel style="width:150px;height:200px;">
+ <h:form>
+ <rich:dataGrid value="#{dataTableScrollerBean.allCars}" var="car" columns="2" elements="4" first="1">
+ <f:facet name="header">
+ <h:outputText value="Car Store"></h:outputText>
+ </f:facet>
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="#{car.make} #{car.model}"></h:outputText>
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:outputText value="Price:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car.price}" />
+ <h:outputText value="Mileage:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car.mileage}" />
+ </h:panelGrid>
+ </rich:panel>
+ <f:facet name="footer">
+ <rich:datascroller></rich:datascroller>
+ </f:facet>
+ </rich:dataGrid>
+ </h:form>
+ </rich:panel>
+...
+]]></programlisting>
+ <para>This is a result:</para>
+
+ <figure>
+ <title>Component usage</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/datagrid2.gif"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The component is created basing on the <emphasis role="bold">
+ <property><a4j:repeat></property>
+ </emphasis> component and as a result it could be partially updated with Ajax. <emphasis>
+ <property>"ajaxKeys"</property>
+ </emphasis> attribute allows to define strings that are updated after an Ajax request.</para>
+ <para>Here is an example:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
<rich:dataGrid value="#{bean.capitals}" var="caps" ajaxKeys="#{listBean.list}"
binding="#{listBean.dataList}" id="grid" elements="20" columns="4">
<h:graphicImage value="#{cap.stateFlag}"/>
@@ -98,76 +158,75 @@
<a4j:commandButton action"#{listBean.action}" reRender="grid" value="Submit"/>
...
]]></programlisting>
-<para>In the example there is an output of a grid with four columns and output limitation to 20 elements.
-But when the action is processed the ajaxKeys set is composed and then update specified for the whole table
- actually happens only for the chosen set of elements.</para>
-</section>
-
- <section>
- <title>Look-and-Feel Customization</title>
-
- <para>For skinnability implementation, the components use a <emphasis>
- <property>style class redefinition method.</property>
- </emphasis> Default style classes are mapped on <emphasis>
- <property>skin parameters.</property>
- </emphasis></para>
-
- <para>There are two ways to redefine the appearance of all <emphasis role="bold">
- <property><rich:dataGrid></property>
- </emphasis> components at once:</para>
-
- <itemizedlist>
- <listitem>
- <para>Redefine the corresponding skin parameters</para>
- </listitem>
-
- <listitem>
- <para>Add to your style sheets <emphasis>
- <property>style classes</property>
- </emphasis> used by a <emphasis role="bold">
- <property><rich:dataGrid></property>
- </emphasis> component</para>
- </listitem>
- </itemizedlist>
-
- </section>
+
+ </section>
+
<section>
+ <title>Look-and-Feel Customization</title>
+
+ <para>For skinnability implementation, the components use a <emphasis>
+ <property>style class redefinition method.</property>
+ </emphasis> Default style classes are mapped on <emphasis>
+ <property>skin parameters.</property>
+ </emphasis></para>
+
+ <para>There are two ways to redefine the appearance of all <emphasis role="bold">
+ <property><rich:dataGrid></property>
+ </emphasis> components at once:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Redefine the corresponding skin parameters</para>
+ </listitem>
+
+ <listitem>
+ <para>Add to your style sheets <emphasis>
+ <property>style classes</property>
+ </emphasis> used by a <emphasis role="bold">
+ <property><rich:dataGrid></property>
+ </emphasis> component</para>
+ </listitem>
+ </itemizedlist>
+
+ </section>
+ <section>
<title>Skin Parameters Redefinition</title>
-
+
<para>Skin parameters redefinition for <emphasis role="bold">
- <property><rich:dataGrid></property>
- </emphasis> are the same as for the <emphasis role="bold">
- <property><rich:dataTable></property>
- </emphasis> <link linkend="SPR">component</link>.</para>
+ <property><rich:dataGrid></property>
+ </emphasis> are the same as for the <emphasis role="bold">
+ <property><rich:dataTable></property>
+ </emphasis>
+ <link linkend="SPR">component</link>.</para>
</section>
-
- <section>
- <title>Definition of Custom Style Classes</title>
-
- <para>Custom style classes for <emphasis role="bold">
- <property><rich:dataGrid></property>
- </emphasis> are the same as for the <emphasis role="bold">
- <property><rich:dataTable></property>
- </emphasis> <link linkend="DofCCS">component</link>.
- </para>
-
- <para>In order to redefine styles for all <emphasis role="bold">
- <property><rich:dataGrid></property>
- </emphasis> components on a page using CSS, it's enough to create classes with the
- same names and define necessary properties in them.</para>
-
- <para>To change styles of particular <emphasis role="bold">
- <property><rich:dataGrid></property>
- </emphasis> components, define your own style classes in the corresponding <emphasis
- role="bold">
- <property><rich:dataGrid></property>
- </emphasis>attributes.</para>
- </section>
+
<section>
+ <title>Definition of Custom Style Classes</title>
+
+ <para>Custom style classes for <emphasis role="bold">
+ <property><rich:dataGrid></property>
+ </emphasis> are the same as for the <emphasis role="bold">
+ <property><rich:dataTable></property>
+ </emphasis>
+ <link linkend="DofCCS">component</link>. </para>
+
+ <para>In order to redefine styles for all <emphasis role="bold">
+ <property><rich:dataGrid></property>
+ </emphasis> components on a page using CSS, it's enough to create classes with the
+ same names and define necessary properties in them.</para>
+
+ <para>To change styles of particular <emphasis role="bold">
+ <property><rich:dataGrid></property>
+ </emphasis> components, define your own style classes in the corresponding <emphasis
+ role="bold">
+ <property><rich:dataGrid></property>
+ </emphasis>attributes.</para>
+ </section>
+ <section>
<title>Relevant Resources Links</title>
<para><ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/dataGrid.jsf?c=dataGrid"
- >Here</ulink> you can see the example of <emphasis role="bold"
- ><property><rich:dataGrid></property></emphasis> usage and sources for the given example. </para>
- </section>
+ >Here</ulink> you can see the example of <emphasis role="bold">
+ <property><rich:dataGrid></property>
+ </emphasis> usage and sources for the given example. </para>
+ </section>
</section>
-
\ No newline at end of file
Added: trunk/docs/userguide/en/src/main/resources/images/datagrid2.gif
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/datagrid2.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
18 years, 5 months