Author: ayanul
Date: 2007-10-02 10:20:35 -0400 (Tue, 02 Oct 2007)
New Revision: 3191
Modified:
trunk/test-applications/jsp/src/main/java/dfs/DemoSliderBean.java
trunk/test-applications/jsp/src/main/webapp/DataFilterSlider/DataFilterSlider.jsp
Log:
http://jira.jboss.com/jira/browse/RF-1044
Modified: trunk/test-applications/jsp/src/main/java/dfs/DemoSliderBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/dfs/DemoSliderBean.java 2007-10-02 14:20:28
UTC (rev 3190)
+++ trunk/test-applications/jsp/src/main/java/dfs/DemoSliderBean.java 2007-10-02 14:20:35
UTC (rev 3191)
@@ -28,36 +28,14 @@
* @author $Autor$
*
*/
-
-
-
public class DemoSliderBean {
- private boolean manualInput;
- private boolean onSlide;
- private boolean storeResults;
- private boolean trailer;
private boolean rendered;
- private String width;
- private int increment;
- private int handleValue;
- private int startRange;
- private int endRange;
-
DemoInventoryList demoInventoryList;
public DemoSliderBean() {
rendered = true;
- manualInput = true;
- onSlide = true;
- storeResults = true;
- width="400px";
- startRange = 10000;
- endRange = 60000;
- increment = 10000;
- trailer = true;
- handleValue = 10000;
}
-
+
public void setDemoInventoryList(DemoInventoryList demoInventoryList) {
this.demoInventoryList = demoInventoryList;
}
@@ -71,6 +49,18 @@
}
+ public void doRendered()
+ {
+ if(rendered)
+ rendered = false;
+ else rendered = true;
+ }
+
+ public String getRenderedName() {
+ if(rendered) return "Rendered on";
+ else return "Rendered off";
+ }
+
public boolean isRendered() {
return rendered;
}
@@ -78,5 +68,4 @@
public void setRendered(boolean rendered) {
this.rendered = rendered;
}
-
}
\ No newline at end of file
Modified:
trunk/test-applications/jsp/src/main/webapp/DataFilterSlider/DataFilterSlider.jsp
===================================================================
---
trunk/test-applications/jsp/src/main/webapp/DataFilterSlider/DataFilterSlider.jsp 2007-10-02
14:20:28 UTC (rev 3190)
+++
trunk/test-applications/jsp/src/main/webapp/DataFilterSlider/DataFilterSlider.jsp 2007-10-02
14:20:35 UTC (rev 3191)
@@ -47,28 +47,25 @@
<f:subview id="dfsID">
- <h:form>
+ <a4j:form id="form1" reRender="list-body"
ajaxSubmit="true"
+ ignoreDupResponses="true" requestDelay="100">
<a4j:region id="stat1">
- <a4j:outputPanel id="slider-body">
-
- <rich:dataFilterSlider sliderListener="#{dfs.doSlide}"
- rendered="#{dfs.rendered}"
+ <a4j:outputPanel id="p1">
+ <rich:dataFilterSlider sliderListener="#{dfs.doSlide}"
rendered="#{dfs.rendered}"
binding="#{inventoryList.dataFilterSlider}" for="carList"
forValRef="inventoryList.carInventory" filterBy="getMileage"
- manualInput="true" onSlide="true" storeResults="true"
- trackStyleClass="track" width="400px"
styleClass="slider-container"
- startRange="10000" endRange="60000" increment="10000"
- rangeStyleClass="range" trailer="true"
trailerStyleClass="trailer"
- handleStyleClass="handle" handleValue="10000"
id="slider_1">
+ manualInput="true" onSlide="true" onChange="true"
+ storeResults="true" trackStyleClass="track"
width="400px"
+ styleClass="slider-container" startRange="10000"
endRange="60000"
+ increment="10000" rangeStyleClass="range"
trailer="true"
+ trailerStyleClass="trailer" handleStyleClass="handle"
+ handleValue="10000" id="slider_1">
</rich:dataFilterSlider>
-
</a4j:outputPanel>
- <a4j:outputPanel id="list-body">
- <f:verbatim>
- </f:verbatim>
+ <a4j:outputPanel id="list-body" style="border: 1px">
<h:dataTable id="carIndex" rows="10"
binding="#{inventoryList.carMakeIndexUIData}"
value="#{inventoryList.carMakeIndex}" var="category"
@@ -90,19 +87,20 @@
value="#{inventoryList.carInventory}" var="category"
rowClasses="list-row1, list-row2" columnClasses="column"
headerClass="list-header" styleClass="list-table2">
-
<h:column>
<f:facet name="header">
<h:outputText styleClass="headerText" value="Make" />
</f:facet>
<h:outputText value="#{category.make}" />
</h:column>
+
<h:column>
<f:facet name="header">
<h:outputText styleClass="headerText" value="Model" />
</f:facet>
<h:outputText value="#{category.model}" />
</h:column>
+
<h:column>
<f:facet name="header">
<h:outputText styleClass="headerText"
@@ -110,6 +108,7 @@
</f:facet>
<h:outputText value="#{category.price}" />
</h:column>
+
<h:column>
<f:facet name="header">
<h:outputText styleClass="headerText"
@@ -120,14 +119,13 @@
</h:dataTable>
</a4j:outputPanel>
</a4j:region>
-
<h:panelGrid columns="2">
- <h:outputText value="Rendered" />
- <h:selectBooleanCheckbox value="#{dfs.rendered}"
onclick="submit();" />
- </h:panelGrid>
+ <h:outputText value="Rendered:" />
+ <h:selectBooleanCheckbox value="#{dfs.rendered}" >
+ <a4j:support event="onclick"
reRender="p1"></a4j:support>
+ </h:selectBooleanCheckbox>
+ </h:panelGrid>
+ </a4j:form>
- <h:commandLink value="Back"
action="main"></h:commandLink>
- </h:form>
-
</f:subview>