Author: nbelaevski
Date: 2007-11-29 22:03:19 -0500 (Thu, 29 Nov 2007)
New Revision: 4378
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/component/UIListShuttle.java
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleControlsHelper.java
Log:
controls visibility attributes implemented in listShuttle component/demo
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-30
03:03:13 UTC (rev 4377)
+++
branches/3.1.x/sandbox/ui/listShuttle/src/main/config/component/listShuttle.xml 2007-11-30
03:03:19 UTC (rev 4378)
@@ -82,6 +82,25 @@
<defaultvalue>true</defaultvalue>
</property>
+ <property>
+ <name>moveControlsVisible</name>
+ <classname>boolean</classname>
+ <description>
+ If false 'Copy' and 'Remove' controls aren’t displayed
+ </description>
+ <defaultvalue>true</defaultvalue>
+ </property>
+ <property>
+ <name>fastMoveControlsVisible</name>
+ <classname>boolean</classname>
+ <description>
+ If false 'Copy All' and 'Remove All' controls aren’t
displayed
+ </description>
+ <defaultvalue>true</defaultvalue>
+ </property>
+
+
+
<property>
<name>showButtonLabels</name>
<classname>boolean</classname>
Modified:
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
===================================================================
---
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java 2007-11-30
03:03:13 UTC (rev 4377)
+++
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java 2007-11-30
03:03:19 UTC (rev 4378)
@@ -576,4 +576,16 @@
return new ModelItemState(getSelection(), getActiveItem());
}
}
+
+ public abstract boolean isOrderControlsVisible();
+ public abstract void setOrderControlsVisible(boolean visible);
+
+ public abstract boolean isFastOrderControlsVisible();
+ public abstract void setFastOrderControlsVisible(boolean visible);
+
+ public abstract boolean isMoveControlsVisible();
+ public abstract void setMoveControlsVisible(boolean visible);
+
+ public abstract boolean isFastMoveControlsVisible();
+ public abstract void setFastMoveControlsVisible(boolean visible);
}
Modified:
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleControlsHelper.java
===================================================================
---
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleControlsHelper.java 2007-11-30
03:03:13 UTC (rev 4377)
+++
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleControlsHelper.java 2007-11-30
03:03:19 UTC (rev 4378)
@@ -2,6 +2,7 @@
import javax.faces.context.FacesContext;
+import org.richfaces.component.UIListShuttle;
import org.richfaces.component.UIOrderingBaseComponent;
import org.richfaces.renderkit.html.images.ListShuttleIconCopy;
import org.richfaces.renderkit.html.images.ListShuttleIconCopyAll;
@@ -73,7 +74,7 @@
CONTROL_ID_COPY_ALL, ATTRIBUTE_CE_ONCOPYALLCLICK, true,
"copyAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
- return list.isFastOrderControlsVisible();
+ return ((UIListShuttle) list).isFastMoveControlsVisible();
}
},
@@ -82,7 +83,7 @@
DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_COPY_ALL), null, false,
"copyAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
- return list.isFastOrderControlsVisible();
+ return ((UIListShuttle) list).isFastMoveControlsVisible();
}
},
@@ -91,7 +92,7 @@
CONTROL_ID_COPY, ATTRIBUTE_CE_ONCOPYCLICK ,true,
"copy".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
- return list.isOrderControlsVisible();
+ return ((UIListShuttle) list).isMoveControlsVisible();
}
},
@@ -100,7 +101,7 @@
DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_COPY), null, false,
"copy".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
- return list.isOrderControlsVisible();
+ return ((UIListShuttle) list).isMoveControlsVisible();
}
},
@@ -109,7 +110,7 @@
CONTROL_ID_REMOVE, ATTRIBUTE_CE_ONREMOVECLICK, true,
"remove".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
- return list.isOrderControlsVisible();
+ return ((UIListShuttle) list).isMoveControlsVisible();
}
},
@@ -118,7 +119,7 @@
DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_REMOVE), null, false,
"remove".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
- return list.isOrderControlsVisible();
+ return ((UIListShuttle) list).isMoveControlsVisible();
}
},
@@ -127,7 +128,7 @@
CONTROL_ID_REMOVE_ALL, ATTRIBUTE_CE_ONREMOVEALLCLICK, true,
"removeAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
- return list.isFastOrderControlsVisible();
+ return ((UIListShuttle) list).isFastMoveControlsVisible();
}
},
@@ -136,7 +137,7 @@
DIS_CONTROL_ID_PREFIX.concat(CONTROL_ID_REMOVE_ALL), null, false,
"removeAll".concat(OrderingComponentControlsHelper.CONTROL_LABEL_ATTRIBUTE_SUFFIX))
{
public boolean isRendered(FacesContext context, UIOrderingBaseComponent list) {
- return list.isFastOrderControlsVisible();
+ return ((UIListShuttle) list).isFastMoveControlsVisible();
}
}