JBoss Rich Faces SVN: r3966 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-11-13 13:42:17 -0500 (Tue, 13 Nov 2007)
New Revision: 3966
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
Log:
http://jira.jboss.com/jira/browse/RF-794 - rewrote question in the FAQ.
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-11-13 18:40:25 UTC (rev 3965)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-11-13 18:42:17 UTC (rev 3966)
@@ -481,14 +481,12 @@
<section id="RerenderingPartPage">
<?dbhtml filename="RerenderingPartPage.html"?>
<title>How to reRender only particular row(s) of dataTable?</title>
- <para> If you use dataTable then you may use ajaxKeys attribute to bind the rowKeys
- to be reRendered there. After you need to point reRender on the whole table
- and only specified rows will be reRendered.
- <!--
- Also the example of usage of <emphasis role="bold"
- ><a4j:repeat></emphasis> component are available <ulink
- url="http://livedemo.exadel.com/richfaces-demo/richfaces/repeat.jsf?c=repeat">here</ulink>.
- -->
+ <para> If you use dataTable then you may use <emphasis>
+ <property>"ajaxKeys"</property>
+ </emphasis> attribute to bind the rowKeys to be reRendered there. After you
+ need to point reRender on the specific rows. See also <link
+ linkend="IterationcomponentsAjaxattributes"
+ >"Iteration components Ajax attributes section".</link>
</para>
</section>
@@ -606,9 +604,9 @@
</rich:suggestionbox>
...
]]></programlisting>
- <para>In the example <property>"onselect"</property> event is used for sending selected
- value to the server. It's also possible to pass additional fields
- of selected object (which don't belong to <emphasis>
+ <para>In the example <property>"onselect"</property> event is used
+ for sending selected value to the server. It's also possible to
+ pass additional fields of selected object (which don't belong to <emphasis>
<property>"fetchvalue"</property>
</emphasis> attribute.)</para>
</section>
18 years, 5 months
JBoss Rich Faces SVN: r3965 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-11-13 13:40:25 -0500 (Tue, 13 Nov 2007)
New Revision: 3965
Modified:
trunk/docs/userguide/en/src/main/docbook/included/repeat.xml
Log:
http://jira.jboss.com/jira/browse/RF-926 - fixed errors in example.
Modified: trunk/docs/userguide/en/src/main/docbook/included/repeat.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/repeat.xml 2007-11-13 18:33:53 UTC (rev 3964)
+++ trunk/docs/userguide/en/src/main/docbook/included/repeat.xml 2007-11-13 18:40:25 UTC (rev 3965)
@@ -61,20 +61,21 @@
<property>"ajaxKeys"</property>
</emphasis> attribute. This attribute defines strings that are updated after an Ajax request. As a result it becomes easier to update several child components separately without updating the whole page.</para>
-<programlisting role="XML"><![CDATA[<a4j:poll intervall="1000" action="#{repeater.action}" reRender="list">
+ <programlisting role="XML"><![CDATA[...
+ <a4j:poll intervall="1000" action="#{repeater.action}" reRender="text">
+ <table>
+ <tbody>
+ <a4j:repeat value="#{bean.props}" var="detail" ajaxKeys="#{repeater.ajaxedRowsSet}">
+ <tr>
+ <td>
+ <h:outputText value="detail.someProperty" id="text"/>
+ </td>
+ </tr>
+ </a4j:repeat>
+ </tbody>
+ </table>
+ </a4j:poll>
...
-<table>
- <tbody>
- <a4j:repeat value="#{bean.props}" var="detail" binding="#{repeater.myRepeat}"
- id="list" ajaxKeys="#{repeater.ajaxedRowsSet}">
- </tr>
- <td>
- <h:outputText value="detail.someProperty">
- </td>
- </tr>
- </a4j:repeat>
- <tbody>
-<table>
]]></programlisting>
<para>Thus, a list with a table structure from <emphasis >
18 years, 5 months
JBoss Rich Faces SVN: r3964 - in trunk/sandbox/ui/componentControl/src/main: resources and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-11-13 13:33:53 -0500 (Tue, 13 Nov 2007)
New Revision: 3964
Added:
trunk/sandbox/ui/componentControl/src/main/resources/
trunk/sandbox/ui/componentControl/src/main/resources/org/
trunk/sandbox/ui/componentControl/src/main/resources/org/richfaces/
trunk/sandbox/ui/componentControl/src/main/resources/org/richfaces/renderkit/
trunk/sandbox/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/
trunk/sandbox/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/script/
trunk/sandbox/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js
Log:
component/componentControl js
Added: trunk/sandbox/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js
===================================================================
--- trunk/sandbox/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js (rev 0)
+++ trunk/sandbox/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js 2007-11-13 18:33:53 UTC (rev 3964)
@@ -0,0 +1,22 @@
+if (!window.Richfaces) {
+window.Richfaces = {};
+}
+
+if (!Richfaces.componentControl) {
+ Richfaces.componentControl = {};
+}
+
+Richfaces.componentControl.attachEvent = function(attachTo, cevent, aevent, forAttr, operation, params) {
+ jQuery(attachTo).bind(Richfaces.effectEventOnOut(aevent), function() {
+ jQuery( forAttr)[0].component[operation](cevent, params);
+ });
+};
+
+Richfaces.componentControl.performOperation = function( cevent, forAttr, operation, params) {
+ jQuery( forAttr)[0].component[operation](cevent, params);
+};
+
+
+Richfaces.effectEventOnOut = function(ename) {
+ return ename.substr(0,2) == 'on' ? ename.substr(2) : ename;
+};
18 years, 5 months
JBoss Rich Faces SVN: r3963 - trunk/ui/effect/src/main/resources/org/richfaces/renderkit/html/script.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-11-13 13:24:23 -0500 (Tue, 13 Nov 2007)
New Revision: 3963
Added:
trunk/ui/effect/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js
Log:
cc file
Added: trunk/ui/effect/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js
===================================================================
--- trunk/ui/effect/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js (rev 0)
+++ trunk/ui/effect/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js 2007-11-13 18:24:23 UTC (rev 3963)
@@ -0,0 +1,22 @@
+if (!window.Richfaces) {
+window.Richfaces = {};
+}
+
+if (!Richfaces.componentControl) {
+ Richfaces.componentControl = {};
+}
+
+Richfaces.componentControl.attachEvent = function(attachTo, cevent, aevent, forAttr, operation, params) {
+ jQuery(attachTo).bind(Richfaces.effectEventOnOut(aevent), function() {
+ jQuery( forAttr)[0].component[operation](cevent, params);
+ });
+};
+
+Richfaces.componentControl.performOperation = function( cevent, forAttr, operation, params) {
+ jQuery( forAttr)[0].component[operation](cevent, params);
+};
+
+
+Richfaces.effectEventOnOut = function(ename) {
+ return ename.substr(0,2) == 'on' ? ename.substr(2) : ename;
+};
18 years, 5 months
JBoss Rich Faces SVN: r3962 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2007-11-13 13:17:10 -0500 (Tue, 13 Nov 2007)
New Revision: 3962
Modified:
trunk/docs/userguide/en/src/main/docbook/included/listShuttle.desc.xml
Log:
RF-1174 - fix section Key Features
Modified: trunk/docs/userguide/en/src/main/docbook/included/listShuttle.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/listShuttle.desc.xml 2007-11-13 18:15:37 UTC (rev 3961)
+++ trunk/docs/userguide/en/src/main/docbook/included/listShuttle.desc.xml 2007-11-13 18:17:10 UTC (rev 3962)
@@ -21,7 +21,7 @@
<listitem>Skinnable <property>listShuttle</property> and child items</listitem>
<listitem>Customizable component layout (captions, headers, list items and control sets)</listitem>
<listitem>Disabled/enabled ordering controls</listitem>
- <listitem>Drag-and-drop support</listitem>
+ <listitem> Built-In Drag-and-drop support</listitem>
</itemizedlist>
</section>
</section>
18 years, 5 months
JBoss Rich Faces SVN: r3961 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2007-11-13 13:15:37 -0500 (Tue, 13 Nov 2007)
New Revision: 3961
Modified:
trunk/docs/userguide/en/src/main/docbook/included/orderingList.xml
Log:
RF-1184 - fix section Page of Usage, add examples
Modified: trunk/docs/userguide/en/src/main/docbook/included/orderingList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/orderingList.xml 2007-11-13 18:14:47 UTC (rev 3960)
+++ trunk/docs/userguide/en/src/main/docbook/included/orderingList.xml 2007-11-13 18:15:37 UTC (rev 3961)
@@ -6,6 +6,46 @@
<keyword>orderingList</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.OrderingList</entry>
+ </row>
+ <row>
+ <entry>component-class</entry>
+
+ <entry>org.richfaces.component.html.HtmlOrderingList</entry>
+ </row>
+ <row>
+ <entry>component-family</entry>
+
+ <entry>org.richfaces.OrderingList</entry>
+ </row>
+ <row>
+ <entry>renderer-type</entry>
+
+ <entry>org.richfaces.OrderingListRenderer</entry>
+ </row>
+ <row>
+ <entry>tag-class</entry>
+
+ <entry>org.richfaces.taglib.OrderingListTagHandler</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
<section>
<title>Creating the Component with a Page Tag</title>
<para>Here is a simple example as it could be used on a page: </para>
@@ -16,7 +56,10 @@
<programlisting role="XML"><![CDATA[...
<rich:orderingList value="#{bean.list}" var="list">
<rich:column>
- <h:outputText value="#{list.text}">
+ <f:facet name="header">
+ <h:outputText value="Name" />
+ </f:facet>
+ <h:inputText value="#{item.name}" />
</rich:column>
<rich:orderingList>
...
@@ -36,29 +79,83 @@
</section>
<section>
<title>Details of Usage</title>
+
<!--maintenance of component orderingList-->
+
<para>The <emphasis role="bold">
<property><rich:orderingList></property>
- </emphasis> component consists of <property>
- <emphasis>Item list</emphasis>
- </property> element that displays a list of items. It has three different
- representations for a single element: common, selected, active. <para>Combination of
- these states is possible</para>
+ </emphasis> component consists of <itemizedlist>
+ <listitem><property>Item list</property> element that displays a list of items. It
+ has three different representations for a single element: common, selected,
+ active. Combination of these states is possible.</listitem>
+ <listitem>
+ <property>ordering controls set</property>
+ </listitem>
+ </itemizedlist>
</para>
+
+ <!-- attributes of component orderingList -->
+
+ <para> The <property>
+ <emphasis>"value"</emphasis>
+ </property> and <property>
+ <emphasis>"var"</emphasis>
+ </property> attributes are used to access the values of a list. </para>
+
+ <para>The <property>
+ <emphasis>"selection"</emphasis>
+ </property> attribute is bound to a list, which stores a set of indexes for rows
+ selected. If the index from a set is out of bounds, it should be ignored. </para>
+ <para>Controls rendering is based on the<property>
+ <emphasis>"controlsType"</emphasis>
+ </property> attribute. Possible types are button, link, none.</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:orderingList value="#{bean.simpleItems}" var="item" selection="#{bean.selection}" controlsType="link">
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Name" />
+ </f:facet>
+ <h:outputText value="#{item}" />
+ </rich:column>
+</rich:orderingList>
+...]]></programlisting>
+
<para> The <emphasis role="bold">
<property><rich:orderingList></property>
- </emphasis> component provides to use <emphasis>
- <property>"optionalCaption"</property>
+ </emphasis> component provides to use optional<emphasis>
+ <property>"caption"</property>
</emphasis>, <property>
- <emphasis>"optionalHeader"</emphasis>
- </property>(It's possible to define facet. It has two possible types of representation: sortable and
- non-sortable) and <property>
- <emphasis>"optionalFooter"</emphasis>
- </property> facets.
- </para>
- <!-- add simple and screenshot-->
+ <emphasis>"header"</emphasis>
+ </property>(It's possible to define facet. It has two possible types of
+ representation: sortable and non-sortable) and <property>
+ <emphasis>"footer"</emphasis>
+ </property> facets. </para>
+ <!-- add screenshot-->
+
+ <para>Simple example is placed below.</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:orderingList value="#{bean.simpleItems}" var="item" controlsType="link">
+ <f:facet name="caption">
+ <h:outputText value="Caption" />
+ </f:facet>
+ <h:outputText value="#{item}" />
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Name" />
+ </f:facet>
+ <h:outputText value="#{item}" />
+ </rich:column>
+</rich:orderingList>
+...]]></programlisting>
+
<!-- ordering control set-->
<para>The <emphasis role="bold">
<property><rich:orderingList></property>
@@ -83,42 +180,33 @@
</property>, <property>
<emphasis>"downControlDisabled"</emphasis>
</property> facets are used to replaces the default control with facets content. </para>
-
- <!-- attributes of component orderingList -->
-
- <para> The <property>
- <emphasis>"value"</emphasis>
- </property> and <property>
- <emphasis>"var"</emphasis>
- </property> attributes are used to access the values of a list. Example of page
- definition: <programlisting role="XML"><![CDATA[...
-<rich:orderingList value="#{bean.list}" var="list">
- <f:facet name=header><h:outputText value="Header1"/></f:facet>
- <rich:column>
- <h:outputText value="#{list.text}">
- </rich:column>
-<rich:orderingList>
-...]]>
- </programlisting>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
</para>
-
- <para>The <property>
- <emphasis>"selection"</emphasis>
- </property> attribute is bound to a list, which stores a set of indexes for rows
- selected. If the index from a set is out of bounds, it should be ignored. </para>
- <para>Controls rendering is based on the <property>
- <emphasis>"controlsType"</emphasis>
- </property> attribute. Possible types are button, link, none.</para>
- <para>Example of page definition:</para>
- <programlisting role="XML"><![CDATA[...
-<rich:orderingList controlType="button">
- <f:facet name="Top">
+ <para>
+ <programlisting role="XML"><![CDATA[...
+<rich:orderingList value="#{demoBean.items}" var="item" selection="#{bean.selection}" controlType="button">
+ <f:facet name="topControl">
<h:outputText value="Move to top">
</f:facet>
+ <f:facet name="upControl">
+ <h:outputText value="Move up">
+ </f:facet>
+ <f:facet name="downControl">
+ <h:outputText value="Move down">
+ </f:facet>
+ <f:facet name="bottomControl">
+ <h:outputText value="Move to bottom">
+ </f:facet>
<rich:orderingList>
...
]]></programlisting>
+ </para>
+
+
+
+
<para>The position of the controls relatively to a list could be customized with <itemizedlist>
<listitem>
<property>
@@ -186,14 +274,6 @@
- <para>The <property>
- <emphasis>"captionLabel"</emphasis>
- </property>attribute defines the text placed inside a caption.</para>
-
- <para>The <property>
- <emphasis>"disabled"</emphasis>
- </property>attribute disables the whole component.</para>
-
<para>The component provides possibility to be customized using templating. The
customization could be performed by a layout definition nested into the component. 5
elements are provided to be defined inside template: {list}, {topControl},
@@ -292,7 +372,7 @@
controls.</para>
<section>
- <title>Drag-and-Drop support in the list</title>
+ <title> Built-In Drag and Drop</title>
<para> It's possible to drag items and drop to the position needed. </para>
<para>In this case component <emphasis role="bold">
<property><rich:orderingList></property>
@@ -411,21 +491,21 @@
<property>skin parameters.</property>
</emphasis></para>
<para>There are two ways to redefine the appearance of all <emphasis role="bold">
- <property><rich:orderingList></property>
- </emphasis> components at once: <itemizedlist>
- <listitem>Redefine the corresponding skin parameters</listitem>
- <listitem> Add to your style sheets style classes used by a <emphasis role="bold">
<property><rich:orderingList></property>
- </emphasis> component</listitem>
- </itemizedlist>
+ </emphasis> components at once: <itemizedlist>
+ <listitem>Redefine the corresponding skin parameters</listitem>
+ <listitem> Add to your style sheets style classes used by a <emphasis role="bold">
+ <property><rich:orderingList></property>
+ </emphasis> component</listitem>
+ </itemizedlist>
</para>
</section>
<section>
<title>Definition of Custom Style Classes</title>
<para>On the screenshot there are classes names that define styles for component elements.</para>
-
-<!-- screenshot -->
+
+ <!-- screenshot -->
<figure>
<title>Style classes</title>
<mediaobject>
18 years, 5 months
JBoss Rich Faces SVN: r3960 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2007-11-13 13:14:47 -0500 (Tue, 13 Nov 2007)
New Revision: 3960
Modified:
trunk/docs/userguide/en/src/main/docbook/included/orderingList.desc.xml
Log:
RF-1184 - fix section Key Features
Modified: trunk/docs/userguide/en/src/main/docbook/included/orderingList.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/orderingList.desc.xml 2007-11-13 18:04:52 UTC (rev 3959)
+++ trunk/docs/userguide/en/src/main/docbook/included/orderingList.desc.xml 2007-11-13 18:14:47 UTC (rev 3960)
@@ -21,7 +21,7 @@
<listitem>Customizable component layout (captions, headers, list items and ordering control set)</listitem>
<listitem>Disabled/enabled ordering controls</listitem>
<listitem>Multiple selection in the <property>ordering list</property></listitem>
- <listitem>Drag-and-drop support</listitem>
+ <listitem> Built-In Drag-and-drop support</listitem>
<listitem>Possibility to manage selection from
<itemizedlist>
<listitem>Keyboard</listitem>
18 years, 5 months
JBoss Rich Faces SVN: r3959 - in trunk/sandbox/ui/orderingList/src/main: resources/org/richfaces/renderkit/html/css and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-13 13:04:52 -0500 (Tue, 13 Nov 2007)
New Revision: 3959
Modified:
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
Log:
disabled buttons was added
Modified: trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java 2007-11-13 16:41:29 UTC (rev 3958)
+++ trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java 2007-11-13 18:04:52 UTC (rev 3959)
@@ -71,6 +71,18 @@
private final static String ATTRIBUTE_CAPTION_LABEL = "captionLabel";
+ private final static String ATTRIBUTE_CLASS_TOP_CONTROL = "topControlClass";
+
+ private final static String ATTRIBUTE_CLASS_BOTTOM_CONTROL = "bottomControlClass";
+
+ private final static String ATTRIBUTE_CLASS_DOWN_CONTROL = "downControlClass";
+
+ private final static String ATTRIBUTE_CLASS_UP_CONTROL = "upControlClass";
+
+ private final static String ATTRIBUTE_CLASS_DISABLED_CONTROL = "disabledControlClass";
+
+ private final static String STYLE_SKIN_CONTROL_BUTTON = "ol_button_control";
+
private final static String DIS_CONTROL_ID_PREFIX = "dis";
private final static String CONTROL_ID_UP = "up";
@@ -96,18 +108,28 @@
private String customEvent;
+ private String styleFromAttribute;
+
+ private String buttonStyle;
+
+ private boolean enable;
+
public abstract boolean isRendered(FacesContext context, UIOrderingList list);
public ControlsHelper(String name, String text, String imageURI,
- String facetName, String styleClassName, String idSuffix, String customEvent) {
+ String facetName, String styleClassName, String styleFromAttribute, String buttonStyle,
+ String idSuffix, String customEvent, boolean isEnable) {
super();
this.name = name;
this.text = text;
this.imageURI = imageURI;
this.facetName = facetName;
this.styleClassName = styleClassName;
+ this.styleFromAttribute = styleFromAttribute;
this.idSuffix = idSuffix;
this.customEvent = customEvent;
+ this.buttonStyle = buttonStyle;
+ this.enable = isEnable;
}
public String getName() {
@@ -133,11 +155,28 @@
public String getIdSuffix() {
return idSuffix;
}
+
+ public String getCustomEvent() {
+ return customEvent;
+ }
+
+ public String getStyleFromAttribute() {
+ return styleFromAttribute;
+ }
+
+ public String getButtonStyle() {
+ return buttonStyle;
+ }
+
+ public boolean isEnable() {
+ return enable;
+ }
};
protected static final ControlsHelper[] HELPERS = new ControlsHelper[] {
new ControlsHelper("top", "↟", OrderingListIconTop.class.getName(), FACET_TOP,
- "rich-ordering-control-top", CONTROL_ID_TOP, ATTRIBUTE_CE_ONTOPCLICK) {
+ " rich-ordering-control-top", ATTRIBUTE_CLASS_TOP_CONTROL, "ol_control_bn_top",
+ CONTROL_ID_TOP, ATTRIBUTE_CE_ONTOPCLICK, true) {
public boolean isRendered(FacesContext context, UIOrderingList list) {
return list.isFastOrderControlsVisible();
@@ -145,7 +184,8 @@
},
new ControlsHelper("disabledTop", "↟", OrderingListIconTopDisabled.class.getName(), FACET_DIS_TOP,
- "rich-ordering-control-disabled", DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_TOP), null) {
+ " rich-ordering-control-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL, "ol_control_dbn_top",
+ DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_TOP), null, false) {
public boolean isRendered(FacesContext context, UIOrderingList list) {
return list.isFastOrderControlsVisible();
@@ -153,7 +193,8 @@
},
new ControlsHelper("up", "↑", OrderingListIconUp.class.getName(), FACET_UP,
- "rich-ordering-control-up", CONTROL_ID_UP, ATTRIBUTE_CE_ONUPCLICK) {
+ " rich-ordering-control-up", ATTRIBUTE_CLASS_UP_CONTROL, "ol_control_bn_up",
+ CONTROL_ID_UP, ATTRIBUTE_CE_ONUPCLICK ,true) {
public boolean isRendered(FacesContext context, UIOrderingList list) {
return list.isOrderControlsVisible();
@@ -161,7 +202,8 @@
},
new ControlsHelper("disabledUp", "↑", OrderingListIconUpDisabled.class.getName(), FACET_DIS_UP,
- "rich-ordering-control-disabled", DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_UP), null) {
+ " rich-ordering-control-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL, "ol_control_dbn_up",
+ DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_UP), null, false) {
public boolean isRendered(FacesContext context, UIOrderingList list) {
return list.isOrderControlsVisible();
@@ -169,7 +211,8 @@
},
new ControlsHelper("down", "↓", OrderingListIconDown.class.getName(), FACET_DOWN,
- "rich-ordering-control-down", CONTROL_ID_DOWN, ATTRIBUTE_CE_ONDOWNCLICK) {
+ " rich-ordering-control-down", ATTRIBUTE_CLASS_DOWN_CONTROL, "ol_control_bn_down",
+ CONTROL_ID_DOWN, ATTRIBUTE_CE_ONDOWNCLICK, true) {
public boolean isRendered(FacesContext context, UIOrderingList list) {
return list.isFastOrderControlsVisible();
@@ -177,23 +220,26 @@
},
new ControlsHelper("disabledDown", "↓", OrderingListIconDownDisabled.class.getName(), FACET_DIS_DOWN,
- "rich-ordering-control-disabled", DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_DOWN), null) {
+ " rich-ordering-control-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL, "ol_control_dbn_down",
+ DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_DOWN), null, false) {
public boolean isRendered(FacesContext context, UIOrderingList list) {
return list.isFastOrderControlsVisible();
}
},
- new ControlsHelper("botton", "↡", OrderingListIconBottom.class.getName(), FACET_BOTTOM,
- "rich-ordering-control-bottom", CONTROL_ID_BOTTOM, ATTRIBUTE_CE_ONBOTTOMCLICK) {
+ new ControlsHelper("bottom", "↡", OrderingListIconBottom.class.getName(), FACET_BOTTOM,
+ " rich-ordering-control-bottom", ATTRIBUTE_CLASS_BOTTOM_CONTROL, "ol_control_bn_bottom",
+ CONTROL_ID_BOTTOM, ATTRIBUTE_CE_ONBOTTOMCLICK, true) {
public boolean isRendered(FacesContext context, UIOrderingList list) {
return list.isOrderControlsVisible();
}
},
- new ControlsHelper("disabledBotton", "↡", OrderingListIconBottomDisabled.class.getName(), FACET_DIS_BOTTOM,
- "rich-ordering-control-disabled", DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_BOTTOM), null) {
+ new ControlsHelper("disabledBottom", "↡", OrderingListIconBottomDisabled.class.getName(), FACET_DIS_BOTTOM,
+ " rich-ordering-control-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL, "ol_control_dbn_bottom",
+ DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_BOTTOM), null, false) {
public boolean isRendered(FacesContext context, UIOrderingList list) {
return list.isOrderControlsVisible();
@@ -275,7 +321,11 @@
if (helper.customEvent != null) {
customEvent = (String) attributes.get(helper.customEvent);
}
-
+ String styleFromAttribute = (String) attributes.get(helper.styleFromAttribute);
+ String currentStyle = helper.getStyleClassName();
+ if (styleFromAttribute != null) {
+ currentStyle = styleFromAttribute.concat(currentStyle);
+ }
String htmlElem = null;
if (CONTROL_TYPE_BUTTON.equals(controlType)) {
isButton = true;
@@ -296,7 +346,6 @@
if (htmlElem != null) {
writer.startElement(htmlElem, orderingList);
writer.writeAttribute(HTML.id_ATTRIBUTE, clientId + helper.getIdSuffix(), null);
- writer.writeAttribute(HTML.class_ATTRIBUTE, helper.getStyleClassName(), null);
if (customEvent != null) {
writer.writeAttribute(HTML.onclick_ATTRIBUTE, customEvent, null);
}
@@ -307,10 +356,14 @@
} else {
if (isButton) {
writer.writeAttribute("style", "font-size: 1.5em;", null);
- writer.write(helper.getText());
+ currentStyle = helper.buttonStyle.concat(currentStyle);
+ writer.writeAttribute(HTML.class_ATTRIBUTE, currentStyle, null);
+ if (!helper.enable) {
+ writer.writeAttribute(HTML.DISABLED_ATTR, "true", null);
+ }
} else {
+ writer.writeAttribute(HTML.class_ATTRIBUTE, currentStyle, null);
writer.startElement(HTML.IMG_ELEMENT, orderingList);
-
writer.writeAttribute("border", "0", null);
writer.writeAttribute("alt", helper.getFacetName(), null);
writer.writeAttribute("src", getResource(helper.getImageURI()).getUri(context, null), null);
Modified: trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-11-13 16:41:29 UTC (rev 3958)
+++ trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-11-13 18:04:52 UTC (rev 3959)
@@ -140,43 +140,71 @@
<u:style name="color" skin="generalTextColor"/>
<u:style name="font-size" skin="generalSizeFont"/>
<u:style name="font-family" skin="generalFamilyFont"/>
+ <u:style name="width" value="16px"/>
+ <u:style name="height" value="16px"/>
+ <u:style name="border" value="0"/>
</u:selector>
<u:selector name=".ol_control_bn_up">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.images.OrderingListIconUp" />
</u:style>
+ <u:style name="width" value="18px"/>
+ <u:style name="height" value="18px"/>
+ <u:style name="border" value="1"/>
</u:selector>
<u:selector name=".ol_control_bn_down">
+ <u:style name="width" value="18px"/>
+ <u:style name="height" value="18px"/>
+ <u:style name="border" value="1"/>
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.images.OrderingListIconDown" />
</u:style>
</u:selector>
<u:selector name=".ol_control_bn_top">
+ <u:style name="width" value="18px"/>
+ <u:style name="height" value="18px"/>
+ <u:style name="border" value="1"/>
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.images.OrderingListIconTop" />
</u:style>
</u:selector>
<u:selector name=".ol_control_bn_bottom">
+ <u:style name="width" value="18px"/>
+ <u:style name="height" value="18px"/>
+ <u:style name="border" value="1"/>
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.images.OrderingListIconBottom" />
</u:style>
</u:selector>
<u:selector name=".ol_control_dbn_up">
+ <u:style name="width" value="18px"/>
+ <u:style name="height" value="18px"/>
+ <u:style name="border" value="1"/>
+ <u:style name="disabled" value="true"/>
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.images.OrderingListIconUpDisabled" />
</u:style>
</u:selector>
<u:selector name=".ol_control_dbn_down">
+ <u:style name="width" value="18px"/>
+ <u:style name="height" value="18px"/>
+ <u:style name="border" value="1"/>
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.images.OrderingListIconDownDisabled" />
</u:style>
</u:selector>
<u:selector name=".ol_control_dbn_top">
+ <u:style name="width" value="18px"/>
+ <u:style name="height" value="18px"/>
+ <u:style name="border" value="1"/>
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.images.OrderingListIconTopDisabled" />
</u:style>
</u:selector>
<u:selector name=".ol_control_dbn_bottom">
+ <u:style name="width" value="18px"/>
+ <u:style name="height" value="18px"/>
+ <u:style name="border" value="1"/>
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.images.OrderingListIconBottomDisabled" />
</u:style>
18 years, 5 months
JBoss Rich Faces SVN: r3958 - in trunk/sandbox/ui/orderingList/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-13 11:41:29 -0500 (Tue, 13 Nov 2007)
New Revision: 3958
Modified:
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
trunk/sandbox/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
Log:
cosmetic changes
Modified: trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-11-13 16:39:30 UTC (rev 3957)
+++ trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-11-13 16:41:29 UTC (rev 3958)
@@ -4,8 +4,9 @@
xmlns="http://www.w3.org/1999/xhtml" >
<f:verbatim><![CDATA[
-.ol_header {
+.ol_caption {
padding : 1px;
+ height: 8px;
}
.ol_captionlabel {
@@ -135,11 +136,49 @@
]]>
</f:verbatim>
- <u:selector name=".ol_cell, .ol_cell *">
- <u:style name="color" skin="generalTextColor"/>
- <u:style name="font-size" skin="generalSizeFont"/>
- <u:style name="font-family" skin="generalFamilyFont"/>
- </u:selector
->
-
+<u:selector name=".ol_cell, .ol_cell *">
+ <u:style name="color" skin="generalTextColor"/>
+ <u:style name="font-size" skin="generalSizeFont"/>
+ <u:style name="font-family" skin="generalFamilyFont"/>
+</u:selector>
+<u:selector name=".ol_control_bn_up">
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.images.OrderingListIconUp" />
+ </u:style>
+</u:selector>
+<u:selector name=".ol_control_bn_down">
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.images.OrderingListIconDown" />
+ </u:style>
+</u:selector>
+<u:selector name=".ol_control_bn_top">
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.images.OrderingListIconTop" />
+ </u:style>
+</u:selector>
+<u:selector name=".ol_control_bn_bottom">
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.images.OrderingListIconBottom" />
+ </u:style>
+</u:selector>
+<u:selector name=".ol_control_dbn_up">
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.images.OrderingListIconUpDisabled" />
+ </u:style>
+</u:selector>
+<u:selector name=".ol_control_dbn_down">
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.images.OrderingListIconDownDisabled" />
+ </u:style>
+</u:selector>
+<u:selector name=".ol_control_dbn_top">
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.images.OrderingListIconTopDisabled" />
+ </u:style>
+</u:selector>
+<u:selector name=".ol_control_dbn_bottom">
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.images.OrderingListIconBottomDisabled" />
+ </u:style>
+</u:selector>
</f:template>
\ No newline at end of file
Modified: trunk/sandbox/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-11-13 16:39:30 UTC (rev 3957)
+++ trunk/sandbox/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-11-13 16:41:29 UTC (rev 3958)
@@ -28,7 +28,7 @@
<table id="#{clientId}table" cellpadding="0" cellspacing="0" class="ol_body">
<tbody>
<tr>
- <td colspan="2">
+ <td colspan="2" class="ol_caption">
<f:call name="encodeCaption"/>
</td>
</tr>
18 years, 5 months
JBoss Rich Faces SVN: r3957 - in trunk/sandbox/ui/orderingList/src/main: resources/org/richfaces/renderkit/html/css and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-11-13 11:39:30 -0500 (Tue, 13 Nov 2007)
New Revision: 3957
Modified:
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
Log:
default style for cell content added
Modified: trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java 2007-11-13 16:22:39 UTC (rev 3956)
+++ trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java 2007-11-13 16:39:30 UTC (rev 3957)
@@ -370,24 +370,29 @@
writer.startElement(HTML.TR_ELEMENT, table);
writer.writeAttribute("id", clientId, null);
- String className = null;
+ StringBuffer rowClassName = new StringBuffer("ol_normal rich-ordering-list-row");
+ StringBuffer cellClassName = new StringBuffer("ol_cell rich-ordering-list-cell");
if (table.isActive()) {
- className = "ol_active rich-ordering-list-row-active";
- } else if (table.isSelected()) {
- className = "ol_select rich-ordering-list-row-selected";
- } else {
- className = "ol_normal rich-ordering-list-row";
+ rowClassName.append(" ol_active rich-ordering-list-row-active");
+ cellClassName.append(" rich-ordering-list-cell-active");
}
- writer.writeAttribute("class", className, null);
+ if (table.isSelected()) {
+ rowClassName.append(" ol_select rich-ordering-list-row-selected");
+ cellClassName.append(" rich-ordering-list-cell-selected");
+ }
+ writer.writeAttribute("class", rowClassName.toString(), null);
+
List<UIComponent> children = table.getChildren();
for (UIComponent component : children) {
if (component instanceof UIColumn && component.isRendered()) {
UIColumn column = (UIColumn) component;
writer.startElement(HTML.td_ELEM, table);
-
+
+ writer.writeAttribute("class", cellClassName.toString(), null);
+
renderChildren(context, column);
writer.endElement(HTML.td_ELEM);
Modified: trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-11-13 16:22:39 UTC (rev 3956)
+++ trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-11-13 16:39:30 UTC (rev 3957)
@@ -133,6 +133,13 @@
-moz-user-select: none;
}
]]>
+</f:verbatim>
-</f:verbatim>
+ <u:selector name=".ol_cell, .ol_cell *">
+ <u:style name="color" skin="generalTextColor"/>
+ <u:style name="font-size" skin="generalSizeFont"/>
+ <u:style name="font-family" skin="generalFamilyFont"/>
+ </u:selector
+>
+
</f:template>
\ No newline at end of file
18 years, 5 months