Author: mvitenkov
Date: 2008-11-28 08:48:57 -0500 (Fri, 28 Nov 2008)
New Revision: 11433
Modified:
trunk/test-applications/facelets/src/main/java/dataScroller/DataScroller.java
trunk/test-applications/facelets/src/main/java/queue/Queue.java
trunk/test-applications/facelets/src/main/webapp/CustomizePage/CustomizePage.xhtml
trunk/test-applications/facelets/src/main/webapp/Queue/Queue.xhtml
trunk/test-applications/facelets/src/main/webapp/Queue/QueueProperty.xhtml
Log:
Queue correction
Modified: trunk/test-applications/facelets/src/main/java/dataScroller/DataScroller.java
===================================================================
---
trunk/test-applications/facelets/src/main/java/dataScroller/DataScroller.java 2008-11-28
13:30:10 UTC (rev 11432)
+++
trunk/test-applications/facelets/src/main/java/dataScroller/DataScroller.java 2008-11-28
13:48:57 UTC (rev 11433)
@@ -1,7 +1,6 @@
package dataScroller;
import java.util.ArrayList;
-import java.util.Random;
import javax.faces.event.ActionEvent;
Modified: trunk/test-applications/facelets/src/main/java/queue/Queue.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/queue/Queue.java 2008-11-28 13:30:10
UTC (rev 11432)
+++ trunk/test-applications/facelets/src/main/java/queue/Queue.java 2008-11-28 13:48:57
UTC (rev 11433)
@@ -1,5 +1,9 @@
package queue;
+import java.util.ArrayList;
+
+import javax.faces.model.SelectItem;
+
import org.ajax4jsf.component.UIQueue;
import util.componentInfo.ComponentInfo;
@@ -13,7 +17,16 @@
private int size;
private String sizeExceededBehavior;
private int timeout;
+ private ArrayList<SelectItem> behaviors;
+ public ArrayList<SelectItem> getBehaviors() {
+ return behaviors;
+ }
+
+ public void setBehaviors(ArrayList<SelectItem> behaviors) {
+ this.behaviors = behaviors;
+ }
+
public Queue(){
this.disabled = false;
this.ignoreDupResponses = false;
@@ -23,6 +36,12 @@
this.size = 3;
this.sizeExceededBehavior = "dropNext";
this.timeout = 5000;
+
+ behaviors = new ArrayList<SelectItem>();
+ String[] sizeExceededBehaviors = {"dropNext", "dropNew",
"fireNext", "fireNew"};
+ for(int i=0; i<sizeExceededBehaviors.length; i++){
+ behaviors.add(new SelectItem(sizeExceededBehaviors[i], sizeExceededBehaviors[i]));
+ }
}
public String addQueue(){
Modified:
trunk/test-applications/facelets/src/main/webapp/CustomizePage/CustomizePage.xhtml
===================================================================
---
trunk/test-applications/facelets/src/main/webapp/CustomizePage/CustomizePage.xhtml 2008-11-28
13:30:10 UTC (rev 11432)
+++
trunk/test-applications/facelets/src/main/webapp/CustomizePage/CustomizePage.xhtml 2008-11-28
13:48:57 UTC (rev 11433)
@@ -5,16 +5,70 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
+ <meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8" />
<body>
<f:view>
- <rich:modalPanel minHeight="100" minWidth="100"
resizeable="true"
- moveable="true" keepVisualState="false"
showWhenRendered="true"
- width="200" height="200">
- <f:facet name="header">
- <h:outputText value="MP Header" />
- </f:facet>
+ <rich:modalPanel id="mpID" showWhenRendered="true">
<h:form>
- <h:commandButton value="submit"/>
+ <f:facet name="header">
+ <h:outputText value="Modal Panel Header" />
+ </f:facet>
+
+ <f:facet name="controls">
+ <h:graphicImage value="/pics/error.gif"
+ onclick="Richfaces.hideModalPanel('mpID'); return false;" />
+ </f:facet>
+
+ <h:inputText value="#{sb.property}" id="text">
+ <f:validateLength minimum="0" maximum="30" />
+ </h:inputText>
+ <rich:suggestionbox id="suggestionBoxId"
+ ajaxSingle="#{sb.ajaxSingle}" bgcolor="#{sb.bgColor}"
+ binding="#{sb.mySuggestionBox}"
bypassUpdates="#{sb.bypassUpdates}"
+ cellpadding="#{sb.cellpadding}" cellspacing="#{sb.cellspacing}"
+ dir="#{sb.dir}" entryClass="#{style.entryClass}"
+ eventsQueue="myEventsQueue" fetchValue="#{result.text}"
+ first="#{sb.first}" for="text" frame="#{sb.frame}"
+ frequency="#{sb.frequency}" height="#{sb.height}"
+ ignoreDupResponses="#{sb.ignoreDupResponses}"
+ immediate="#{sb.immediate}" limitToList="false"
+ minChars="#{sb.minchars}" nothingLabel="#{sb.nothingLabel}"
+ onbeforedomupdate="#{event.onbeforedomupdate}"
+ oncomplete="#{event.oncomplete}"
+ onobjectchange="#{event.onobjectchange}"
+ onselect="#{event.onselect}" onsubmit="#{event.onsubmit}"
+ popupStyle="background-color: black;"
+ usingSuggestObjects="#{sb.usingSuggestObjects}"
reRender="label"
+ rendered="#{sb.rendered}" requestDelay="#{sb.requestDelay}"
+ selfRendered="#{sb.selfRendered}" var="result"
+ suggestionAction="#{sb.autocomplete}" width="#{sb.width}"
+ border="#{sb.border}" zindex="#{sb.zindex}"
rules="#{sb.rules}"
+ tokens="#{sb.tokens}" title="#{result.text}"
summary="summary"
+ shadowOpacity="#{sb.shadowOpacity}"
shadowDepth="#{sb.shadowDepth}"
+ selectValueClass="mousemove" style="#{style.style}"
+ styleClass="#{style.styleClass}"
+ selectedClass="#{style.selectedClass}"
+ rowClasses="#{style.rowClasses}">
+
+ <h:column>
+ <h:outputText value="#{result.city}" />
+ </h:column>
+ <h:column>
+ <h:outputText value="#{result.contry}" />
+ </h:column>
+ <h:column>
+ <h:outputText value="#{result.flag}" />
+ </h:column>
+ <h:column>
+ <a4j:htmlCommandLink actionListener="#{sb.selectValue}"
+ value="Click me!" />
+ </h:column>
+ </rich:suggestionbox>
+ <br/>
+ <h:outputLink
+ onclick="Richfaces.hideModalPanel('modalPanelID');return
false;">
+ <f:verbatim>Close</f:verbatim>
+ </h:outputLink>
</h:form>
</rich:modalPanel>
</f:view>
Modified: trunk/test-applications/facelets/src/main/webapp/Queue/Queue.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Queue/Queue.xhtml 2008-11-28 13:30:10
UTC (rev 11432)
+++ trunk/test-applications/facelets/src/main/webapp/Queue/Queue.xhtml 2008-11-28 13:48:57
UTC (rev 11433)
@@ -9,7 +9,7 @@
onbeforedomupdate="#{event.onbeforedomupdate}"
oncomplete="#{event.oncomplete}" onerror="#{event.onerror}"
onsizeexceeded="#{event.onsizeexceeded}"
onsubmit="#{event.onsubmit}"
- rendered="#{queue.rendered}" requestDelay="#{queue.requestDelay}"
+ requestDelay="#{queue.requestDelay}"
size="#{queue.size}"
sizeExceededBehavior="#{queue.sizeExceededBehavior}"
timeout="#{queue.timeout}" />
Modified: trunk/test-applications/facelets/src/main/webapp/Queue/QueueProperty.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Queue/QueueProperty.xhtml 2008-11-28
13:30:10 UTC (rev 11432)
+++ trunk/test-applications/facelets/src/main/webapp/Queue/QueueProperty.xhtml 2008-11-28
13:48:57 UTC (rev 11433)
@@ -3,20 +3,16 @@
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
id="queuePropertySubviewID">
-
- <h:commandButton value="add test"
- action="#{queue.addQueue}"></h:commandButton>
+
+ <h:commandButton value="add test"
action="#{queue.addQueue}"></h:commandButton>
<h:panelGrid columns="2">
<h:outputText value="disabled" />
<h:selectBooleanCheckbox value="#{queue.disabled}"
onclick="submit()" />
<h:outputText value="ignoreDupResponses" />
<h:selectBooleanCheckbox value="#{queue.ignoreDupResponses}"
- onclick="submit()" />
+ onclick="submit()" />
- <h:outputText value="rendered" />
- <h:selectBooleanCheckbox value="#{queue.rendered}"
onclick="submit()" />
-
<h:outputText value="requestDelay" />
<h:inputText value="#{queue.requestDelay}">
<a4j:support event="onchange"
reRender="queueID"></a4j:support>
@@ -27,14 +23,19 @@
<a4j:support event="onchange"
reRender="queueID"></a4j:support>
</h:inputText>
- <h:outputText value="sizeExceededBehavior" />
- <h:panelGroup>
- <h:inputText value="#{queue.sizeExceededBehavior}"
- id="sizeExceededBehaviorID">
- <a4j:support event="onchange"
reRender="queueID"></a4j:support>
- </h:inputText>
- <h:outputLabel value="dropNext, dropNew, fireNext, fireNew"
for="sizeExceededBehaviorID" />
- </h:panelGroup>
+ <h:outputText value="sizeExceededBehavior" />
+ <h:selectOneRadio value="#{queue.sizeExceededBehavior}"
+ onchange="submit();">
+ <f:selectItem itemLabel="dropNext" itemValue="dropNext"/>
+ <f:selectItem itemLabel="dropNew" itemValue="dropNew"/>
+ <f:selectItem itemLabel="fireNext" itemValue="fireNext"/>
+ <f:selectItem itemLabel="fireNew" itemValue="fireNew"/>
+ </h:selectOneRadio>
+
+ <h:outputText value="timeout" />
+ <h:inputText value="#{queue.timeout}">
+ <a4j:support event="onchange"
reRender="queueID"></a4j:support>
+ </h:inputText>
</h:panelGrid>
</f:subview>
\ No newline at end of file