Author: adubovsky
Date: 2008-06-10 11:39:31 -0400 (Tue, 10 Jun 2008)
New Revision: 8985
Modified:
branches/3.1.x/test-applications/jsp/src/main/java/listShuttle/ListShuttle.java
branches/3.1.x/test-applications/jsp/src/main/java/orderingList/OrderingList.java
branches/3.1.x/test-applications/jsp/src/main/webapp/ListShuttle/ListShuttle.jsp
Log:
add binding
Modified: branches/3.1.x/test-applications/jsp/src/main/java/listShuttle/ListShuttle.java
===================================================================
---
branches/3.1.x/test-applications/jsp/src/main/java/listShuttle/ListShuttle.java 2008-06-10
12:55:24 UTC (rev 8984)
+++
branches/3.1.x/test-applications/jsp/src/main/java/listShuttle/ListShuttle.java 2008-06-10
15:39:31 UTC (rev 8985)
@@ -4,11 +4,17 @@
import java.util.Collection;
import java.util.Iterator;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
import javax.faces.event.ValueChangeEvent;
+import org.richfaces.component.html.HtmlListShuttle;
+
import util.data.Data;
public class ListShuttle {
+ private HtmlListShuttle myListShuttle;
+ private String bindLabel;
private int first;
private int lenght;
private String [] statusIcon = {"/pics/error.gif",
"/pics/fatal.gif", "/pics/info.gif", "/pics/passed.gif",
"/pics/warn.gif"};
@@ -47,6 +53,7 @@
public ListShuttle() {
this.first = 1;
this.lenght = 10;
+ this.bindLabel = "Not checked";
this.showSelect = true;
this.showAllSourceData = true;
this.showAllTargetData = true;
@@ -79,6 +86,31 @@
addNewItem();
}
+ public void bindingCheck(ActionEvent actionEvent){
+ FacesContext faces = FacesContext.getCurrentInstance();
+ bindLabel = myListShuttle.getBaseClientId(faces);
+ System.out.println("============LS Binding Check===========");
+ System.out.println(myListShuttle.getBaseClientId(faces));
+ System.out.println("============LS Binding Check===========");
+ //System.out.println(activeItem.toString());
+ }
+
+ public String getBindLabel() {
+ return bindLabel;
+ }
+
+ public void setBindLabel(String bindLabel) {
+ this.bindLabel = bindLabel;
+ }
+
+ public HtmlListShuttle getMyListShuttle() {
+ return myListShuttle;
+ }
+
+ public void setMyListShuttle(HtmlListShuttle myListShuttle) {
+ this.myListShuttle = myListShuttle;
+ }
+
public boolean getRendered() {
return rendered;
}
Modified:
branches/3.1.x/test-applications/jsp/src/main/java/orderingList/OrderingList.java
===================================================================
---
branches/3.1.x/test-applications/jsp/src/main/java/orderingList/OrderingList.java 2008-06-10
12:55:24 UTC (rev 8984)
+++
branches/3.1.x/test-applications/jsp/src/main/java/orderingList/OrderingList.java 2008-06-10
15:39:31 UTC (rev 8985)
@@ -38,7 +38,7 @@
public void bindingCheck(ActionEvent actionEvent){
FacesContext faces = FacesContext.getCurrentInstance();
- bindLabel = "Passed";
+ bindLabel = myOrderingList.getBaseClientId(faces);
System.out.println("============OL Binding Check===========");
System.out.println(myOrderingList.getBaseClientId(faces));
System.out.println("============OL Binding Check===========");
Modified:
branches/3.1.x/test-applications/jsp/src/main/webapp/ListShuttle/ListShuttle.jsp
===================================================================
---
branches/3.1.x/test-applications/jsp/src/main/webapp/ListShuttle/ListShuttle.jsp 2008-06-10
12:55:24 UTC (rev 8984)
+++
branches/3.1.x/test-applications/jsp/src/main/webapp/ListShuttle/ListShuttle.jsp 2008-06-10
15:39:31 UTC (rev 8985)
@@ -41,7 +41,8 @@
onremoveclick="showEvent('onremoveclickInputID', 'onremoveclick
work!')"
moveControlsVerticalAlign="#{listShuttle.moveControlsVerticalAlign}"
- orderControlsVerticalAlign="#{listShuttle.orderControlsVerticalAlign}">
+ orderControlsVerticalAlign="#{listShuttle.orderControlsVerticalAlign}"
+ binding="#{listShuttle.myListShuttle}">
<h:column>
<f:facet name="header">
@@ -106,4 +107,10 @@
<h:graphicImage value="#{item.str3}" />
</h:column>
</rich:listShuttle>
+
+ <h:panelGrid columns="2">
+ <a4j:commandButton reRender="outBindingCheck"
actionListener="#{listShuttle.bindingCheck}"
+ value="binding Check" />
+ <h:outputText id="outBindingCheck"
value="#{listShuttle.bindLabel}" />
+ </h:panelGrid>
</f:subview>
\ No newline at end of file