Author: ayanul
Date: 2007-12-03 03:58:34 -0500 (Mon, 03 Dec 2007)
New Revision: 4412
Added:
branches/3.1.x/test-applications/facelets/src/main/java/listShuttle/
branches/3.1.x/test-applications/facelets/src/main/java/listShuttle/ListShuttle.java
branches/3.1.x/test-applications/facelets/src/main/webapp/ListShuttle/
branches/3.1.x/test-applications/facelets/src/main/webapp/ListShuttle/ListShuttle.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/ListShuttle/ListShuttleProperty.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/ListShuttle/ListShuttleStraightforward.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-ListShuttle.xml
Modified:
branches/3.1.x/test-applications/facelets/src/main/java/orderingList/OrderingList.java
branches/3.1.x/test-applications/facelets/src/main/java/rich/RichBean.java
branches/3.1.x/test-applications/facelets/src/main/java/tree/Bean.java
branches/3.1.x/test-applications/facelets/src/main/java/tree/Library.java
branches/3.1.x/test-applications/facelets/src/main/webapp/ComponentControl/ComponentControl.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/ContextMenu/ContextMenuProperty.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/DropDownMenu/DropDownMenu.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/OrderingList/OrderingList.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/OrderingList/OrderingListStraightforward.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/WEB-INF/web.xml
branches/3.1.x/test-applications/facelets/src/main/webapp/pages/RichMenu/RichMenu.xhtml
Log:
add listShuttle
Added:
branches/3.1.x/test-applications/facelets/src/main/java/listShuttle/ListShuttle.java
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/java/listShuttle/ListShuttle.java
(rev 0)
+++
branches/3.1.x/test-applications/facelets/src/main/java/listShuttle/ListShuttle.java 2007-12-03
08:58:34 UTC (rev 4412)
@@ -0,0 +1,273 @@
+package listShuttle;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+
+import javax.faces.event.ValueChangeEvent;
+
+import util.data.Data;
+
+public class ListShuttle {
+ private int first;
+ private int lenght;
+ private String [] statusIcon = {"/pics/error.gif",
"/pics/fatal.gif", "/pics/info.gif", "/pics/passed.gif",
"/pics/warn.gif"};
+ private boolean fastMoveControlsVisible;
+ private boolean fastOrderControlsVisible;
+ private boolean moveControlsVisible;
+ private boolean orderControlsVisible;
+ private boolean showButtonLabels;
+ private boolean showSelect;
+ private boolean showAllSourceData;
+ private boolean showAllTargetData;
+ private ArrayList<Data> sourceValue;
+ private ArrayList<Data> targetValue;
+ private ArrayList<String> info;
+ private Collection selection;
+ private String bottomControlLabel;
+ private String copyAllControlLabel;
+ private String copyControlLabel;
+ private String downControlLabel;
+ private String removeAllControlLabel;
+ private String removeControlLabel;
+ private String topControlLabel;
+ private String upControlLabel;
+
+
+ public ListShuttle() {
+ this.first = 1;
+ this.lenght = 10;
+ this.showSelect = true;
+ this.showAllSourceData = true;
+ this.showAllTargetData = true;
+ this.fastMoveControlsVisible = true;
+ this.fastOrderControlsVisible = true;
+ this.moveControlsVisible = true;
+ this.orderControlsVisible = true;
+ this.showButtonLabels = true;
+ this.bottomControlLabel = "bottom";
+ this.copyAllControlLabel = "copy all";
+ this.copyControlLabel = "copy";
+ this.downControlLabel = "down";
+ this.removeAllControlLabel = "remove all";
+ this.removeControlLabel = "remove";
+ this.topControlLabel = "top";
+ this.upControlLabel = "up";
+ this.info = new ArrayList<String>();
+ this.targetValue = new ArrayList<Data>();
+ this.sourceValue = new ArrayList<Data>();
+ for(int i = 0; i < lenght; i++)
+ sourceValue.add(new Data(i, "Button " + i, "Link " + i,
"select" +(i % 5), statusIcon[i % 5]));
+ }
+
+ public int getFirst() {
+ return first;
+ }
+
+ public void setFirst(int first) {
+ this.first = first;
+ }
+
+ public boolean isFastMoveControlsVisible() {
+ return fastMoveControlsVisible;
+ }
+
+ public void setFastMoveControlsVisible(boolean fastMoveControlsVisible) {
+ this.fastMoveControlsVisible = fastMoveControlsVisible;
+ }
+
+ public boolean isFastOrderControlsVisible() {
+ return fastOrderControlsVisible;
+ }
+
+ public void setFastOrderControlsVisible(boolean fastOrderControlsVisible) {
+ this.fastOrderControlsVisible = fastOrderControlsVisible;
+ }
+
+ public boolean isMoveControlsVisible() {
+ return moveControlsVisible;
+ }
+
+ public void setMoveControlsVisible(boolean moveControlsVisible) {
+ this.moveControlsVisible = moveControlsVisible;
+ }
+
+ public boolean isOrderControlsVisible() {
+ return orderControlsVisible;
+ }
+
+ public void setOrderControlsVisible(boolean orderControlsVisible) {
+ this.orderControlsVisible = orderControlsVisible;
+ }
+
+ public boolean isShowButtonLabels() {
+ return showButtonLabels;
+ }
+
+ public void setShowButtonLabels(boolean showButtonLabels) {
+ this.showButtonLabels = showButtonLabels;
+ }
+
+ public ArrayList<Data> getSourceValue() {
+ return sourceValue;
+ }
+
+ public void setSourceValue(ArrayList<Data> sourceValue) {
+ this.sourceValue = sourceValue;
+ }
+
+ public ArrayList getTargetValue() {
+ return targetValue;
+ }
+
+ public Collection getSelection() {
+ System.out.println("Selection.out: " + selection);
+ return selection;
+ }
+
+ public void setSelection(Collection selection) {
+ info.clear();
+ addSelection(selection);
+ this.selection = selection;
+ }
+
+ public String getBottomControlLabel() {
+ return bottomControlLabel;
+ }
+
+ public void setBottomControlLabel(String bottomControlLabel) {
+ this.bottomControlLabel = bottomControlLabel;
+ }
+
+ public String getCopyAllControlLabel() {
+ return copyAllControlLabel;
+ }
+
+ public void setCopyAllControlLabel(String copyAllControlLabel) {
+ this.copyAllControlLabel = copyAllControlLabel;
+ }
+
+ public String getCopyControlLabel() {
+ return copyControlLabel;
+ }
+
+ public void setCopyControlLabel(String copyControlLabel) {
+ this.copyControlLabel = copyControlLabel;
+ }
+
+ public String getDownControlLabel() {
+ return downControlLabel;
+ }
+
+ public void setDownControlLabel(String downControlLabel) {
+ this.downControlLabel = downControlLabel;
+ }
+
+ public String getRemoveAllControlLabel() {
+ return removeAllControlLabel;
+ }
+
+ public void setRemoveAllControlLabel(String removeAllControlLabel) {
+ this.removeAllControlLabel = removeAllControlLabel;
+ }
+
+ public String getRemoveControlLabel() {
+ return removeControlLabel;
+ }
+
+ public void setRemoveControlLabel(String removeControlLabel) {
+ this.removeControlLabel = removeControlLabel;
+ }
+
+ public String getTopControlLabel() {
+ return topControlLabel;
+ }
+
+ public void setTopControlLabel(String topControlLabel) {
+ this.topControlLabel = topControlLabel;
+ }
+
+ public String getUpControlLabel() {
+ return upControlLabel;
+ }
+
+ public void setUpControlLabel(String upControlLabel) {
+ this.upControlLabel = upControlLabel;
+ }
+
+ public void addNewItem() {
+ if(lenght < 0) lenght = 0;
+ if(sourceValue.size() > lenght)
+ for(int i = lenght; i < sourceValue.size(); )
+ sourceValue.remove(i);
+ else
+ for(int i = sourceValue.size() + 1; i <= lenght; i++)
+ sourceValue.add(new Data(i, "Button " + i, "Link " + i,
"select" +(i % 5), statusIcon[i % 5]));
+ }
+
+ private void addSelection(Collection<Data> selection) {
+ if(selection == null) return;
+ Iterator<Data> inter = selection.iterator();
+ Data data = new Data();
+ while (inter.hasNext()) {
+ data = inter.next();
+ info.add(data.getInt0() + "; " + data.getStr0() + "; " +
data.getStr1() + "; " + data.getStr2() + "; " + data.getStr3());
+ }
+ }
+
+ public int getLenght() {
+ return lenght;
+ }
+
+ public void setLenght(int lenght) {
+ this.lenght = lenght;
+ }
+
+ public ArrayList<String> getInfo() {
+ return info;
+ }
+
+ public void setInfo(ArrayList<String> info) {
+ this.info = info;
+ }
+
+ public void setTargetValue(ArrayList<Data> targetValue) {
+ this.targetValue = targetValue;
+ }
+
+ public void cbAction() {
+ info.clear();
+ info.add("commandButton submit();");
+ addSelection(getSelection());
+ }
+
+ public void clAction() {
+ info.clear();
+ info.add("commandLink submit();");
+ addSelection(getSelection());
+ }
+
+ public boolean isShowSelect() {
+ return showSelect;
+ }
+
+ public void setShowSelect(boolean showSelect) {
+ this.showSelect = showSelect;
+ }
+
+ public boolean isShowAllSourceData() {
+ return showAllSourceData;
+ }
+
+ public void setShowAllSourceData(boolean showAllSourceData) {
+ this.showAllSourceData = showAllSourceData;
+ }
+
+ public boolean isShowAllTargetData() {
+ return showAllTargetData;
+ }
+
+ public void setShowAllTargetData(boolean showAllTargetData) {
+ this.showAllTargetData = showAllTargetData;
+ }
+}
Modified:
branches/3.1.x/test-applications/facelets/src/main/java/orderingList/OrderingList.java
===================================================================
---
branches/3.1.x/test-applications/facelets/src/main/java/orderingList/OrderingList.java 2007-12-03
00:11:11 UTC (rev 4411)
+++
branches/3.1.x/test-applications/facelets/src/main/java/orderingList/OrderingList.java 2007-12-03
08:58:34 UTC (rev 4412)
@@ -14,7 +14,6 @@
private String [] statusIcon = {"/pics/error.gif",
"/pics/fatal.gif", "/pics/info.gif", "/pics/passed.gif",
"/pics/warn.gif"};
private String captionLabel;
private Collection<Data> selection;
- private String select;
private String controlsType;
private String controlsVerticalAlign;
private String controlsHorizontalAlign;
@@ -31,6 +30,8 @@
private boolean rendered;
private boolean showButtonLabels;
private boolean facet;
+ private boolean showAllData;
+ private boolean showSelect;
public boolean isFacet() {
return facet;
@@ -47,7 +48,7 @@
public void setSelection(Collection<Data> selection) {
System.out.println("Selection.out: " + selection);
info.clear();
- addSelection();
+ addSelection(selection);
this.selection = selection;
}
@@ -70,24 +71,26 @@
}
public OrderingList() {
- info = new ArrayList<String>();
- captionLabel = "captionLabel";
- lenght = 10;
- listHeight = "300";
- listWidth = "800";
- controlsType = "button";
- controlsHorizontalAlign = "right";
- controlsVerticalAlign = "center";
- headerLabel = "headerLabel";
- bottomControlLabel = "bottom label";
- upControlLabel = "up label";
- downControlLabel = "down label";
- topControlLabel = "top label";
- orderControlsVisible = true;
- fastOrderControlsVisible = true;
- rendered = true;
- showButtonLabels = true;
- list = new ArrayList<Data>();
+ this.info = new ArrayList<String>();
+ this.captionLabel = "captionLabel";
+ this.lenght = 10;
+ this.listHeight = "300";
+ this.listWidth = "800";
+ this.controlsType = "button";
+ this.controlsHorizontalAlign = "right";
+ this.controlsVerticalAlign = "center";
+ this.headerLabel = "headerLabel";
+ this.bottomControlLabel = "bottom label";
+ this.upControlLabel = "up label";
+ this.downControlLabel = "down label";
+ this.topControlLabel = "top label";
+ this.orderControlsVisible = true;
+ this.fastOrderControlsVisible = true;
+ this.rendered = true;
+ this.showButtonLabels = true;
+ this.showAllData = true;
+ this.showSelect = true;
+ this.list = new ArrayList<Data>();
for(int i = 1; i <= lenght; i++)
list.add(new Data(i, "Button " + i, "Link " + i,
"select" +(i % 5), statusIcon[i % 5]));
}
@@ -223,13 +226,13 @@
public void cbAction() {
info.clear();
info.add("commandButton submit();");
- addSelection();
+ addSelection(getSelection());
}
public void clAction() {
info.clear();
info.add("commandLink submit();");
- addSelection();
+ addSelection(getSelection());
}
public void bTest1(){
@@ -332,14 +335,6 @@
addNewItem();
}
- public String getSelect() {
- return select;
- }
-
- public void setSelect(String select) {
- this.select = select;
- }
-
public ArrayList<String> getInfo() {
return info;
}
@@ -348,13 +343,29 @@
this.info = info;
}
- private void addSelection() {
+ private void addSelection(Collection<Data> selection) {
if(selection == null) return;
Iterator<Data> inter = selection.iterator();
Data data = new Data();
while (inter.hasNext()) {
data = inter.next();
- info.add(data.getInt0() + "; " + data.getStr0() + "; " +
data.getStr1() + "; " + data.getStr2() + "; " + data.getStr3());
+ info.add(data.getInt0() + "; " + data.getStr0() + "; " +
data.getStr0() + "submit(); " + data.getStr1() + "; " +
data.getStr1() + "submit(); " + data.getStr2() + "; " +
data.getStr3());
}
}
+
+ public boolean isShowAllData() {
+ return showAllData;
+ }
+
+ public void setShowAllData(boolean showAllData) {
+ this.showAllData = showAllData;
+ }
+
+ public boolean isShowSelect() {
+ return showSelect;
+ }
+
+ public void setShowSelect(boolean showSelect) {
+ this.showSelect = showSelect;
+ }
}
Modified: branches/3.1.x/test-applications/facelets/src/main/java/rich/RichBean.java
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/java/rich/RichBean.java 2007-12-03
00:11:11 UTC (rev 4411)
+++ branches/3.1.x/test-applications/facelets/src/main/java/rich/RichBean.java 2007-12-03
08:58:34 UTC (rev 4412)
@@ -52,6 +52,7 @@
map.add("DataDefinitionList",
add("/DataDefinitionList/DataDefinitionList", new boolean [] {true, false}));
map.add("DataOrderedList", add("/DataOrderedList/DataOrderedList",
new boolean [] {true, false}));
map.add("ContextMenu", add("/ContextMenu/ContextMenu", new boolean
[] {true, false}));
+ map.add("ListShuttle", add("/ListShuttle/ListShuttle", new boolean
[] {true, true}));
}
public String getSrc() {
Modified: branches/3.1.x/test-applications/facelets/src/main/java/tree/Bean.java
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/java/tree/Bean.java 2007-12-03
00:11:11 UTC (rev 4411)
+++ branches/3.1.x/test-applications/facelets/src/main/java/tree/Bean.java 2007-12-03
08:58:34 UTC (rev 4412)
@@ -75,9 +75,22 @@
child.setData("Node: " + id);
data1.addChild(id, child);
}
- initData();
+ //initData();
}
+ private void initData() {
+ selectedNodeChildren.clear();
+ if (selectedNode != null) {
+ Iterator iter = selectedNode.getChildren();
+ int i = 0;
+ while (iter.hasNext()) {
+ Map.Entry entry = (Map.Entry) iter.next();
+ selectedNodeChildren
+ .put(((TreeNode) entry.getValue()).getData(), Integer.toString(i++));
+ }
+ }
+ }
+
public String getIcon() {
return icon;
}
@@ -146,6 +159,7 @@
System.out.println("Node selected: " + getTree(event).getRowKey());
if (getTree(event).getTreeNode() != null) {
selectedNode = getTree(event).getTreeNode();
+ data.removeChild(selectedNode.getChildren());
initData();
}
}
@@ -174,19 +188,6 @@
tree.setRowKey(key);
}
- private void initData() {
- selectedNodeChildren.clear();
- if (selectedNode != null) {
- Iterator iter = selectedNode.getChildren();
- int i = 0;
- while (iter.hasNext()) {
- Map.Entry entry = (Map.Entry) iter.next();
- selectedNodeChildren
- .put(((TreeNode) entry.getValue()).getData(), Integer.toString(i++));
- }
- }
- }
-
public void onExpand(NodeExpandedEvent event) {
UITree tree = getTree(event);
System.out.println("Node " + (tree.isExpanded() ? "expanded" :
"collapsed") + " "
Modified: branches/3.1.x/test-applications/facelets/src/main/java/tree/Library.java
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/java/tree/Library.java 2007-12-03
00:11:11 UTC (rev 4411)
+++ branches/3.1.x/test-applications/facelets/src/main/java/tree/Library.java 2007-12-03
08:58:34 UTC (rev 4412)
@@ -13,7 +13,6 @@
private Map pathways = null;
private Object state1;
- // private Object state2;
private List listPathway;
Modified:
branches/3.1.x/test-applications/facelets/src/main/webapp/ComponentControl/ComponentControl.xhtml
===================================================================
---
branches/3.1.x/test-applications/facelets/src/main/webapp/ComponentControl/ComponentControl.xhtml 2007-12-03
00:11:11 UTC (rev 4411)
+++
branches/3.1.x/test-applications/facelets/src/main/webapp/ComponentControl/ComponentControl.xhtml 2007-12-03
08:58:34 UTC (rev 4412)
@@ -1,14 +1,23 @@
<f:subview id="componentControlSubviewID"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich">
- <rich:modalPanel id="MPid"
onshow="alert(event.parameters.name)">
- <h:outputLink id onclick="Richfaces.hideModalPanel('MPid');return
false;" value="Close">
- <rich:componentControl for="MPid" operation="hide"
params="name:'componentControl work(hide)'" />
- <f:verbatim>Close</f:verbatim>
- </h:outputLink>
+
+ <rich:modalPanel id="ccModalPanelID"
onshow="alert(event.parameters.show)"
onhide="alert(event.parameters.hide)">
+ <h:outputLink id="hideButtonID"
onclick="Richfaces.hideModalPanel('ccModalPanelID');return false;"
value="Close"/>
</rich:modalPanel>
- <h:commandButton id="button"
onclick="Richfaces.showModalPanel('MPid');"
></h:commandButton>
- <a id="showButton"
onclick="Richfaces.showModalPanel('MPid');" href="#">Show
MP</a>
+
+ <h:commandButton id="showButtonID"
onclick="Richfaces.showModalPanel('ccModalPanelID');"
value="show" ></h:commandButton>
- <rich:componentControl attachTo="showButton" for="MPid"
operation="show" params="name:'componentControl
work(show)'"/>
+ <rich:componentControl attachTo="showButtonID"
for="ccModalPanelID" operation="show"
params="show:'componentControl work(show)'">
+ <f:param name="mPanelParam" value="show"/>
+ </rich:componentControl>
+ <rich:componentControl attachTo="hideButtonID"
for="ccModalPanelID" operation="hide"
params="hide:'componentControl work(hide)'">
+ <f:param name="mPanelParam" value="hide" />
+ </rich:componentControl>
+ <rich:contextMenu submitMode="server" id="ccContextMenuID">
+ <rich:menuItem value="Item 1"></rich:menuItem>
+ <rich:menuItem value="Item 2"></rich:menuItem>
+ <rich:menuItem value="Item 3"></rich:menuItem>
+ </rich:contextMenu>
+
</f:subview>
\ No newline at end of file
Modified:
branches/3.1.x/test-applications/facelets/src/main/webapp/ContextMenu/ContextMenuProperty.xhtml
===================================================================
---
branches/3.1.x/test-applications/facelets/src/main/webapp/ContextMenu/ContextMenuProperty.xhtml 2007-12-03
00:11:11 UTC (rev 4411)
+++
branches/3.1.x/test-applications/facelets/src/main/webapp/ContextMenu/ContextMenuProperty.xhtml 2007-12-03
08:58:34 UTC (rev 4412)
@@ -1,7 +1,7 @@
<f:subview id="contextMenuPropertySubviewID"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:ui="http://java.sun.com/jsf/facelets">
- <a4j:commandButton value="reRender"
reRender="orderingListID"></a4j:commandButton>
+ <a4j:commandButton value="reRender"
reRender="cmInfoID"></a4j:commandButton>
<a4j:commandButton action="submit();" value="a4j
submit();"></a4j:commandButton>
<a4j:commandButton action="submit();" immediate="true"
value="immediate submit(); (a4j)"></a4j:commandButton>
<h:commandButton action="submit();" value="submit();" />
Modified:
branches/3.1.x/test-applications/facelets/src/main/webapp/DropDownMenu/DropDownMenu.xhtml
===================================================================
---
branches/3.1.x/test-applications/facelets/src/main/webapp/DropDownMenu/DropDownMenu.xhtml 2007-12-03
00:11:11 UTC (rev 4411)
+++
branches/3.1.x/test-applications/facelets/src/main/webapp/DropDownMenu/DropDownMenu.xhtml 2007-12-03
08:58:34 UTC (rev 4412)
@@ -3,7 +3,7 @@
<h:panelGrid columns="2">
<rich:spacer width="400px"
height="400px"></rich:spacer>
<rich:panel>
- <rich:dropDownMenu id="ddmId" value="DropDownMenu"
submitMode="#{dDMenu.mode}" hideDelay="#{dDMenu.hideDelay}"
+ <rich:dropDownMenu id="ddmId" value=""
submitMode="#{dDMenu.mode}" hideDelay="#{dDMenu.hideDelay}"
direction="#{dDMenu.direction}"
horizontalOffset="#{dDMenu.horizontalOffset}"
jointPoint="#{dDMenu.jointPoint}"
popupWidth="#{dDMenu.popupWidth}"
showDelay="#{dDMenu.showDelay}" rendered="#{dDMenu.rendered}"
verticalOffset="#{dDMenu.verticalOffset}" styleClass="panelpos"
event="#{dDMenu.event}"
Added:
branches/3.1.x/test-applications/facelets/src/main/webapp/ListShuttle/ListShuttle.xhtml
===================================================================
---
branches/3.1.x/test-applications/facelets/src/main/webapp/ListShuttle/ListShuttle.xhtml
(rev 0)
+++
branches/3.1.x/test-applications/facelets/src/main/webapp/ListShuttle/ListShuttle.xhtml 2007-12-03
08:58:34 UTC (rev 4412)
@@ -0,0 +1,75 @@
+<f:subview id="listShuttleSubviewID"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
+ <rich:listShuttle id="listShuttleID" var="item"
sourceValue="#{listShuttle.sourceValue}"
targetValue="#{listShuttle.targetValue}"
+ bottomControlLabel="#{listShuttle.bottomControlLabel}"
copyAllControlLabel="#{listShuttle.copyAllControlLabel}"
+ copyControlLabel="#{listShuttle.copyControlLabel}"
downControlLabel="#{listShuttle.downControlLabel}"
+ fastMoveControlsVisible="#{listShuttle.fastMoveControlsVisible}"
+ fastOrderControlsVisible="#{listShuttle.fastOrderControlsVisible}"
first="#{listShuttle.first}"
+ moveControlsVisible="#{listShuttle.moveControlsVisible}"
orderControlsVisible="#{listShuttle.orderControlsVisible}"
+ removeAllControlLabel="#{listShuttle.removeAllControlLabel}"
removeControlLabel="#{listShuttle.removeControlLabel}"
+ selection="#{listShuttle.selection}"
showButtonLabels="#{listShuttle.showButtonLabels}"
+ topControlLabel="#{listShuttle.topControlLabel}"
upControlLabel="#{listShuttle.upControlLabel}">
+ <h:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="Number" />
+ </f:facet>
+ <h:outputText value="#{item.int0}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Input" />
+ </f:facet>
+ <h:inputText value="#{item.str0}" />
+ </h:column>
+
+ <h:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="Button" />
+ </f:facet>
+ <h:commandButton onclick="submit();"
action="#{listShuttle.cbAction}" value="#{item.str0} submit();"/>
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Input" />
+ </f:facet>
+ <h:inputText value="#{item.str1}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Link" />
+ </f:facet>
+ <a4j:commandLink action="#{listShuttle.clAction}"
value="#{item.str1} submit()"
reRender="listShuttleID"></a4j:commandLink>
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="select" />
+ </f:facet>
+ <h:selectOneMenu value="#{item.str2}">
+ <f:selectItem itemLabel="select0" itemValue="select0" />
+ <f:selectItem itemLabel="select1" itemValue="select1" />
+ <f:selectItem itemLabel="select2" itemValue="select2" />
+ <f:selectItem itemLabel="select3" itemValue="select3" />
+ <f:selectItem itemLabel="select4" itemValue="select4" />
+ <a4j:support event="onclick"
action="submit();"></a4j:support>
+ </h:selectOneMenu>
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Text" />
+ </f:facet>
+ <h:outputText value="#{item.str3}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="graphicImage" />
+ </f:facet>
+ <h:graphicImage value="#{item.str3}" />
+ </h:column>
+ </rich:listShuttle>
+</f:subview>
\ No newline at end of file
Added:
branches/3.1.x/test-applications/facelets/src/main/webapp/ListShuttle/ListShuttleProperty.xhtml
===================================================================
---
branches/3.1.x/test-applications/facelets/src/main/webapp/ListShuttle/ListShuttleProperty.xhtml
(rev 0)
+++
branches/3.1.x/test-applications/facelets/src/main/webapp/ListShuttle/ListShuttleProperty.xhtml 2007-12-03
08:58:34 UTC (rev 4412)
@@ -0,0 +1,77 @@
+<f:subview id="listShuttlePropertySubviewID"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:ui="http://java.sun.com/jsf/facelets">
+ <h:panelGrid columns="2">
+ <h:panelGroup>
+ <a4j:commandButton value="reRender"
reRender="listShuttleID"></a4j:commandButton>
+ <a4j:commandButton action="submit();" value="a4j
submit();"></a4j:commandButton>
+ <a4j:commandButton action="submit();" immediate="true"
value="immediate submit(); (a4j)"></a4j:commandButton>
+ <h:commandButton action="submit();" value="submit();" />
+ <h:commandButton action="submit();" immediate="true"
value="immediate submit();" />
+ </h:panelGroup>
+
+ <h:outputText value="Enter quantity of lines" />
+ <h:inputText value="#{listShuttle.lenght}">
+ <a4j:support event="onchange"
action="#{listShuttle.addNewItem}"
reRender="listShuttleID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="first" />
+ <h:inputText value="#{listShuttle.first}">
+ <a4j:support event="onclick"
reRender="listShuttleID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="showButtonLabels" />
+ <h:selectBooleanCheckbox value="#{listShuttle.showButtonLabels}"
onchange="submit();" />
+
+ <h:outputText value="orderControlsVisible" />
+ <h:selectBooleanCheckbox value="#{listShuttle.orderControlsVisible}"
onchange="submit();" />
+
+ <h:outputText value="moveControlsVisible" />
+ <h:selectBooleanCheckbox value="#{listShuttle.moveControlsVisible}"
onchange="submit();" />
+
+ <h:outputText value="fastOrderControlsVisible" />
+ <h:selectBooleanCheckbox value="#{listShuttle.fastOrderControlsVisible}"
onchange="submit();" />
+
+ <h:outputText value="fastMoveControlsVisible" />
+ <h:selectBooleanCheckbox value="#{listShuttle.fastMoveControlsVisible}"
onchange="submit();" />
+
+ <h:outputText value="copyControlLabel" />
+ <h:inputText value="#{listShuttle.copyControlLabel}">
+ <a4j:support event="onclick"
reRender="listShuttleID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="removeControlLabel" />
+ <h:inputText value="#{listShuttle.removeControlLabel}">
+ <a4j:support event="onclick"
reRender="listShuttleID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="copyAllControlLabel" />
+ <h:inputText value="#{listShuttle.copyAllControlLabel}">
+ <a4j:support event="onclick"
reRender="listShuttleID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="removeAllControlLabel" />
+ <h:inputText value="#{listShuttle.removeAllControlLabel}">
+ <a4j:support event="onclick"
reRender="listShuttleID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="bottomControlLabel" />
+ <h:inputText value="#{listShuttle.bottomControlLabel}">
+ <a4j:support event="onclick"
reRender="listShuttleID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="downControlLabel" />
+ <h:inputText value="#{listShuttle.downControlLabel}">
+ <a4j:support event="onclick"
reRender="listShuttleID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="topControlLabel" />
+ <h:inputText value="#{listShuttle.topControlLabel}">
+ <a4j:support event="onclick"
reRender="listShuttleID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="upControlLabel" />
+ <h:inputText value="#{listShuttle.upControlLabel}">
+ <a4j:support event="onclick"
reRender="listShuttleID"></a4j:support>
+ </h:inputText>
+ </h:panelGrid>
+</f:subview>
\ No newline at end of file
Added:
branches/3.1.x/test-applications/facelets/src/main/webapp/ListShuttle/ListShuttleStraightforward.xhtml
===================================================================
---
branches/3.1.x/test-applications/facelets/src/main/webapp/ListShuttle/ListShuttleStraightforward.xhtml
(rev 0)
+++
branches/3.1.x/test-applications/facelets/src/main/webapp/ListShuttle/ListShuttleStraightforward.xhtml 2007-12-03
08:58:34 UTC (rev 4412)
@@ -0,0 +1,144 @@
+<f:subview id="listShuttleStraightforwardSubviewID"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:ui="http://java.sun.com/jsf/facelets">
+ <h:panelGrid columns="3">
+ <a4j:commandButton value="Show selection (reRender)"
reRender="infoLSID"></a4j:commandButton>
+ <h:column>
+ <h:selectBooleanCheckbox value="#{listShuttle.showSelect}"
onclick="submit();" />
+ </h:column>
+ <h:column>
+ <h:dataTable id="infoLSlID" value="#{listShuttle.info}"
var="info" rendered="#{listShuttle.showSelect}"
border="1">
+ <h:column>
+ <h:outputText value="#{info}" />
+ </h:column>
+ </h:dataTable>
+ </h:column>
+
+ <a4j:commandButton value="Show all source (reRender)"
reRender="allInfoLSSourceID"></a4j:commandButton>
+ <h:column>
+ <h:selectBooleanCheckbox value="#{listShuttle.showAllSourceData}"
onclick="submit();" />
+ </h:column>
+ <h:column>
+ <h:dataTable id="allInfoLSSourceID"
value="#{listShuttle.sourceValue}" var="allInfo"
rendered="#{listShuttle.showAllSourceData}" border="1">
+ <h:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="Number" />
+ </f:facet>
+ <h:outputText value="#{allInfo.int0}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Input" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str0}" />
+ </h:column>
+
+ <h:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="Button" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str0} submit();" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Input" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str1}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Link" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str1} submit()" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="select" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str2}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Text" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str3}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="graphicImage" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str3}" />
+ </h:column>
+ </h:dataTable>
+ </h:column>
+
+ <a4j:commandButton value="Show all target (reRender)"
reRender="allInfoLSTargetID"></a4j:commandButton>
+ <h:column>
+ <h:selectBooleanCheckbox value="#{listShuttle.showAllTargetData}"
onclick="submit();" />
+ </h:column>
+ <h:column>
+ <h:dataTable id="allInfoLSTargetID"
value="#{listShuttle.targetValue}" var="allInfo"
rendered="#{listShuttle.showAllTargetData}" border="1">
+ <h:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="Number" />
+ </f:facet>
+ <h:outputText value="#{allInfo.int0}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Input" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str0}" />
+ </h:column>
+
+ <h:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="Button" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str0} submit();" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Input" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str1}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Link" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str1} submit()" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="select" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str2}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Text" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str3}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="graphicImage" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str3}" />
+ </h:column>
+ </h:dataTable>
+ </h:column>
+ </h:panelGrid>
+</f:subview>
\ No newline at end of file
Modified:
branches/3.1.x/test-applications/facelets/src/main/webapp/OrderingList/OrderingList.xhtml
===================================================================
---
branches/3.1.x/test-applications/facelets/src/main/webapp/OrderingList/OrderingList.xhtml 2007-12-03
00:11:11 UTC (rev 4411)
+++
branches/3.1.x/test-applications/facelets/src/main/webapp/OrderingList/OrderingList.xhtml 2007-12-03
08:58:34 UTC (rev 4412)
@@ -2,7 +2,7 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:messages showDetail="true" />
-
+
<rich:orderingList id="orderingListID"
value="#{orderingList.list}" var="item"
listHeight="#{orderingList.listHeight}"
listWidth="#{orderingList.listWidth}"
controlsType="#{orderingList.controlsType}"
bottomControlLabel="#{orderingList.bottomControlLabel}"
captionLabel="#{orderingList.captionLabel}"
@@ -45,12 +45,12 @@
</f:facet>
<h:inputText value="#{item.str1}" />
</h:column>
-
+
<h:column>
<f:facet name="header">
<h:outputText value="Link" />
</f:facet>
- <a4j:commandLink action="#{orderingList.clAction}"
value="#{item.str1} submit()"></a4j:commandLink>
+ <a4j:commandLink action="#{orderingList.clAction}"
onclick="submit()" value="#{item.str1} submit()"
reRender="orderingListID"></a4j:commandLink>
</h:column>
<h:column>
@@ -58,7 +58,7 @@
<h:outputText value="select" />
</f:facet>
<h:selectOneMenu value="#{item.str2}">
- <f:selectItem itemLabel="select0" itemValue="select5" />
+ <f:selectItem itemLabel="select0" itemValue="select0" />
<f:selectItem itemLabel="select1" itemValue="select1" />
<f:selectItem itemLabel="select2" itemValue="select2" />
<f:selectItem itemLabel="select3" itemValue="select3" />
Modified:
branches/3.1.x/test-applications/facelets/src/main/webapp/OrderingList/OrderingListStraightforward.xhtml
===================================================================
---
branches/3.1.x/test-applications/facelets/src/main/webapp/OrderingList/OrderingListStraightforward.xhtml 2007-12-03
00:11:11 UTC (rev 4411)
+++
branches/3.1.x/test-applications/facelets/src/main/webapp/OrderingList/OrderingListStraightforward.xhtml 2007-12-03
08:58:34 UTC (rev 4412)
@@ -22,16 +22,82 @@
<a4j:commandButton action="#{orderingList.bTest5}" value="run"
reRender="orderingListPropertyID,orderingListID"></a4j:commandButton>
<h:outputText value="#{msg.t5OrderingList}" />
- <a4j:commandButton value="Show selection"
reRender="infoPanelID"></a4j:commandButton>
- <h:column></h:column>
+ <a4j:commandButton value="Show selection (reRender)"
reRender="infoPanelID"></a4j:commandButton>
<h:column>
- <h:dataTable id="infoPanelID" value="#{orderingList.info}"
var="info" rendered="true">
- <h:column>
- <h:outputText value="#{info}" />
- </h:column>
- </h:dataTable>
+ <h:selectBooleanCheckbox value="#{orderingList.showSelect}"
onclick="submit();" />
</h:column>
+ <h:column>
+ <h:dataTable id="infoPanelID" value="#{orderingList.info}"
var="info" rendered="#{orderingList.showSelect}"
border="1">
+ <h:column>
+ <h:outputText value="#{info}" />
+ </h:column>
+ </h:dataTable>
+ </h:column>
+ <a4j:commandButton value="Show all data (reRender)"
reRender="allInfoPanelID"></a4j:commandButton>
+ <h:column>
+ <h:selectBooleanCheckbox value="#{orderingList.showAllData}"
onclick="submit();" />
+ </h:column>
+ <h:column>
+ <h:dataTable id="allInfoPanelID" value="#{orderingList.list}"
var="allInfo" rendered="#{orderingList.showAllData}"
border="1">
+ <h:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="Number" />
+ </f:facet>
+ <h:outputText value="#{allInfo.int0}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Input" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str0}" />
+ </h:column>
+
+ <h:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="Button" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str0} submit();" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Input" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str1}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Link" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str1} submit()" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="select" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str2}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Text" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str3}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="graphicImage" />
+ </f:facet>
+ <h:outputText value="#{allInfo.str3}" />
+ </h:column>
+ </h:dataTable>
+ </h:column>
+
<h:panelGroup>
<a4j:commandButton value="reRender"
reRender="orderingListID"></a4j:commandButton>
<a4j:commandButton action="submit();" value="a4j
submit();"></a4j:commandButton>
Added:
branches/3.1.x/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-ListShuttle.xml
===================================================================
---
branches/3.1.x/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-ListShuttle.xml
(rev 0)
+++
branches/3.1.x/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-ListShuttle.xml 2007-12-03
08:58:34 UTC (rev 4412)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces
Config 1.0//EN"
+
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>listShuttle</managed-bean-name>
+ <managed-bean-class>listShuttle.ListShuttle</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+</faces-config>
Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/WEB-INF/web.xml 2007-12-03
00:11:11 UTC (rev 4411)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/WEB-INF/web.xml 2007-12-03
08:58:34 UTC (rev 4412)
@@ -45,7 +45,7 @@
/WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,/WEB-INF/faces-config-Insert.xml,
/WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,
/WEB-INF/faces-config-RichTest.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,
- /WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml,/WEB-INF/faces-config-ContextMenu.xml</param-value>
+ /WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml,/WEB-INF/faces-config-ContextMenu.xml,/WEB-INF/faces-config-ListShuttle.xml</param-value>
</context-param>
<filter>
<display-name>Ajax4jsf Filter</display-name>
Modified:
branches/3.1.x/test-applications/facelets/src/main/webapp/pages/RichMenu/RichMenu.xhtml
===================================================================
---
branches/3.1.x/test-applications/facelets/src/main/webapp/pages/RichMenu/RichMenu.xhtml 2007-12-03
00:11:11 UTC (rev 4411)
+++
branches/3.1.x/test-applications/facelets/src/main/webapp/pages/RichMenu/RichMenu.xhtml 2007-12-03
08:58:34 UTC (rev 4412)
@@ -31,6 +31,7 @@
<h:selectOneMenu value="#{richBean.src}"
onchange="submit();">
<f:selectItem itemValue="Blank" itemLabel="Blank" />
<f:selectItem itemValue="OrderingList"
itemLabel="OrderingList" />
+ <f:selectItem itemValue="ListShuttle" itemLabel="ListShuttle"
/>
<f:selectItem itemValue="ContextMenu" itemLabel="ContextMenu"
/>
<f:selectItem itemValue="Calendar" itemLabel="Calendar" />
<f:selectItem itemValue="DataFilterSlider" itemLabel="Data Filter
Slider" />