Author: Alex.Kolonitsky
Date: 2009-01-29 10:46:21 -0500 (Thu, 29 Jan 2009)
New Revision: 12487
Modified:
trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
trunk/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleControlsHelper.java
trunk/ui/listShuttle/src/test/java/org/richfaces/renderkit/ListShuttleRenderingTest.java
trunk/ui/orderingList/src/main/config/component/orderinglist.xml
trunk/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentControlsHelper.java
trunk/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java
trunk/ui/orderingList/src/test/java/org/richfaces/renderkit/OrderingListRenderingTest.java
trunk/ui/pickList/src/main/config/component/picklist.xml
trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListControlsHelper.java
trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java
Log:
ability to change "alt" text for button image
https://jira.jboss.org/jira/browse/RF-4851
Modified: trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
===================================================================
--- trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2009-01-29 15:36:39 UTC
(rev 12486)
+++ trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2009-01-29 15:46:21 UTC
(rev 12487)
@@ -206,6 +206,31 @@
Defines a label for a bottom control
</description>
</property>
+
+ <property>
+ <name>upTitle </name>
+ <classname>java.lang.String</classname>
+ <description>HTML: alt for top button</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>downTitle </name>
+ <classname>java.lang.String</classname>
+ <description>HTML: alt for bottom button</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>topTitle </name>
+ <classname>java.lang.String</classname>
+ <description>HTML: alt for first button</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>bottomTitle </name>
+ <classname>java.lang.String</classname>
+ <description>HTML: alt for last button</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
<property>
<name>copyAllControlLabel</name>
@@ -237,6 +262,31 @@
</property>
<property>
+ <name>copyAllTitle </name>
+ <classname>java.lang.String</classname>
+ <description>HTML: alt for Copy All button</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>copyTitle </name>
+ <classname>java.lang.String</classname>
+ <description>HTML: alt for copy button</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>removeTitle </name>
+ <classname>java.lang.String</classname>
+ <description>HTML: alt for remove button</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>removeAllTitle </name>
+ <classname>java.lang.String</classname>
+ <description>HTML: alt for remove all button</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+
+ <property>
<name>sourceCaptionLabel</name>
<classname>java.lang.String</classname>
<description>
Modified:
trunk/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleControlsHelper.java
===================================================================
---
trunk/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleControlsHelper.java 2009-01-29
15:36:39 UTC (rev 12486)
+++
trunk/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleControlsHelper.java 2009-01-29
15:46:21 UTC (rev 12487)
@@ -35,7 +35,15 @@
public class ListShuttleControlsHelper {
- private final static String FACET_COPY_ALL = "copyAllControl";
+ private static final String COPY_ALL_TITLE = "copyAllTitle";
+
+ private static final String COPY_TITLE = "copyTitle";
+
+ private static final String REMOVE_TITLE = "removeTitle";
+
+ private static final String REMOVE_ALL_TITLE = "removeAllTitle";
+
+ private final static String FACET_COPY_ALL = "copyAllControl";
private final static String FACET_REMOVE_ALL = "removeAllControl";
@@ -109,7 +117,7 @@
protected static final OrderingComponentRendererBase.ControlsHelper[] HELPERS = new
OrderingComponentRendererBase.ControlsHelper[] {
new OrderingComponentRendererBase.ControlsHelper(NAME_COPYALL, BUNDLE_COPY_ALL_LABEL,
DEFAULT_LABEL_COPY_ALL, ListShuttleIconCopyAll.class.getName(), FACET_COPY_ALL,
"-copyall", ATTRIBUTE_CLASS_COPY_ALL_CONTROL, "",
- CONTROL_ID_COPY_ALL, ATTRIBUTE_CE_ONCOPYALLCLICK, true,
"copyAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
+ CONTROL_ID_COPY_ALL, ATTRIBUTE_CE_ONCOPYALLCLICK, true,
"copyAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX),
COPY_ALL_TITLE) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return ((UIListShuttle) list).isFastMoveControlsVisible();
@@ -118,7 +126,7 @@
},
new OrderingComponentRendererBase.ControlsHelper(NAME_COPYALL_DIS,
BUNDLE_COPY_ALL_LABEL, DEFAULT_LABEL_COPY_ALL,
ListShuttleIconCopyAllDisabled.class.getName(), FACET_DIS_COPY_ALL,
"-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL, DISABLED_STYLE_PREF,
- DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_COPY_ALL), null, false,
"copyAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
+ DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_COPY_ALL), null, false,
"copyAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX),
COPY_ALL_TITLE) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return ((UIListShuttle) list).isFastMoveControlsVisible();
@@ -127,7 +135,7 @@
},
new OrderingComponentRendererBase.ControlsHelper(NAME_COPY, BUNDLE_COPY_LABEL,
DEFAULT_LABEL_COPY, ListShuttleIconCopy.class.getName(), FACET_COPY,
"-copy", ATTRIBUTE_CLASS_COPY_CONTROL, "",
- CONTROL_ID_COPY, ATTRIBUTE_CE_ONCOPYCLICK ,true,
"copy".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
+ CONTROL_ID_COPY, ATTRIBUTE_CE_ONCOPYCLICK ,true,
"copy".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX),
COPY_TITLE) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return ((UIListShuttle) list).isMoveControlsVisible();
@@ -136,7 +144,7 @@
},
new OrderingComponentRendererBase.ControlsHelper(NAME_COPY_DIS, BUNDLE_COPY_LABEL,
DEFAULT_LABEL_COPY, ListShuttleIconCopyDisabled.class.getName(), FACET_DIS_COPY,
"-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL, DISABLED_STYLE_PREF,
- DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_COPY), null, false,
"copy".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
+ DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_COPY), null, false,
"copy".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX),
COPY_TITLE) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return ((UIListShuttle) list).isMoveControlsVisible();
@@ -145,7 +153,7 @@
},
new OrderingComponentRendererBase.ControlsHelper(NAME_REMOVE, BUNDLE_REMOVE_LABEL,
DEFAULT_LABEL_REMOVE, ListShuttleIconRemove.class.getName(), FACET_REMOVE,
"-remove", ATTRIBUTE_CLASS_REMOVE_CONTROL, "",
- CONTROL_ID_REMOVE, ATTRIBUTE_CE_ONREMOVECLICK, true,
"remove".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
+ CONTROL_ID_REMOVE, ATTRIBUTE_CE_ONREMOVECLICK, true,
"remove".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX),
REMOVE_TITLE) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return ((UIListShuttle) list).isMoveControlsVisible();
@@ -154,7 +162,7 @@
},
new OrderingComponentRendererBase.ControlsHelper(NAME_REMOVE_DIS, BUNDLE_REMOVE_LABEL,
DEFAULT_LABEL_REMOVE, ListShuttleIconRemoveDisabled.class.getName(), FACET_DIS_REMOVE,
"-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL, DISABLED_STYLE_PREF,
- DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_REMOVE), null, false,
"remove".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
+ DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_REMOVE), null, false,
"remove".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX),
REMOVE_TITLE) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return ((UIListShuttle) list).isMoveControlsVisible();
@@ -163,7 +171,7 @@
},
new OrderingComponentRendererBase.ControlsHelper(NAME_REMOVEALL,
BUNDLE_REMOVE_ALL_LABEL, DEFAULT_LABEL_REMOVE_ALL,
ListShuttleIconRemoveAll.class.getName(), FACET_REMOVE_ALL,
"-removeall", ATTRIBUTE_CLASS_REMOVE_ALL_CONTROL, "",
- CONTROL_ID_REMOVE_ALL, ATTRIBUTE_CE_ONREMOVEALLCLICK, true,
"removeAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
+ CONTROL_ID_REMOVE_ALL, ATTRIBUTE_CE_ONREMOVEALLCLICK, true,
"removeAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX),
REMOVE_ALL_TITLE) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return ((UIListShuttle) list).isFastMoveControlsVisible();
@@ -172,7 +180,7 @@
},
new OrderingComponentRendererBase.ControlsHelper(NAME_REMOVEALL_DIS,
BUNDLE_REMOVE_ALL_LABEL, DEFAULT_LABEL_REMOVE_ALL,
ListShuttleIconRemoveAllDisabled.class.getName(), FACET_DIS_REMOVE_ALL,
"-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL, DISABLED_STYLE_PREF,
- DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_REMOVE_ALL), null, false,
"removeAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
+ DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_REMOVE_ALL), null, false,
"removeAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX),
REMOVE_ALL_TITLE) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return ((UIListShuttle) list).isFastMoveControlsVisible();
Modified:
trunk/ui/listShuttle/src/test/java/org/richfaces/renderkit/ListShuttleRenderingTest.java
===================================================================
---
trunk/ui/listShuttle/src/test/java/org/richfaces/renderkit/ListShuttleRenderingTest.java 2009-01-29
15:36:39 UTC (rev 12486)
+++
trunk/ui/listShuttle/src/test/java/org/richfaces/renderkit/ListShuttleRenderingTest.java 2009-01-29
15:46:21 UTC (rev 12487)
@@ -46,6 +46,7 @@
public class ListShuttleRenderingTest extends AbstractAjax4JsfTestCase {
private static final int IMAGE_COUNT = 16;
+ private static final String IMAGE_ALT = "test_alt";
private UIListShuttle listShuttle = null;
private UIForm form = null;
@@ -116,7 +117,9 @@
listShuttle =
(UIListShuttle)application.createComponent(UIListShuttle.COMPONENT_TYPE);
listShuttle.setId("listShuttle");
listShuttle.setVar("item");
+ listShuttle.getAttributes().put("copyTitle", IMAGE_ALT);
+
items = new ArrayList<SimpleItem>();
items.add(new SimpleItem("Michael", 2000));
items.add(new SimpleItem("John", 500));
@@ -292,6 +295,14 @@
if (uri.contains("spacer.gif")) {
continue;
}
+
+ String alt = img.getAttributeValue(HTML.alt_ATTRIBUTE);
+ assertNotNull(alt);
+ if (alt.length() > 0) {
+ assertEquals(IMAGE_ALT, alt);
+ }
+
+ System.out.println("uri = " + uri + ", alt" + alt);
foundImages++;
HtmlElement element = (HtmlElement) img.getParentDomNode();
Modified: trunk/ui/orderingList/src/main/config/component/orderinglist.xml
===================================================================
--- trunk/ui/orderingList/src/main/config/component/orderinglist.xml 2009-01-29 15:36:39
UTC (rev 12486)
+++ trunk/ui/orderingList/src/main/config/component/orderinglist.xml 2009-01-29 15:46:21
UTC (rev 12487)
@@ -8,10 +8,10 @@
<family>org.richfaces.OrderingList</family>
<classname>org.richfaces.component.html.HtmlOrderingList</classname>
<superclass>org.richfaces.component.UIOrderingList</superclass>
- <test>
- <classname>org.richfaces.component.html.HtmlOrderingListComponentTest</classname>
- <superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
- </test>
+ <test>
+
<classname>org.richfaces.component.html.HtmlOrderingListComponentTest</classname>
+
<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+ </test>
<description>
<![CDATA[The <rich:orderingList> is a component for ordering items
in a list. This component provides possibilities to reorder a list and sort it on the
client side.]]>
</description>
@@ -27,7 +27,7 @@
<superclass>
org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
</superclass>
- <test/>
+ <test/>
</tag>
&ui_input_attributes;
@@ -60,29 +60,29 @@
</property>
<property>
- <name>topControlLabel</name>
- <classname>java.lang.String</classname>
+ <name>topControlLabel</name>
+ <classname>java.lang.String</classname>
<description>
Defines a label for a 'Top' control
</description>
</property>
<property>
- <name>upControlLabel</name>
- <classname>java.lang.String</classname>
+ <name>upControlLabel</name>
+ <classname>java.lang.String</classname>
<description>
Defines a label for a 'Up' control
</description>
</property>
<property>
- <name>downControlLabel</name>
- <classname>java.lang.String</classname>
+ <name>downControlLabel</name>
+ <classname>java.lang.String</classname>
<description>
Defines a label for a 'Down' control
</description>
</property>
<property>
- <name>bottomControlLabel</name>
- <classname>java.lang.String</classname>
+ <name>bottomControlLabel</name>
+ <classname>java.lang.String</classname>
<description>
Defines a label for a 'Bottom' control
</description>
@@ -133,8 +133,8 @@
<classname>java.lang.String</classname>
<description>
Controls horizontal rendering. Possible values:
- "left" - controls should be rendered to the left side of a list.
- "right"- controls should be rendered to the right side of a list.
Default value is "right".
+ "left" - controls should be rendered to the left side
of a list.
+ "right"- controls should be rendered to the right side
of a list. Default value is "right".
</description>
<defaultvalue><![CDATA["right"]]></defaultvalue>
</property>
@@ -143,12 +143,12 @@
<classname>java.lang.String</classname>
<description>
Controls vertical rendering. Possible values:
- "top" - controls should be rendered aligned to top side of a list.
- "bottom" - controls should be rendered aligned to bottom side of a
list.
- "middle" - controls should be rendered centered relatively to a
list. Default value is "middle"
+ "top" - controls should be rendered aligned to top side
of a list.
+ "bottom" - controls should be rendered aligned to
bottom side of a list.
+ "middle" - controls should be rendered centered
relatively to a list. Default value is "middle"
</description>
<defaultvalue><![CDATA["middle"]]></defaultvalue>
- </property>
+ </property>
<property>
<name>orderControlsVisible</name>
<classname>boolean</classname>
@@ -167,22 +167,22 @@
</property>
<property elonly="true">
- <name>selection</name>
+ <name>selection</name>
<classname>java.util.Set</classname>
- <description>Collection which stores a set of selected
items</description>
+ <description>Collection which stores a set of selected
items</description>
</property>
<property hidden="true" el="false">
- <name>submittedValue</name>
+ <name>submittedValue</name>
</property>
<property hidden="true" el="false">
- <name>localValueSet</name>
+ <name>localValueSet</name>
</property>
- <property hidden="true" el="false"
existintag="true">
- <name>valid</name>
- </property>
-
- <property>
+ <property hidden="true" el="false"
existintag="true">
+ <name>valid</name>
+ </property>
+
+ <property>
<name>onorderchanged</name>
<classname>java.lang.String</classname>
<description>
@@ -239,63 +239,88 @@
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
- &html_style_attributes;
+ &html_style_attributes;
- <property>
- <name>onclick</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer button is
clicked</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>ondblclick</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer button is
double-clicked</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>onmouseout</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer is moved
away</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>onmousemove</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer is moved
within</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>onmouseover</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer is moved
onto</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
-
- <property hidden="true">
- <name>header</name>
- </property>
- <property hidden="true">
- <name>footer</name>
- </property>
- <property hidden="true">
- <name>first</name>
- </property>
- <property hidden="true">
- <name>rowIndex</name>
- </property>
- <property hidden="true">
- <name>rowCount</name>
- </property>
- <property hidden="true">
+ <property>
+ <name>onclick</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a pointer button is
clicked</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>ondblclick</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a pointer button is
double-clicked</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onmouseout</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a pointer is moved
away</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onmousemove</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a pointer is moved
within</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onmouseover</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a pointer is moved
onto</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+
+ <property>
+ <name>upTitle </name>
+ <classname>java.lang.String</classname>
+ <description>HTML: alt for top button</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>downTitle </name>
+ <classname>java.lang.String</classname>
+ <description>HTML: alt for bottom button</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>topTitle </name>
+ <classname>java.lang.String</classname>
+ <description>HTML: alt for first button</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>bottomTitle </name>
+ <classname>java.lang.String</classname>
+ <description>HTML: alt for last button</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+
+ <property hidden="true">
+ <name>header</name>
+ </property>
+ <property hidden="true">
+ <name>footer</name>
+ </property>
+ <property hidden="true">
+ <name>first</name>
+ </property>
+ <property hidden="true">
+ <name>rowIndex</name>
+ </property>
+ <property hidden="true">
+ <name>rowCount</name>
+ </property>
+ <property hidden="true">
<name>rowKey</name>
</property>
- <property>
- <name>rowKeyConverter</name>
- <classname>javax.faces.convert.Converter</classname>
- <description>Converter for a row key object</description>
- </property>
- <property el="false">
+ <property>
+ <name>rowKeyConverter</name>
+ <classname>javax.faces.convert.Converter</classname>
+ <description>Converter for a row key object</description>
+ </property>
+ <property el="false">
<name>rowKeyVar</name>
<classname>java.lang.String</classname>
<description>The attribute provides access to a row key in a Request
scope</description>
@@ -306,7 +331,7 @@
<description>
A number of rows to display, or zero for all remaining rows in the list
</description>
- </property>
+ </property>
<property el="false" hidden="true">
<name>stateVar</name>
<classname>java.lang.String</classname>
@@ -335,10 +360,10 @@
Stores active item
</description>
</property>
- <property>
- <name>label</name>
- <classname>java.lang.String</classname>
- <description>A localized user presentable name for this
component.</description>
- </property>
+ <property>
+ <name>label</name>
+ <classname>java.lang.String</classname>
+ <description>A localized user presentable name for this
component.</description>
+ </property>
</component>
</components>
Modified:
trunk/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentControlsHelper.java
===================================================================
---
trunk/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentControlsHelper.java 2009-01-29
15:36:39 UTC (rev 12486)
+++
trunk/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentControlsHelper.java 2009-01-29
15:46:21 UTC (rev 12487)
@@ -85,6 +85,7 @@
private final static String CONTROL_ID_BOTTOM = "last";
public static final String CONTROL_LABEL_ATTRIBUTE_SUFFIX = "ControlLabel";
+ public static final String CONTROL_ALT_ATTRIBUTE_POSTFIX = "Title";
private final static String DEFAULT_LABEL_TOP = "First";
private final static String DEFAULT_LABEL_UP = "Up";
@@ -96,7 +97,7 @@
protected static final OrderingComponentRendererBase.ControlsHelper[] HELPERS = new
OrderingComponentRendererBase.ControlsHelper[] {
new OrderingComponentRendererBase.ControlsHelper("top",
"RICH_SHUTTLES_TOP_LABEL", DEFAULT_LABEL_TOP,
OrderingListIconTop.class.getName(), FACET_TOP,
"-top", ATTRIBUTE_CLASS_TOP_CONTROL, "",
- CONTROL_ID_TOP, ATTRIBUTE_CE_ONTOPCLICK, true,
"top".concat(CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
+ CONTROL_ID_TOP, ATTRIBUTE_CE_ONTOPCLICK, true,
"top".concat(CONTROL_LABEL_ATTRIBUTE_SUFFIX), getTitle("top")) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return list.isFastOrderControlsVisible();
@@ -105,7 +106,7 @@
},
new OrderingComponentRendererBase.ControlsHelper("disabledTop",
"RICH_SHUTTLES_TOP_LABEL", DEFAULT_LABEL_TOP,
OrderingListIconTopDisabled.class.getName(), FACET_DIS_TOP,
"-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL, DISABLED_STYLE_PREF,
- DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_TOP), null, false,
"top".concat(CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
+ DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_TOP), null, false,
"top".concat(CONTROL_LABEL_ATTRIBUTE_SUFFIX), getTitle("top")) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return list.isFastOrderControlsVisible();
@@ -114,7 +115,7 @@
},
new OrderingComponentRendererBase.ControlsHelper("up",
"RICH_SHUTTLES_UP_LABEL", DEFAULT_LABEL_UP, OrderingListIconUp.class.getName(),
FACET_UP,
"-up", ATTRIBUTE_CLASS_UP_CONTROL, "",
- CONTROL_ID_UP, ATTRIBUTE_CE_ONUPCLICK ,true,
"up".concat(CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
+ CONTROL_ID_UP, ATTRIBUTE_CE_ONUPCLICK ,true,
"up".concat(CONTROL_LABEL_ATTRIBUTE_SUFFIX), getTitle("up")) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return list.isOrderControlsVisible();
@@ -123,7 +124,7 @@
},
new OrderingComponentRendererBase.ControlsHelper("disabledUp",
"RICH_SHUTTLES_UP_LABEL", DEFAULT_LABEL_UP,
OrderingListIconUpDisabled.class.getName(), FACET_DIS_UP,
"-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL, DISABLED_STYLE_PREF,
- DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_UP), null, false,
"up".concat(CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
+ DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_UP), null, false,
"up".concat(CONTROL_LABEL_ATTRIBUTE_SUFFIX), getTitle("up")) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return list.isOrderControlsVisible();
@@ -132,7 +133,7 @@
},
new OrderingComponentRendererBase.ControlsHelper("down",
"RICH_SHUTTLES_DOWN_LABEL", DEFAULT_LABEL_DOWN,
OrderingListIconDown.class.getName(), FACET_DOWN,
"-down", ATTRIBUTE_CLASS_DOWN_CONTROL, "",
- CONTROL_ID_DOWN, ATTRIBUTE_CE_ONDOWNCLICK, true,
"down".concat(CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
+ CONTROL_ID_DOWN, ATTRIBUTE_CE_ONDOWNCLICK, true,
"down".concat(CONTROL_LABEL_ATTRIBUTE_SUFFIX), getTitle("down")) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return list.isOrderControlsVisible();
@@ -141,7 +142,7 @@
},
new OrderingComponentRendererBase.ControlsHelper("disabledDown",
"RICH_SHUTTLES_DOWN_LABEL", DEFAULT_LABEL_DOWN,
OrderingListIconDownDisabled.class.getName(), FACET_DIS_DOWN,
"-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL, DISABLED_STYLE_PREF,
- DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_DOWN), null, false,
"down".concat(CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
+ DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_DOWN), null, false,
"down".concat(CONTROL_LABEL_ATTRIBUTE_SUFFIX), getTitle("down")) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return list.isOrderControlsVisible();
@@ -150,7 +151,7 @@
},
new OrderingComponentRendererBase.ControlsHelper("bottom",
"RICH_SHUTTLES_BOTTOM_LABEL", DEFAULT_LABEL_BOTTOM,
OrderingListIconBottom.class.getName(), FACET_BOTTOM,
"-bottom", ATTRIBUTE_CLASS_BOTTOM_CONTROL, "",
- CONTROL_ID_BOTTOM, ATTRIBUTE_CE_ONBOTTOMCLICK, true,
"bottom".concat(CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
+ CONTROL_ID_BOTTOM, ATTRIBUTE_CE_ONBOTTOMCLICK, true,
"bottom".concat(CONTROL_LABEL_ATTRIBUTE_SUFFIX), getTitle("bottom"))
{
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return list.isFastOrderControlsVisible();
@@ -159,7 +160,7 @@
},
new OrderingComponentRendererBase.ControlsHelper("disabledBottom",
"RICH_SHUTTLES_BOTTOM_LABEL", DEFAULT_LABEL_BOTTOM,
OrderingListIconBottomDisabled.class.getName(), FACET_DIS_BOTTOM,
"-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL, DISABLED_STYLE_PREF,
- DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_BOTTOM), null, false,
"bottom".concat(CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
+ DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_BOTTOM), null, false,
"bottom".concat(CONTROL_LABEL_ATTRIBUTE_SUFFIX), getTitle("bottom"))
{
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return list.isFastOrderControlsVisible();
@@ -167,4 +168,10 @@
}
};
+
+ private static String getTitle(String name) {
+ return name.concat(CONTROL_ALT_ATTRIBUTE_POSTFIX);
+ }
+
+
}
Modified:
trunk/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java
===================================================================
---
trunk/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java 2009-01-29
15:36:39 UTC (rev 12486)
+++
trunk/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java 2009-01-29
15:46:21 UTC (rev 12487)
@@ -115,6 +115,8 @@
private String defaultText;
private String labelAttributeName;
+
+ private String title;
public abstract boolean isRendered(FacesContext context,
UIOrderingBaseComponent list);
@@ -123,7 +125,7 @@
String defaultText, String imageURI, String facetName,
String styleClassName, String styleFromAttribute,
String buttonStyleClass, String idSuffix, String customEvent,
- boolean isEnable, String labelAttributeName) {
+ boolean isEnable, String labelAttributeName, String title) {
super();
this.name = name;
this.bundlePropertyName = bundlePropertyName;
@@ -137,6 +139,7 @@
this.buttonStyleClass = buttonStyleClass;
this.enable = isEnable;
this.labelAttributeName = labelAttributeName;
+ this.title = title;
}
public String getName() {
@@ -186,6 +189,14 @@
public String getLabelAttributeName() {
return labelAttributeName;
}
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
}
protected static final class SelectionState {
@@ -390,8 +401,8 @@
//writer.writeAttribute(HTML.width_ATTRIBUTE, "15", null);
//writer.writeAttribute(HTML.height_ATTRIBUTE, "15", null);
- writer.writeAttribute(HTML.alt_ATTRIBUTE, helper.getDefaultText(),
- null);
+ writer.writeAttribute(HTML.alt_ATTRIBUTE,
+ orderingList.getAttributes().get(helper.getTitle()), null);
writer.writeAttribute(HTML.src_ATTRIBUTE, getResource(
helper.getImageURI()).getUri(context, null), null);
Modified:
trunk/ui/orderingList/src/test/java/org/richfaces/renderkit/OrderingListRenderingTest.java
===================================================================
---
trunk/ui/orderingList/src/test/java/org/richfaces/renderkit/OrderingListRenderingTest.java 2009-01-29
15:36:39 UTC (rev 12486)
+++
trunk/ui/orderingList/src/test/java/org/richfaces/renderkit/OrderingListRenderingTest.java 2009-01-29
15:46:21 UTC (rev 12487)
@@ -49,6 +49,8 @@
*
*/
public class OrderingListRenderingTest extends AbstractAjax4JsfTestCase {
+ private static final String IMAGE_ALT = "test_alt";
+
private static Set<String> javaScripts = new HashSet<String>();
private static Set<String> imageClasses = new HashSet<String>();
private static Set<String> imagePNGClasses = new HashSet<String>();
@@ -112,7 +114,8 @@
orderingList.setId("orderingList");
orderingList.setControlsType("link");
orderingList.setVar("item");
-
+ orderingList.getAttributes().put("topTitle", IMAGE_ALT);
+
caption = new HtmlOutputText();
caption.setValue("caption");
orderingList.getFacets().put("caption", caption);
@@ -256,6 +259,13 @@
if (uri.contains("spacer.gif")) {
continue;
}
+
+ String alt = img.getAttributeValue(HTML.alt_ATTRIBUTE);
+ assertNotNull(alt);
+ if (alt.length() > 0) {
+ assertEquals(IMAGE_ALT, alt);
+ }
+
generatedCount++;
HtmlElement element = (HtmlElement) img.getParentDomNode();
Modified: trunk/ui/pickList/src/main/config/component/picklist.xml
===================================================================
--- trunk/ui/pickList/src/main/config/component/picklist.xml 2009-01-29 15:36:39 UTC (rev
12486)
+++ trunk/ui/pickList/src/main/config/component/picklist.xml 2009-01-29 15:46:21 UTC (rev
12487)
@@ -1,48 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
"http://labs.jboss.com/jbossrichfaces/component-config.dtd" >
<components>
- <component>
- <name>org.richfaces.PickList</name>
- <family>org.richfaces.PickList</family>
- <classname>
- org.richfaces.component.html.HtmlPickList
+ <component>
+ <name>org.richfaces.PickList</name>
+ <family>org.richfaces.PickList</family>
+ <classname>
+ org.richfaces.component.html.HtmlPickList
</classname>
- <superclass>org.richfaces.component.UIPickList</superclass>
- <test>
- <classname>org.richfaces.component.html.HtmlPickListComponentTest</classname>
- <superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
- </test>
- <description>
+ <superclass>org.richfaces.component.UIPickList</superclass>
+ <test>
+
<classname>org.richfaces.component.html.HtmlPickListComponentTest</classname>
+
<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+ </test>
+ <description>
<![CDATA[The <rich:pickList> component is used for moving selected
item(s) from one list into another. ]]>
- </description>
- <renderer generate="true" override="true">
- <name>org.richfaces.PickListRenderer</name>
- <template>htmlPickList.jspx</template>
- </renderer>
-
- <tag>
- <name>pickList</name>
- <classname>org.richfaces.taglib.PickListTag</classname>
- <superclass>
- org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
+ </description>
+ <renderer generate="true" override="true">
+ <name>org.richfaces.PickListRenderer</name>
+ <template>htmlPickList.jspx</template>
+ </renderer>
+
+ <tag>
+ <name>pickList</name>
+ <classname>org.richfaces.taglib.PickListTag</classname>
+ <superclass>
+ org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
</superclass>
- <test/>
- </tag>
-
- <properties>
- <property hidden="true">
- <name>selectedValues</name>
- <classname>java.lang.Object[]</classname>
+ <test />
+ </tag>
+
+ <properties>
+ <property hidden="true">
+ <name>selectedValues</name>
+ <classname>java.lang.Object[]</classname>
+ </property>
+
+ <property>
+ <name>showButtonsLabel</name>
+ <classname>boolean</classname>
+ <defaultvalue>true</defaultvalue>
+ <description>Shows a label for a button. Default value is
"true"</description>
</property>
<property>
- <name>showButtonsLabel</name>
- <classname>boolean</classname>
- <defaultvalue>true</defaultvalue>
- <description>Shows a label for a button. Default value is
"true"</description>
- </property>
-
- <property>
<name>copyAllControlLabel</name>
<classname>java.lang.String</classname>
<description>Defines a label for a copyAll control</description>
@@ -70,6 +70,32 @@
<defaultvalue>""</defaultvalue>
</property>
+ <property>
+ <name>copyAllTitle </name>
+ <classname>java.lang.String</classname>
+ <description>HTML: alt for Copy All button</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>copyTitle </name>
+ <classname>java.lang.String</classname>
+ <description>HTML: alt for copy button</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>removeTitle </name>
+ <classname>java.lang.String</classname>
+ <description>HTML: alt for remove button</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>removeAllTitle </name>
+ <classname>java.lang.String</classname>
+ <description>HTML: alt for remove all button</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+
+
<property>
<name>switchByClick</name>
<classname>boolean</classname>
Modified:
trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListControlsHelper.java
===================================================================
---
trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListControlsHelper.java 2009-01-29
15:36:39 UTC (rev 12486)
+++
trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListControlsHelper.java 2009-01-29
15:46:21 UTC (rev 12487)
@@ -39,6 +39,10 @@
*/
public class PickListControlsHelper extends ListShuttleControlsHelper {
+ private static final String REMOVE_ALL_TITLE = "removeAllTitle";
+ private static final String REMOVE_TITLE = "removeTitle";
+ private static final String COPY_TITLE = "copyTitle";
+ private static final String COPY_ALL_TITLE = "copyAllTitle";
public final static String BUNDLE_COPY_ALL_LABEL =
"RICH_PICK_LIST_COPY_ALL_LABEL";
public final static String BUNDLE_COPY_LABEL =
"RICH_PICK_LIST_COPY_LABEL";
public final static String BUNDLE_REMOVE_ALL_LABEL =
"RICH_PICK_LIST_REMOVE_ALL_LABEL";
@@ -112,7 +116,7 @@
protected static final OrderingComponentRendererBase.ControlsHelper[] HELPERS = new
OrderingComponentRendererBase.ControlsHelper[] {
new OrderingComponentRendererBase.ControlsHelper(NAME_COPYALL,
BUNDLE_COPY_ALL_LABEL, DEFAULT_LABEL_COPY_ALL, ListShuttleIconCopyAll.class
.getName(), FACET_COPY_ALL, "-copyall", ATTRIBUTE_CLASS_COPY_ALL_CONTROL,
"", CONTROL_ID_COPY_ALL, ATTRIBUTE_CE_ONCOPYALLCLICK, true,
-
"copyAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
+
"copyAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX),
COPY_ALL_TITLE) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return ((UIListShuttle) list).isFastMoveControlsVisible();
@@ -122,7 +126,7 @@
new OrderingComponentRendererBase.ControlsHelper(NAME_COPYALL_DIS,
BUNDLE_COPY_ALL_LABEL, DEFAULT_LABEL_COPY_ALL,
ListShuttleIconCopyAllDisabled.class.getName(), FACET_DIS_COPY_ALL,
"-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL, DISABLED_STYLE_PREF,
DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_COPY_ALL), null, false,
"copyAll"
- .concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
+ .concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX),
COPY_ALL_TITLE) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return ((UIListShuttle) list).isFastMoveControlsVisible();
@@ -131,7 +135,7 @@
},
new OrderingComponentRendererBase.ControlsHelper(NAME_COPY, BUNDLE_COPY_LABEL,
DEFAULT_LABEL_COPY, ListShuttleIconCopy.class.getName(), FACET_COPY,
"-copy", ATTRIBUTE_CLASS_COPY_CONTROL, "", CONTROL_ID_COPY,
ATTRIBUTE_CE_ONCOPYCLICK, true, "copy"
- .concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
+ .concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX),
COPY_TITLE) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return ((UIListShuttle) list).isMoveControlsVisible();
@@ -140,7 +144,7 @@
},
new OrderingComponentRendererBase.ControlsHelper(NAME_COPY_DIS, BUNDLE_COPY_LABEL,
DEFAULT_LABEL_COPY, ListShuttleIconCopyDisabled.class.getName(),
FACET_DIS_COPY, "-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL,
DISABLED_STYLE_PREF, DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_COPY), null,
- false,
"copy".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
+ false,
"copy".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX),
COPY_TITLE) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return ((UIListShuttle) list).isMoveControlsVisible();
@@ -149,7 +153,7 @@
},
new OrderingComponentRendererBase.ControlsHelper(NAME_REMOVE, BUNDLE_REMOVE_LABEL,
DEFAULT_LABEL_REMOVE, ListShuttleIconRemove.class.getName(),
FACET_REMOVE, "-remove", ATTRIBUTE_CLASS_REMOVE_CONTROL, "",
CONTROL_ID_REMOVE, ATTRIBUTE_CE_ONREMOVECLICK, true, "remove"
- .concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
+ .concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX),
REMOVE_TITLE) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return ((UIListShuttle) list).isMoveControlsVisible();
@@ -158,7 +162,7 @@
},
new OrderingComponentRendererBase.ControlsHelper(NAME_REMOVE_DIS,
BUNDLE_REMOVE_LABEL, DEFAULT_LABEL_REMOVE, ListShuttleIconRemoveDisabled.class
.getName(), FACET_DIS_REMOVE, "-disabled",
ATTRIBUTE_CLASS_DISABLED_CONTROL, DISABLED_STYLE_PREF, DIS_CONTROL_ID_PREFIX
- .concat(CONTROL_ID_REMOVE), null, false,
"remove".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
+ .concat(CONTROL_ID_REMOVE), null, false,
"remove".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX),
REMOVE_TITLE) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return ((UIListShuttle) list).isMoveControlsVisible();
@@ -167,7 +171,7 @@
},
new OrderingComponentRendererBase.ControlsHelper(NAME_REMOVEALL,
BUNDLE_REMOVE_ALL_LABEL, DEFAULT_LABEL_REMOVE_ALL, ListShuttleIconRemoveAll.class
.getName(), FACET_REMOVE_ALL, "-removeall",
ATTRIBUTE_CLASS_REMOVE_ALL_CONTROL, "", CONTROL_ID_REMOVE_ALL,
ATTRIBUTE_CE_ONREMOVEALLCLICK,
- true,
"removeAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
+ true,
"removeAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX),
REMOVE_ALL_TITLE) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return ((UIListShuttle) list).isFastMoveControlsVisible();
@@ -177,7 +181,7 @@
new OrderingComponentRendererBase.ControlsHelper(NAME_REMOVEALL_DIS,
BUNDLE_REMOVE_ALL_LABEL, DEFAULT_LABEL_REMOVE_ALL,
ListShuttleIconRemoveAllDisabled.class.getName(), FACET_DIS_REMOVE_ALL,
"-disabled", ATTRIBUTE_CLASS_DISABLED_CONTROL, DISABLED_STYLE_PREF,
DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_REMOVE_ALL), null, false,
"removeAll"
- .concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX)) {
+ .concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX),
REMOVE_ALL_TITLE) {
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
return ((UIListShuttle) list).isFastMoveControlsVisible();
Modified: trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java
===================================================================
---
trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java 2009-01-29
15:36:39 UTC (rev 12486)
+++
trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java 2009-01-29
15:46:21 UTC (rev 12487)
@@ -486,7 +486,7 @@
} else {
writer.startElement(HTML.IMG_ELEMENT, component);
writer.writeAttribute(HTML.class_ATTRIBUTE, "rich-picklist-control-img",
null);
- writer.writeAttribute(HTML.alt_ATTRIBUTE, getAltAttribbute(helper), null);
+ writer.writeAttribute(HTML.alt_ATTRIBUTE,
component.getAttributes().get(helper.getTitle()), null);
writer.writeAttribute(HTML.src_ATTRIBUTE,
getResource(helper.getImageURI()).getUri(context, null), null);
writer.endElement(HTML.IMG_ELEMENT);
@@ -515,7 +515,7 @@
private String getAltAttribbute(
OrderingComponentRendererBase.ControlsHelper helper) {
- return helper.getFacetName()!=null?helper.getFacetName():" ";
+ return helper.getFacetName() != null ? helper.getFacetName() : " ";
}
public void reRenderScript(FacesContext context, UIComponent component) throws
IOException {