JBoss Rich Faces SVN: r4228 - trunk/cdk/generator/src/main/resources/META-INF/schema/entities.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-11-23 11:55:57 -0500 (Fri, 23 Nov 2007)
New Revision: 4228
Modified:
trunk/cdk/generator/src/main/resources/META-INF/schema/entities/draggable_attributes.ent
Log:
add ondropover, ondropout
Modified: trunk/cdk/generator/src/main/resources/META-INF/schema/entities/draggable_attributes.ent
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/schema/entities/draggable_attributes.ent 2007-11-23 16:54:29 UTC (rev 4227)
+++ trunk/cdk/generator/src/main/resources/META-INF/schema/entities/draggable_attributes.ent 2007-11-23 16:55:57 UTC (rev 4228)
@@ -24,6 +24,18 @@
<classname>java.lang.String</classname>
<description>A JavaScript event handler called after a drag operation</description>
</property>
+ <property>
+ <name>ondropover</name>
+ <classname>java.lang.String</classname>
+ <description>A JavaScript event handler called after a drop operation</description>
+ </property>
+ <property>
+ <name>ondropout</name>
+ <classname>java.lang.String</classname>
+ <description>A JavaScript event handler called after a out operation</description>
+ </property>
+
+
<property elonly="true" attachedstate="true">
<name>dragListener</name>
<classname>javax.faces.el.MethodBinding</classname>
18 years, 5 months
JBoss Rich Faces SVN: r4227 - in trunk/ui/drag-drop/src/main: java/org/richfaces/renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-11-23 11:54:29 -0500 (Fri, 23 Nov 2007)
New Revision: 4227
Modified:
trunk/ui/drag-drop/src/main/config/component/dragSupport.xml
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java
Log:
add ondropout ondropover client events
Modified: trunk/ui/drag-drop/src/main/config/component/dragSupport.xml
===================================================================
--- trunk/ui/drag-drop/src/main/config/component/dragSupport.xml 2007-11-23 16:51:26 UTC (rev 4226)
+++ trunk/ui/drag-drop/src/main/config/component/dragSupport.xml 2007-11-23 16:54:29 UTC (rev 4227)
@@ -61,7 +61,8 @@
<description>
JavaScript code for call before submission of ajax event
</description>
- </property>
+ </property>
+
<property hidden="true" >
<name>actionExpression</name>
</property>
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java 2007-11-23 16:51:26 UTC (rev 4226)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java 2007-11-23 16:54:29 UTC (rev 4227)
@@ -79,6 +79,8 @@
addOption("dragType", draggable.getDragType());
addEventHandler("ondragstart", draggable.getOndragstart());
addEventHandler("ondragend", draggable.getOndragend());
+ addEventHandler("ondropover",draggable.getOndropover());
+ addEventHandler("ondropout",draggable.getOndropout());
}
}
18 years, 5 months
JBoss Rich Faces SVN: r4226 - branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-11-23 11:51:26 -0500 (Fri, 23 Nov 2007)
New Revision: 4226
Modified:
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
Log:
active element style fixed
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-23 16:04:14 UTC (rev 4225)
+++ branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-11-23 16:51:26 UTC (rev 4226)
@@ -121,7 +121,7 @@
/*background : #EAF0F8; color : #4A75B5;*/
}
-.ol_internal_tab tr.ol_active td{
+.ol_internal_tab tr.ol_active * {
font-weight: bold;
/*color : #4A75B5;*/
}
18 years, 5 months
JBoss Rich Faces SVN: r4225 - in trunk/samples/calendar-sample/src/main: webapp/pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: akushunin
Date: 2007-11-23 11:04:14 -0500 (Fri, 23 Nov 2007)
New Revision: 4225
Modified:
trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java
trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp
Log:
Sample changes related with RF-1192
Modified: trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java
===================================================================
--- trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java 2007-11-23 16:02:37 UTC (rev 4224)
+++ trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java 2007-11-23 16:04:14 UTC (rev 4225)
@@ -47,6 +47,7 @@
private boolean showInput;
private boolean enableManualInput;
private boolean disabled;
+ private boolean showApplyButton;
private String pattern;
private Date currentDate;
private Date selectedDate;
@@ -56,6 +57,9 @@
private int counter;
+
+
+
private boolean useCustomDayLabels;
public Locale getLocale() {
@@ -102,6 +106,7 @@
showInput=true;
boundary = "inactive";
disabled = false;
+
}
@@ -233,4 +238,12 @@
public void setDisabled(boolean disabled) {
this.disabled = disabled;
}
+
+ public boolean isShowApplyButton() {
+ return showApplyButton;
+ }
+
+ public void setShowApplyButton(boolean showApplyButton) {
+ this.showApplyButton = showApplyButton;
+ }
}
\ No newline at end of file
Modified: trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp
===================================================================
--- trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp 2007-11-23 16:02:37 UTC (rev 4224)
+++ trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp 2007-11-23 16:04:14 UTC (rev 4225)
@@ -66,7 +66,8 @@
verticalOffset="3"
cellHeight="50"
cellWidth="50"
- mode="ajax">
+ mode="ajax"
+ showApplyButton="#{calendarBean.showApplyButton}">
<f:facet name="optionalHeader">
<h:outputText value="optionalHeader Facet" />
</f:facet>
@@ -100,12 +101,16 @@
<h:selectBooleanCheckbox value="#{calendarBean.popup}" onclick="submit()"/>
<h:outputText value="Custom day labels:" />
<h:selectBooleanCheckbox value="#{calendarBean.useCustomDayLabels}" onclick="submit()"/>
+ <h:outputText value="Show Apply Button:" />
+ <h:selectBooleanCheckbox value="#{calendarBean.showApplyButton}" onclick="submit()"/>
<h:outputText value="Select Date Pattern:"/>
<h:selectOneMenu value="MMM d, yyyy" onchange="submit()" valueChangeListener="#{calendarBean.selectPattern}">
<f:selectItem itemLabel="d/M/yy" itemValue="d/M/yy"/>
<f:selectItem itemLabel="dd/M/yy" itemValue="dd/M/yy"/>
<f:selectItem itemLabel="d/MMM/y" itemValue="d/MMM/y"/>
- <f:selectItem itemLabel="MMM d, yyyy" itemValue="MMM d, yyyy"/>
+ <f:selectItem itemLabel="MMM d, yyyy" itemValue="MMM d, yyyy"/>
+ <f:selectItem itemLabel="dd/M/yy HH:mm" itemValue="dd/M/yy HH:mm"/>
+ <f:selectItem itemLabel="MMM d, yyyy h:mm a" itemValue="MMM d, yyyy h:mm a"/>
</h:selectOneMenu>
<h:inputText id="selectdate"/><h:commandButton type="button" value="Select Date" onclick="$(this.form.id+':calendar').component.selectDate(this.form[this.form.id+':selectdate'].value);"/>
<h:outputText value="Select Popup Joint Point:" />
18 years, 5 months
JBoss Rich Faces SVN: r4224 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-11-23 11:02:37 -0500 (Fri, 23 Nov 2007)
New Revision: 4224
Added:
trunk/docs/userguide/en/src/main/resources/images/datadefinitionlist1.png
trunk/docs/userguide/en/src/main/resources/images/dataorderedlist1.png
Removed:
trunk/docs/userguide/en/src/main/resources/images/datadefinitionlist1.gif
trunk/docs/userguide/en/src/main/resources/images/datadefinitionlist2.gif
trunk/docs/userguide/en/src/main/resources/images/dataorderedlist1.gif
trunk/docs/userguide/en/src/main/resources/images/dataorderedlist2.gif
Modified:
trunk/docs/userguide/en/src/main/resources/images/dataorderedlist2.png
Log:
http://jira.jboss.com/jira/browse/RF-657 - updated picture
Deleted: trunk/docs/userguide/en/src/main/resources/images/datadefinitionlist1.gif
===================================================================
(Binary files differ)
Added: trunk/docs/userguide/en/src/main/resources/images/datadefinitionlist1.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/datadefinitionlist1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/docs/userguide/en/src/main/resources/images/datadefinitionlist2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/dataorderedlist1.gif
===================================================================
(Binary files differ)
Added: trunk/docs/userguide/en/src/main/resources/images/dataorderedlist1.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/dataorderedlist1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/docs/userguide/en/src/main/resources/images/dataorderedlist2.gif
===================================================================
(Binary files differ)
Modified: trunk/docs/userguide/en/src/main/resources/images/dataorderedlist2.png
===================================================================
(Binary files differ)
18 years, 5 months
JBoss Rich Faces SVN: r4223 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-11-23 11:01:52 -0500 (Fri, 23 Nov 2007)
New Revision: 4223
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.xml
trunk/docs/userguide/en/src/main/docbook/included/dataGrid.xml
trunk/docs/userguide/en/src/main/docbook/included/dataList.xml
trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.xml
Log:
http://jira.jboss.com/jira/browse/RF-657 - updated description
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.desc.xml 2007-11-23 15:15:42 UTC (rev 4222)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.desc.xml 2007-11-23 16:01:52 UTC (rev 4223)
@@ -13,7 +13,7 @@
<title>DataDefinitionList component</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/datadefinitionlist1.gif"/>
+ <imagedata fileref="images/datadefinitionlist1.png"/>
</imageobject>
</mediaobject>
</figure>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.xml 2007-11-23 15:15:42 UTC (rev 4222)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.xml 2007-11-23 16:01:52 UTC (rev 4223)
@@ -50,8 +50,8 @@
</para>
<programlisting role="XML"><![CDATA[...
<rich:dataDefinitionList value="#{bean.capitals}" var="caps">
- <f:facet name="term">United States Capitals</f:facet>
- <h:outputText value="#{caps.name}"/>
+ <f:facet name="term">Cars</f:facet>
+ <h:outputText value="#{car.model}"/>
</rich:dataDefinitionList>
...
]]></programlisting>
@@ -71,32 +71,82 @@
</section>
<section>
<title>Details of Usage</title>
-<para>The component takes a list from a model and outputs it as an ordered list. 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>It allows definition inside a facet with the <emphasis><property>"term"</property></emphasis> name to add HTML DT elements into a list.</para>
- <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>
- <emphasis role="bold">Example:</emphasis>
- </para>
+ <para>The <emphasis role="bold">
+ <property><rich:dataDefinitionList></property>
+ </emphasis> component allows to generate an definition list from a model.</para>
+ <para>The component has the <emphasis>
+ <property>"type"</property>
+ </emphasis> facet, which corresponds to the <emphasis>
+ <property>"type"</property>
+ </emphasis> parameter for the <emphasis>
+ <property>"DT"</property>
+ </emphasis> HTML element.</para>
+ <para>Here is an example:</para>
+
<programlisting role="XML"><![CDATA[...
- <rich:dataDefinitionList value="#{bean.capitals}" var="caps" ajaxKeys="#{listBean.list}"
- binding="#{listBean.dataList}" id="list">
- <h:outputText value="#{caps.name}"/>
+ <h:form>
+ <rich:dataDefinitionList var="car" value="#{dataTableScrollerBean.allCars}" rows="5" first="4" title="Cars">
+ <f:facet name="term">
+ <h:outputText value="#{car.make} #{car.model}"></h:outputText>
+ </f:facet>
+ <h:outputText value="Price:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car.price} " /><br/>
+ <h:outputText value="Mileage:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car.mileage} " /><br/>
+ </rich:dataDefinitionList>
+ </h:form>
+...
+]]></programlisting>
+
+ <para>This is a result:</para>
+
+ <figure>
+ <title>Component usage</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/datadefinitionlist1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the example the <emphasis>
+ <property>"rows"</property>
+ </emphasis> attribute limits number of output elements of the list.</para>
+
+ <para><emphasis>
+ <property>"first"</property>
+ </emphasis> attribute defines first element for output. <emphasis>
+ <property>"title"</property>
+ </emphasis> are used for popup title.</para>
+
+ <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 elements 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:dataDefinitionList value="#{dataTableScrollerBean.allCars}" var="car" ajaxKeys="#{listBean.list}"
+ binding="#{listBean.dataList}" id="list" rows="5" type="disc">
+ <h:outputText value="#{car.make} #{car.model}"></h:outputText>
</rich:dataDefinitionList>
...
<a4j:commandButton action"#{listBean.action}" reRender="list" value="Submit"/>
...
]]></programlisting>
-<para>Here during the action is processed the ajaxKeys set is composed into a list and then update
- specified for the whole table actually happens only for the chosen set of rows.</para>
+
+ <para> In the example <emphasis>
+ <property>"reRender"</property>
+ </emphasis> attribute contains value of <emphasis>
+ <property>"id"</property>
+ </emphasis> attribute for <emphasis role="bold">
+ <property><rich:dataDefinitionList></property>
+ </emphasis> component. As a result the component are updated after an Ajax request.</para>
+
</section>
<section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataGrid.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataGrid.xml 2007-11-23 15:15:42 UTC (rev 4222)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataGrid.xml 2007-11-23 16:01:52 UTC (rev 4223)
@@ -51,8 +51,8 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
- <rich:dataGrid value="#{bean.capitals}" var="caps" columns="4">
- <h:outputText value="#{caps.name}"/>
+ <rich:dataGrid value="#{dataTableScrollerBean.allCars}" var="car">
+ <h:outputText value="#{car.model}"/>
</rich:dataGrid>
...
]]></programlisting>
@@ -112,9 +112,9 @@
</f:facet>
<h:panelGrid columns="2">
<h:outputText value="Price:" styleClass="label"></h:outputText>
- <h:outputText value="#{car.price}" />
+ <h:outputText value="#{car.price}"/>
<h:outputText value="Mileage:" styleClass="label"></h:outputText>
- <h:outputText value="#{car.mileage}" />
+ <h:outputText value="#{car.mileage}"/>
</h:panelGrid>
</rich:panel>
<f:facet name="footer">
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataList.xml 2007-11-23 15:15:42 UTC (rev 4222)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataList.xml 2007-11-23 16:01:52 UTC (rev 4223)
@@ -53,7 +53,7 @@
</para>
<programlisting role="XML"><![CDATA[...
<rich:dataList var="car" value="#{dataTableScrollerBean.allCars}" >
- <h:outputText value="#{cars.name}"/>
+ <h:outputText value="#{car.model}"/>
</rich:dataList>
...
]]></programlisting>
@@ -80,7 +80,7 @@
</emphasis> attribute, which corresponds to the <emphasis>
<property>"type"</property>
</emphasis> parameter for the <emphasis>
- <property>"ul"</property>
+ <property>"UL"</property>
</emphasis> HTML element and defines a marker type. Possible values for <emphasis>
<property>"type"</property>
</emphasis> attribute are: <property>"disc"</property>,
@@ -90,12 +90,12 @@
<programlisting role="XML"><![CDATA[...
<h:form>
- <rich:dataList var="car" value="#{dataTableScrollerBean.allCars}" rows="5" type="disc">
+ <rich:dataList var="car" value="#{dataTableScrollerBean.allCars}" rows="5" type="disc" title="Car Store">
<h:outputText value="#{car.make} #{car.model}"/><br/>
<h:outputText value="Price:" styleClass="label"></h:outputText>
- <h:outputText value="#{car.price} " /><br/>
+ <h:outputText value="#{car.price} "/><br/>
<h:outputText value="Mileage:" styleClass="label"></h:outputText>
- <h:outputText value="#{car.mileage} " /><br/>
+ <h:outputText value="#{car.mileage} "/><br/>
</rich:dataList>
</h:form>
...
@@ -145,7 +145,7 @@
<rich:dataList value="#{dataTableScrollerBean.allCars}" var="car" ajaxKeys="#{listBean.list}"
binding="#{listBean.dataList}" id="list" rows="5" type="disc">
<h:outputText value="#{car.make} #{car.model}"></h:outputText>
- </rich:dataGrid>
+ </rich:dataList>
...
<a4j:commandButton action"#{listBean.action}" reRender="list" value="Submit"/>
...
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.desc.xml 2007-11-23 15:15:42 UTC (rev 4222)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.desc.xml 2007-11-23 16:01:52 UTC (rev 4223)
@@ -13,7 +13,7 @@
<title>DataOrderedList component</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/dataorderedlist1.gif"/>
+ <imagedata fileref="images/dataorderedlist1.png"/>
</imageobject>
</mediaobject>
</figure>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.xml 2007-11-23 15:15:42 UTC (rev 4222)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.xml 2007-11-23 16:01:52 UTC (rev 4223)
@@ -1,183 +1,236 @@
<?xml version='1.0' encoding='UTF-8'?>
<section>
-<sectioninfo>
-<keywordset>
-<keyword>rich:dataOrderedList</keyword>
-<keyword>HtmlDataOrderedList</keyword>
-<keyword>ordered list</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.DataOrderedList</entry>
- </row>
- <row>
- <entry>component-class</entry>
- <entry>org.richfaces.component.html.HtmlDataOrderedList</entry>
- </row>
- <row>
+ <sectioninfo>
+ <keywordset>
+ <keyword>rich:dataOrderedList</keyword>
+ <keyword>HtmlDataOrderedList</keyword>
+ <keyword>ordered list</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.DataOrderedList</entry>
+ </row>
+ <row>
+ <entry>component-class</entry>
+ <entry>org.richfaces.component.html.HtmlDataOrderedList</entry>
+ </row>
+ <row>
<entry>component-family</entry>
<entry>org.richfaces.DataOrderedList</entry>
- </row>
- <row>
+ </row>
+ <row>
<entry>renderer-type</entry>
<entry>org.richfaces.DataOrderedListRenderer</entry>
- </row>
- <row>
- <entry>tag-class</entry>
- <entry>org.richfaces.taglib.DataOrderedListTag</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
+ </row>
+ <row>
+ <entry>tag-class</entry>
+ <entry>org.richfaces.taglib.DataOrderedListTag</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
<section>
<title>Creating the Component with a Page Tag</title>
- <para>To create the simplest variant of <property>dataOrderedList</property> on a page, use the following syntax:</para>
+ <para>To create the simplest variant of <property>dataOrderedList</property> on a page, use the
+ following syntax:</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
- <rich:dataOrderedList value="#{bean.capitals}" var="caps">
- <h:outputText value="#{caps.name}"/>
+ <rich:dataOrderedList var="car" value="#{dataTableScrollerBean.allCars}" >
+ <h:outputText value="#{car.model}"/>
</rich:dataOrderedList>
...
]]></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.HtmlDataOrderedList;
+ <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlDataOrderedList;
...
HtmlDataOrderedList myList = new HtmlDataOrderedList();
...
]]></programlisting>
-</section>
-<section>
-<title>Details of Usage</title>
-<para>The component takes a list from a model and outputs it as an ordered list. The component also has
-similar to ordinary UIData components output ways:</para>
-<itemizedlist>
-<listitem>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 has the <emphasis ><property>"type"</property></emphasis> attribute corresponding to the <emphasis><property>"ul"</property></emphasis> HTML element.</para>
- <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>
+ </section>
+ <section>
+ <title>Details of Usage</title>
+ <para>The <emphasis role="bold">
+ <property><rich:dataOrderedList></property>
+ </emphasis> component allows to generate an ordered list from a model.</para>
+ <para>The component has the <emphasis>
+ <property>"type"</property>
+ </emphasis> attribute, which corresponds to the <emphasis>
+ <property>"type"</property>
+ </emphasis> parameter for the <emphasis>
+ <property>"OL"</property>
+ </emphasis> HTML element and defines a marker type. Possible values for <emphasis>
+ <property>"type"</property>
+ </emphasis> attribute are: <property>"A"</property>,
+ <property>"a"</property>, <property>"I"</property>,
+ <property>"i"</property>,<property>"1"</property>.</para>
+ <para>Here is an example:</para>
+ <programlisting role="XML"><![CDATA[...
+ <h:form>
+ <rich:dataOrderedList var="car" value="#{dataTableScrollerBean.allCars}" rows="5" type="1" title="Car Store">
+ <h:outputText value="#{car.make} #{car.model}"/><br/>
+ <h:outputText value="Price:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car.price} " /><br/>
+ <h:outputText value="Mileage:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car.mileage} " /><br/>
+ </rich:dataOrderedList>
+ </h:form>
+...
+]]></programlisting>
+
+ <para>This is a result:</para>
+
+ <figure>
+ <title>Component usage</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/dataorderedlist1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the example the <emphasis>
+ <property>"rows"</property>
+ </emphasis> attribute limits number of output elements of the list.</para>
+
+ <para><emphasis>
+ <property>"first"</property>
+ </emphasis> attribute defines first element for output. <emphasis>
+ <property>"title"</property>
+ </emphasis> are used for popup title.</para>
+
+ <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 elements 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:dataOrderedList value="#{bean.capitals}" var="caps" ajaxKeys="#{listBean.list}"
- binding="#{listBean.dataList}" id="list">
- <h:outputText value="#{caps.name}"/>
+ <programlisting role="XML"><![CDATA[...
+ <rich:dataOrderedList value="#{dataTableScrollerBean.allCars}" var="car" ajaxKeys="#{listBean.list}"
+ binding="#{listBean.dataList}" id="list" rows="5" type="disc">
+ <h:outputText value="#{car.make} #{car.model}"></h:outputText>
</rich:dataOrderedList>
...
- <a4j:commandButton action"#{listBean.action}" reRender="list" value="Submit">
+ <a4j:commandButton action"#{listBean.action}" reRender="list" value="Submit"/>
...
]]></programlisting>
-<para>Here during the action is processed the ajaxKeys set is composed into a list and then update
- specified for the whole table actually happens only for the chosen set of rows.</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:dataOrderedList></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:dataOrderedList></property>
- </emphasis> component</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section>
- <title>Definition of Custom Style Classes</title>
-
- <para>On the screenshot there are classes names that define styles for component elements.</para>
-
- <figure>
- <title>Style classes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/dataorderedlist2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <table>
- <title>Classes names that define a list appearance</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Class name</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>rich-orderedlist</entry>
- <entry>Defines styles for an html <ol> element</entry>
- </row>
- <row>
- <entry>rich-list-item</entry>
- <entry>Defines styles for an html <li> element</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <para>In order to redefine styles for all <emphasis role="bold">
- <property><rich:dataOrderedList></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:dataOrderedList></property>
- </emphasis> components, define your own style classes in the corresponding <emphasis
- role="bold">
- <property><rich:dataOrderedList></property>
- </emphasis>attributes.</para>
- </section>
+ <para> In the example <emphasis>
+ <property>"reRender"</property>
+ </emphasis> attribute contains value of <emphasis>
+ <property>"id"</property>
+ </emphasis> attribute for <emphasis role="bold">
+ <property><rich:dataOrderedList></property>
+ </emphasis> component. As a result the component are updated after an Ajax request.</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:dataOrderedList></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:dataOrderedList></property>
+ </emphasis> component</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section>
+ <title>Definition of Custom Style Classes</title>
+
+ <para>On the screenshot there are classes names that define styles for component elements.</para>
+
+ <figure>
+ <title>Style classes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/dataorderedlist2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <table>
+ <title>Classes names that define a list appearance</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>rich-orderedlist</entry>
+ <entry>Defines styles for an html <ol> element</entry>
+ </row>
+ <row>
+ <entry>rich-list-item</entry>
+ <entry>Defines styles for an html <li> element</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>In order to redefine styles for all <emphasis role="bold">
+ <property><rich:dataOrderedList></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:dataOrderedList></property>
+ </emphasis> components, define your own style classes in the corresponding <emphasis
+ role="bold">
+ <property><rich:dataOrderedList></property>
+ </emphasis>attributes.</para>
+ </section>
+ <section>
<title>Relevant Resources Links</title>
- <para><ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/dataLists.jsf?c=dataO..."
- >Here</ulink> you can see the example of <emphasis role="bold"
- ><property><rich:dataOrderedList ></property></emphasis> usage and sources for the given example. </para>
- </section>
+ <para><ulink
+ url="http://livedemo.exadel.com/richfaces-demo/richfaces/dataLists.jsf?c=dataO..."
+ >Here</ulink> you can see the example of <emphasis role="bold">
+ <property><rich:dataOrderedList ></property>
+ </emphasis> usage and sources for the given example. </para>
+ </section>
</section>
-
\ No newline at end of file
18 years, 5 months
JBoss Rich Faces SVN: r4222 - branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-23 10:15:42 -0500 (Fri, 23 Nov 2007)
New Revision: 4222
Modified:
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
Log:
component was corrected
Modified: branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2007-11-23 14:13:32 UTC (rev 4221)
+++ branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2007-11-23 15:15:42 UTC (rev 4222)
@@ -18,10 +18,10 @@
initControlList : function(containerId, ids) {
for (var i = 0; i < ids.length; i++) {
var id = ids[i];
- var node = document.getElementById(containerId + id[0]);
- var disNode = document.getElementById(containerId + id[1]);
+ var node = $(containerId + id[0]);
+ var disNode = $(containerId + id[1]);
if (node && disNode) {
- node.observe('click', Richfaces.OrderingList.HANDLERS[id[0]].bindAsEventListener(this));
+ node.observe('click', Richfaces.OrderingList.HANDLERS[id[0]].bindAsEventListener(this));
this.controlList[i] = new Control(node, disNode, false, false, id[0]);
}
}
18 years, 5 months
JBoss Rich Faces SVN: r4220 - management/design/orderingList.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2007-11-23 09:13:15 -0500 (Fri, 23 Nov 2007)
New Revision: 4220
Modified:
management/design/orderingList/FuncSpec - orderingList.doc
Log:
Modified: management/design/orderingList/FuncSpec - orderingList.doc
===================================================================
(Binary files differ)
18 years, 5 months
JBoss Rich Faces SVN: r4219 - in branches/3.1.x/ui/componentControl: src/main/java/org/richfaces/sandbox/component and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-11-23 09:12:08 -0500 (Fri, 23 Nov 2007)
New Revision: 4219
Added:
branches/3.1.x/ui/componentControl/src/test/java/org/richfaces/component/
branches/3.1.x/ui/componentControl/src/test/java/org/richfaces/component/ComponentControlTest.java
branches/3.1.x/ui/componentControl/src/test/java/org/richfaces/component/JSFComponentTest.java
Removed:
branches/3.1.x/ui/componentControl/src/test/java/org/richfaces/component/JSFComponentTest.java
branches/3.1.x/ui/componentControl/src/test/java/org/richfaces/sandbox/
Modified:
branches/3.1.x/ui/componentControl/pom.xml
branches/3.1.x/ui/componentControl/src/main/java/org/richfaces/sandbox/component/UIComponentControl.java
Log:
http://jira.jboss.com/jira/browse/RF-1367
Modified: branches/3.1.x/ui/componentControl/pom.xml
===================================================================
--- branches/3.1.x/ui/componentControl/pom.xml 2007-11-23 13:42:45 UTC (rev 4218)
+++ branches/3.1.x/ui/componentControl/pom.xml 2007-11-23 14:12:08 UTC (rev 4219)
@@ -21,6 +21,13 @@
<goal>generate</goal>
</goals>
</execution>
+ <execution>
+ <id>generate-test-sources</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>generate-tests</goal>
+ </goals>
+ </execution>
</executions>
<configuration>
<library>
@@ -46,4 +53,4 @@
<version>3.1.3-SNAPSHOT</version>
</dependency>
</dependencies>
-</project>
\ No newline at end of file
+</project>
Modified: branches/3.1.x/ui/componentControl/src/main/java/org/richfaces/sandbox/component/UIComponentControl.java
===================================================================
--- branches/3.1.x/ui/componentControl/src/main/java/org/richfaces/sandbox/component/UIComponentControl.java 2007-11-23 13:42:45 UTC (rev 4218)
+++ branches/3.1.x/ui/componentControl/src/main/java/org/richfaces/sandbox/component/UIComponentControl.java 2007-11-23 14:12:08 UTC (rev 4219)
@@ -165,5 +165,10 @@
}
}
}
+
+ public abstract void setName(String name);
+ public abstract String getName();
+ public abstract void setAttachTiming( String attachTiming);
+ public abstract String getAttachTiming();
}
Copied: branches/3.1.x/ui/componentControl/src/test/java/org/richfaces/component (from rev 4177, branches/3.1.x/ui/componentControl/src/test/java/org/richfaces/sandbox/component)
Added: branches/3.1.x/ui/componentControl/src/test/java/org/richfaces/component/ComponentControlTest.java
===================================================================
--- branches/3.1.x/ui/componentControl/src/test/java/org/richfaces/component/ComponentControlTest.java (rev 0)
+++ branches/3.1.x/ui/componentControl/src/test/java/org/richfaces/component/ComponentControlTest.java 2007-11-23 14:12:08 UTC (rev 4219)
@@ -0,0 +1,176 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.component;
+
+import javax.faces.FacesException;
+import javax.faces.component.UICommand;
+import javax.faces.component.UIForm;
+import javax.faces.component.UIInput;
+import javax.faces.component.UIOutput;
+import javax.faces.component.UIParameter;
+import javax.faces.component.html.HtmlForm;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.sandbox.component.UIComponentControl;
+
+import com.gargoylesoftware.htmlunit.html.HtmlInput;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
+/**
+ * Unit test for simple Component.
+ */
+public class ComponentControlTest extends AbstractAjax4JsfTestCase {
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public ComponentControlTest( String testName )
+ {
+ super( testName );
+ }
+
+ private UIForm form = null;
+ private UIComponentControl componentControl = null;
+ private UIInput input = null;
+ private UIOutput output = null;
+ public UIParameter param = null;
+
+ public void setUp() throws Exception {
+ super.setUp();
+
+ application.addComponent(UIComponentControl.COMPONENT_TYPE, "org.richfaces.sandbox.component.html.HtmlComponentControl");
+
+ form = new HtmlForm();
+ form.setId("form");
+ facesContext.getViewRoot().getChildren().add(form);
+
+ input = new UIInput();
+ input.setId("input");
+ input.setValue("value");
+ form.getChildren().add(input);
+
+ componentControl = (UIComponentControl) application.createComponent(UIComponentControl.COMPONENT_TYPE);
+ componentControl.setEvent("onclick");
+ componentControl.setOperation("testOperation");
+ componentControl.setName("testName");
+ componentControl.setId("componentControl");
+ componentControl.setParams("x:'y'");
+ componentControl.setFor("button");
+ input.getChildren().add(componentControl);
+
+ output = new UIOutput();
+ output.setId("output");
+ output.setValue("test");
+ form.getChildren().add(output);
+
+ param = new UIParameter();
+ param.setName("name");
+ param.setValue("value");
+ componentControl.getChildren().add(param);
+ }
+
+ public void tearDown() throws Exception {
+ super.tearDown();
+
+ param = null;
+ input = null;
+ componentControl = null;
+ output = null;
+ form = null;
+ }
+
+ public void testEventString() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+
+ HtmlInput htmlInput = (HtmlInput)page.getHtmlElementById(input.getClientId(facesContext));
+ assertNotNull(htmlInput);
+
+ String eventString = htmlInput.getAttributeValue("onclick");
+ assertNotNull(eventString);
+ assertTrue(eventString.contains("Richfaces.componentControl.performOperation"));
+ String [] params = eventString.split(",");
+ assertEquals(5, params.length);
+
+ assertTrue(params[0].trim().endsWith("event"));
+ assertEquals("'#button'", params[1].trim());
+ assertEquals("'testOperation'", params[2].trim());
+ assertTrue(params[3].trim().startsWith("{"));
+ assertTrue(params[4].trim().endsWith("});"));
+
+ assertTrue( true );
+ }
+
+ public void testParametersMap() throws Exception {
+ String paramMap = componentControl.getEncodedParametersMap();
+ assertNotNull(paramMap);
+
+ String [] arr = paramMap.split(",");
+ assertEquals(2, arr.length);
+
+ String [] arr1 = arr[0].split(":");
+ assertEquals(2, arr1.length);
+ String [] arr2 = arr[1].split(":");
+ assertEquals(2, arr2.length);
+ if ("x".equals(arr1[0].trim())) {
+ assertEquals("'y'", arr1[1].trim());
+ assertEquals("'name'", arr2[0].trim());
+ assertEquals("'value'", arr2[1].trim());
+ } else {
+ assertEquals("'name'", arr1[0].trim());
+ assertEquals("'value'", arr1[1].trim());
+ assertEquals("x", arr2[0].trim());
+ assertEquals("'y'", arr2[1].trim());
+ }
+
+ param.setName(null);
+ try {
+ renderView();
+ assertTrue("Parameter name is null, but exception isn't thrown!", false);
+ } catch (IllegalArgumentException e) {
+
+ }
+ }
+
+ public void testCheckValidity() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+
+ componentControl.setAttachTiming("wrong value");
+ try {
+ renderView();
+ assertTrue("attachTiming attribute has wrong value, but exception isn't thrown!", false);
+ } catch (FacesException e) {
+
+ }
+
+ componentControl.setAttachTiming("onload");
+ componentControl.setOperation("");
+ try {
+ renderView();
+ assertTrue("operation is empty, but exception isn't thrown!", false);
+ } catch (FacesException e) {
+
+ }
+ }
+}
Deleted: branches/3.1.x/ui/componentControl/src/test/java/org/richfaces/component/JSFComponentTest.java
===================================================================
--- branches/3.1.x/ui/componentControl/src/test/java/org/richfaces/sandbox/component/JSFComponentTest.java 2007-11-22 12:30:58 UTC (rev 4177)
+++ branches/3.1.x/ui/componentControl/src/test/java/org/richfaces/component/JSFComponentTest.java 2007-11-23 14:12:08 UTC (rev 4219)
@@ -1,53 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.sandbox.component;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import javax.faces.component.UIComponent;
-
-/**
- * Unit test for simple Component.
- */
-public class JSFComponentTest
- extends TestCase
-{
- /**
- * Create the test case
- *
- * @param testName name of the test case
- */
- public JSFComponentTest( String testName )
- {
- super( testName );
- }
-
-
- /**
- * Rigourous Test :-)
- */
- public void testComponent()
- {
- assertTrue( true );
- }
-}
Copied: branches/3.1.x/ui/componentControl/src/test/java/org/richfaces/component/JSFComponentTest.java (from rev 4217, branches/3.1.x/ui/componentControl/src/test/java/org/richfaces/sandbox/component/JSFComponentTest.java)
===================================================================
--- branches/3.1.x/ui/componentControl/src/test/java/org/richfaces/component/JSFComponentTest.java (rev 0)
+++ branches/3.1.x/ui/componentControl/src/test/java/org/richfaces/component/JSFComponentTest.java 2007-11-23 14:12:08 UTC (rev 4219)
@@ -0,0 +1,53 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.sandbox.component;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import javax.faces.component.UIComponent;
+
+/**
+ * Unit test for simple Component.
+ */
+public class JSFComponentTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public JSFComponentTest( String testName )
+ {
+ super( testName );
+ }
+
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testComponent()
+ {
+ assertTrue( true );
+ }
+}
18 years, 5 months
JBoss Rich Faces SVN: r4218 - in branches/3.1.x/sandbox/ui/listShuttle/src/main: java/org/richfaces/renderkit and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-23 08:42:45 -0500 (Fri, 23 Nov 2007)
New Revision: 4218
Modified:
branches/3.1.x/sandbox/ui/listShuttle/src/main/config/component/listShuttle.xml
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleRendererBase.java
branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
Log:
cosmetic changes
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/config/component/listShuttle.xml
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/config/component/listShuttle.xml 2007-11-23 12:20:45 UTC (rev 4217)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/config/component/listShuttle.xml 2007-11-23 13:42:45 UTC (rev 4218)
@@ -21,6 +21,7 @@
org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
</superclass>
</tag>
+
<!--
<taghandler>
<classname>org.ajax4jsf.tag.TestHandler</classname>
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleRendererBase.java
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleRendererBase.java 2007-11-23 12:20:45 UTC (rev 4217)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleRendererBase.java 2007-11-23 13:42:45 UTC (rev 4218)
@@ -15,12 +15,18 @@
import org.ajax4jsf.component.UIDataAdaptor;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.richfaces.component.UIListShuttle;
+import org.richfaces.component.UIOrderingBaseComponent;
/**
* @author Nick Belaevski
*
*/
public abstract class ListShuttleRendererBase extends OrderingComponentRendererBase {
+
+ public final static String FACET_SOURCE_CAPTION = "sourceCaption";
+
+ public final static String FACET_TARGET_CAPTION = "targetCaption";
+
private static final String MESSAGE_BUNDLE_NAME = OrderingListRendererBase.class.getPackage().getName() + "ListShuttle";
@@ -43,26 +49,26 @@
super(MESSAGE_BUNDLE_NAME);
}
- public void encodeTLCaption(FacesContext context, UIListShuttle shuttle) {
-
+ public void encodeTLCaption(FacesContext context, UIComponent shuttle) throws IOException {
+ encodeCaption(context, shuttle, FACET_TARGET_CAPTION, "ol_label ol_out_label rich-ordering-list-caption");
}
- public void encodeTLHeader(FacesContext context, UIListShuttle shuttle) {
-
+ public void encodeTLHeader(FacesContext context, UIOrderingBaseComponent shuttle) throws IOException {
+ encodeHeader(context, shuttle, "rich-table-header", "ol_col rich-table-header-cell", "sourceHeaderClass");
}
public void encodeTLRows(FacesContext context, UIListShuttle shuttle) throws IOException {
encodeRows(context, shuttle, new ListShuttleRendererTableHolder(shuttle, false));
}
- public void encodeSLCaption(FacesContext context, UIListShuttle shuttle) {
-
+ public void encodeSLCaption(FacesContext context, UIListShuttle shuttle) throws IOException {
+ encodeCaption(context, shuttle, FACET_SOURCE_CAPTION, "ol_label ol_out_label rich-ordering-list-caption");
}
public void encodeTLControlsFacets(FacesContext context, UIListShuttle shuttle) {
}
- public void encodeSLHeader(FacesContext context, UIListShuttle shuttle) {
-
+ public void encodeSLHeader(FacesContext context, UIOrderingBaseComponent shuttle) throws IOException {
+ encodeHeader(context, shuttle, "rich-table-header", "ol_col rich-table-header-cell", "sourceHeaderClass");
}
public void encodeSLRows(FacesContext context, UIListShuttle shuttle) throws IOException {
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2007-11-23 12:20:45 UTC (rev 4217)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2007-11-23 13:42:45 UTC (rev 4218)
@@ -90,6 +90,7 @@
this.moveItem(sourceComponent, targetComponent, item);
}
this.controlListManager();
+ this.sourceList.controlListManager();
this.saveState();
}
},
18 years, 5 months