Author: mvitenkov
Date: 2008-04-21 12:59:51 -0400 (Mon, 21 Apr 2008)
New Revision: 8040
Modified:
branches/3.1.x/test-applications/facelets/src/main/java/scrollableDataTable/ScrollableDataTable.java
branches/3.1.x/test-applications/facelets/src/main/webapp/ScrollableDataTable/ScrollableDataTable.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/ScrollableDataTable/ScrollableDataTableProperty.xhtml
Log:
binding+selection
Modified:
branches/3.1.x/test-applications/facelets/src/main/java/scrollableDataTable/ScrollableDataTable.java
===================================================================
---
branches/3.1.x/test-applications/facelets/src/main/java/scrollableDataTable/ScrollableDataTable.java 2008-04-21
16:35:27 UTC (rev 8039)
+++
branches/3.1.x/test-applications/facelets/src/main/java/scrollableDataTable/ScrollableDataTable.java 2008-04-21
16:59:51 UTC (rev 8040)
@@ -4,6 +4,9 @@
import org.ajax4jsf.model.DataComponentState;
import org.richfaces.model.selection.Selection;
+import org.richfaces.component.html.HtmlScrollableDataTable;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
import util.data.Data;
@@ -32,11 +35,14 @@
private boolean ignoreDupResponses;
private String eventsQueue;
private String activeRowKey;
+ private String bindLabel;
private Selection selection;
private boolean ajaxSingle;
+ private HtmlScrollableDataTable myScrollableDT = null;
public ScrollableDataTable() {
width = "400px";
+ bindLabel = "not ready";
rows = 30;
hideWhenScrolling = false;
dataLength = 40;
@@ -213,4 +219,28 @@
public void setAjaxSingle(boolean ajaxSingle) {
this.ajaxSingle = ajaxSingle;
}
+
+ public String getBindLabel() {
+ return bindLabel;
+ }
+
+ public void setBindLabel(String bindLabel) {
+ this.bindLabel = bindLabel;
+ }
+
+ public HtmlScrollableDataTable getMyScrollableDT() {
+ return myScrollableDT;
+ }
+
+ public void setMyScrollableDT(HtmlScrollableDataTable myScrollableDT) {
+ this.myScrollableDT = myScrollableDT;
+ }
+
+ public void checkBinding(ActionEvent actionEvent){
+ FacesContext context = FacesContext.getCurrentInstance();
+ bindLabel = myScrollableDT.getBaseClientId(context);
+ System.out.println("======Binding work=====" + bindLabel);
+ selection = myScrollableDT.getSelection();
+ System.out.println("======Selection work=====" + selection);
+ }
}
\ No newline at end of file
Modified:
branches/3.1.x/test-applications/facelets/src/main/webapp/ScrollableDataTable/ScrollableDataTable.xhtml
===================================================================
---
branches/3.1.x/test-applications/facelets/src/main/webapp/ScrollableDataTable/ScrollableDataTable.xhtml 2008-04-21
16:35:27 UTC (rev 8039)
+++
branches/3.1.x/test-applications/facelets/src/main/webapp/ScrollableDataTable/ScrollableDataTable.xhtml 2008-04-21
16:59:51 UTC (rev 8040)
@@ -12,7 +12,8 @@
timeout="#{scrollableDT.timeout}"
selection="#{scrollableDT.selection}"
oncomplete="showEvent('oncompleteInputID', 'oncomplete
work!')"
- onselectionchange="showEvent('onselectionchangeInputID',
'onselectionchange work!')">
+ onselectionchange="showEvent('onselectionchangeInputID',
'onselectionchange work!')"
+ binding="#{scrollableDT.myScrollableDT}" >
<f:facet name="header">
<h:outputText value="facet header"></h:outputText>
</f:facet>
Modified:
branches/3.1.x/test-applications/facelets/src/main/webapp/ScrollableDataTable/ScrollableDataTableProperty.xhtml
===================================================================
---
branches/3.1.x/test-applications/facelets/src/main/webapp/ScrollableDataTable/ScrollableDataTableProperty.xhtml 2008-04-21
16:35:27 UTC (rev 8039)
+++
branches/3.1.x/test-applications/facelets/src/main/webapp/ScrollableDataTable/ScrollableDataTableProperty.xhtml 2008-04-21
16:59:51 UTC (rev 8040)
@@ -1,52 +1,66 @@
-<f:subview
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"
id="scrollableDataTablePropertySubviewID">
- <h:panelGrid columns="2">
- <h:outputText value="length:"></h:outputText>
- <h:inputText value="#{scrollableDT.dataLength}"
onchange="submit();">
- </h:inputText>
-
- <h:outputText value="rows:" />
- <h:inputText value="#{scrollableDT.rows}"
onchange="submit();">
- </h:inputText>
-
- <h:outputText value="first:"></h:outputText>
- <h:inputText value="#{scrollableDT.first}"
onchange="submit();">
- </h:inputText>
-
- <h:outputText value="timeout"></h:outputText>
- <h:inputText value="#{scrollableDT.timeout}"
onchange="submit();">
- </h:inputText>
-
- <h:outputText value="width:" />
- <h:inputText value="#{scrollableDT.width}"
onchange="submit();">
- </h:inputText>
-
- <h:outputText value="height:"></h:outputText>
- <h:inputText value="#{scrollableDT.height}"
onchange="submit();">
- </h:inputText>
-
- <h:outputText value="frozenColCount"></h:outputText>
- <h:inputText value="#{scrollableDT.frozenColCount}"
onchange="submit();">
- </h:inputText>
-
- <h:outputText value="limitToList"></h:outputText>
- <h:selectBooleanCheckbox value="#{scrollableDT.limitToList}"
onchange="submit();">
- </h:selectBooleanCheckbox>
-
- <h:outputText value="bypassUpdates:"></h:outputText>
- <h:selectBooleanCheckbox value="#{scrollableDT.bypassUpdates}"
onchange="submit();">
- </h:selectBooleanCheckbox>
-
- <h:outputText value="ajaxSingle:"></h:outputText>
- <h:selectBooleanCheckbox value="#{scrollableDT.ajaxSingle}"
onchange="submit();"></h:selectBooleanCheckbox>
-
- <h:outputText value="rendered:"></h:outputText>
- <h:selectBooleanCheckbox value="#{scrollableDT.rendered}"
onchange="submit();">
- </h:selectBooleanCheckbox>
-
- <h:outputText value="hideWhenScrolling:" />
- <h:selectBooleanCheckbox value="#{scrollableDT.hideWhenScrolling}"
onchange="submit();">
- </h:selectBooleanCheckbox>
- </h:panelGrid>
- <a4j:commandButton value="reRender"
reRender="sdt"></a4j:commandButton>
+<f:subview
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"
+ id="scrollableDataTablePropertySubviewID">
+ <h:panelGrid columns="2">
+ <h:outputText value="length:"></h:outputText>
+ <h:inputText value="#{scrollableDT.dataLength}"
onchange="submit();">
+ </h:inputText>
+
+ <h:outputText value="rows:" />
+ <h:inputText value="#{scrollableDT.rows}"
onchange="submit();">
+ </h:inputText>
+
+ <h:outputText value="first:"></h:outputText>
+ <h:inputText value="#{scrollableDT.first}"
onchange="submit();">
+ </h:inputText>
+
+ <h:outputText value="timeout"></h:outputText>
+ <h:inputText value="#{scrollableDT.timeout}"
onchange="submit();">
+ </h:inputText>
+
+ <h:outputText value="width:" />
+ <h:inputText value="#{scrollableDT.width}"
onchange="submit();">
+ </h:inputText>
+
+ <h:outputText value="height:"></h:outputText>
+ <h:inputText value="#{scrollableDT.height}"
onchange="submit();">
+ </h:inputText>
+
+ <h:outputText value="frozenColCount"></h:outputText>
+ <h:inputText value="#{scrollableDT.frozenColCount}"
+ onchange="submit();">
+ </h:inputText>
+
+ <h:outputText value="limitToList"></h:outputText>
+ <h:selectBooleanCheckbox value="#{scrollableDT.limitToList}"
+ onchange="submit();">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="bypassUpdates:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{scrollableDT.bypassUpdates}"
+ onchange="submit();">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="ajaxSingle:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{scrollableDT.ajaxSingle}"
+ onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="rendered:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{scrollableDT.rendered}"
+ onchange="submit();">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="hideWhenScrolling:" />
+ <h:selectBooleanCheckbox value="#{scrollableDT.hideWhenScrolling}"
+ onchange="submit();">
+ </h:selectBooleanCheckbox>
+
+ <h:commandButton actionListener="#{scrollableDT.checkBinding}"
+ value="Binding" />
+ <h:outputText value="#{scrollableDT.bindLabel}" />
+ </h:panelGrid>
+ <a4j:commandButton value="reRender"
reRender="sdt"></a4j:commandButton>
</f:subview>
\ No newline at end of file