Author: mvitenkov
Date: 2008-11-25 11:02:38 -0500 (Tue, 25 Nov 2008)
New Revision: 11367
Added:
trunk/test-applications/facelets/src/main/java/queue/
trunk/test-applications/facelets/src/main/java/queue/Queue.java
trunk/test-applications/facelets/src/main/java/queue/QueueComponent.java
trunk/test-applications/facelets/src/main/java/util/parser/
trunk/test-applications/facelets/src/main/java/util/parser/Attribute.java
trunk/test-applications/facelets/src/main/java/util/parser/AttributesList.java
trunk/test-applications/facelets/src/main/java/util/parser/TLDParser.java
trunk/test-applications/facelets/src/main/webapp/Queue/
trunk/test-applications/facelets/src/main/webapp/Queue/Queue.xhtml
trunk/test-applications/facelets/src/main/webapp/Queue/QueueDefault.xhtml
trunk/test-applications/facelets/src/main/webapp/Queue/QueueProperty.xhtml
trunk/test-applications/facelets/src/main/webapp/Queue/QueueStraightforward.xhtml
trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-Queue.xml
Modified:
trunk/test-applications/facelets/src/main/java/dataScroller/DataScroller.java
trunk/test-applications/facelets/src/main/java/rich/RichBean.java
trunk/test-applications/facelets/src/main/java/util/componentInfo/ComponentInfo.java
trunk/test-applications/facelets/src/main/java/util/event/Event.java
trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml
trunk/test-applications/facelets/src/main/webapp/pages/Rich/Rich.xhtml
Log:
add a4j:queue
Modified: trunk/test-applications/facelets/src/main/java/dataScroller/DataScroller.java
===================================================================
---
trunk/test-applications/facelets/src/main/java/dataScroller/DataScroller.java 2008-11-25
15:54:23 UTC (rev 11366)
+++
trunk/test-applications/facelets/src/main/java/dataScroller/DataScroller.java 2008-11-25
16:02:38 UTC (rev 11367)
@@ -1,6 +1,7 @@
package dataScroller;
import java.util.ArrayList;
+import java.util.Random;
import javax.faces.event.ActionEvent;
@@ -9,6 +10,7 @@
import org.richfaces.model.Ordering;
import util.componentInfo.ComponentInfo;
+import util.data.Data;
public class DataScroller {
@@ -23,25 +25,32 @@
public int maxPages;
private String action;
private String actionListener;
+ private boolean ajaxSingle = false;
+ private String boundaryControls = "auto";
+ private HtmlDatascroller htmlDatascroller= null;
+ private String fastStep = "0";
+ private String page = "10";
+ private Object value = null;
+ private String stepControls = "auto";
private String sortMode;
private boolean selfSorted;
private Ordering sortOrder;
private String filterValue;
private String currentSortOrder;
- private HtmlDatascroller htmlDataScroller = null;
- public HtmlDatascroller getHtmlDataScroller() {
- return htmlDataScroller;
+ public HtmlDatascroller getHtmlDatascroller(){
+ return htmlDatascroller;
}
-
- public void setHtmlDataScroller(HtmlDatascroller htmlDataScroller) {
- this.htmlDataScroller = htmlDataScroller;
+
+ public void setHtmlDatascroller(HtmlDatascroller htmlDatascroller){
+ this.htmlDatascroller = htmlDatascroller;
}
- public String add(){
+
+ public void addHtmlDatascroller(){
ComponentInfo info = ComponentInfo.getInstance();
- info.addField(htmlDataScroller);
- return null;
+ info.addField(htmlDatascroller);
}
+
public String getSortMode() {
return sortMode;
}
@@ -58,14 +67,6 @@
this.selfSorted = selfSorted;
}
- public Ordering getSortOrder() {
- return sortOrder;
- }
-
- public void setSortOrder(Ordering sortOrder) {
- this.sortOrder = sortOrder;
- }
-
public String getFilterValue() {
return filterValue;
}
@@ -74,17 +75,14 @@
this.filterValue = filterValue;
}
+ public Ordering getSortOrder() {
+ return sortOrder;
+ }
+
public String getCurrentSortOrder() {
return currentSortOrder;
}
- public void setCurrentSortOrder(String currentSortOrder) {
- if("DESCENDING".equals(currentSortOrder)) this.sortOrder =
Ordering.DESCENDING;
- else if("UNSORTED".equals(currentSortOrder)) this.sortOrder =
Ordering.UNSORTED;
- else if("ASCENDING".equals(currentSortOrder)) this.sortOrder =
Ordering.ASCENDING;
- this.currentSortOrder = currentSortOrder;
- }
-
public String act() {
action = "action work!";
return null;
@@ -136,20 +134,29 @@
align = "left";
maxPages = 20;
limitToList = false;
+
filterValue = "";
+ sortMode = "single";
+ sortOrder = Ordering.ASCENDING;
selfSorted = true;
- sortOrder = Ordering.ASCENDING;
- sortMode = "single";
- currentSortOrder = "ASCENDING";
+ currentSortOrder = "ASCENDING";
dataTable = new ArrayList();
for(int i=0;i<1000;i++)
{
- dataTable.add(new Data("Random",i));
+
+ dataTable.add(new Data(Data.Random(6),i));
}
}
+ public void setCurrentSortOrder(String currentSortOrder) {
+ if("DESCENDING".equals(currentSortOrder)) this.sortOrder =
Ordering.DESCENDING;
+ else if("UNSORTED".equals(currentSortOrder)) this.sortOrder =
Ordering.UNSORTED;
+ else if("ASCENDING".equals(currentSortOrder)) this.sortOrder =
Ordering.ASCENDING;
+ this.currentSortOrder = currentSortOrder;
+ }
+
public void CutArray(){
int k = dataTable.size()-1;
for(int i = k ;i > (k+1)/2; i--)
@@ -260,4 +267,92 @@
setMaxPages(40);
setRenderIfSinglePage(true);
}
+
+ /**
+ * @return the ajaxSingle
+ */
+ public boolean isAjaxSingle() {
+ return ajaxSingle;
+ }
+
+ /**
+ * @param ajaxSingle the ajaxSingle to set
+ */
+ public void setAjaxSingle(boolean ajaxSingle) {
+ this.ajaxSingle = ajaxSingle;
+ }
+
+ /**
+ * @return the boundaryControls
+ */
+ public String getBoundaryControls() {
+ return boundaryControls;
+ }
+
+ /**
+ * @param boundaryControls the boundaryControls to set
+ */
+ public void setBoundaryControls(String boundaryControls) {
+ this.boundaryControls = boundaryControls;
+ }
+
+ /**
+ * @return the fastStep
+ */
+ public String getFastStep() {
+ return fastStep;
+ }
+
+ /**
+ * @param fastStep the fastStep to set
+ */
+ public void setFastStep(String fastStep) {
+ this.fastStep = fastStep;
+ }
+
+ /**
+ * @return the page
+ */
+ public String getPage() {
+ return page;
+ }
+
+ /**
+ * @param page the page to set
+ */
+ public void setPage(String page) {
+ this.page = page;
+ }
+
+ /**
+ * @return the value
+ */
+ public Object getValue() {
+ return value;
+ }
+
+ /**
+ * @param value the value to set
+ */
+ public void setValue(Object value) {
+ this.value = value;
+ }
+
+ /**
+ * @return the stepControls
+ */
+ public String getStepControls() {
+ return stepControls;
+ }
+
+ /**
+ * @param stepControls the stepControls to set
+ */
+ public void setStepControls(String stepControls) {
+ this.stepControls = stepControls;
+ }
+
+ public void setSortOrder(Ordering sortOrder) {
+ this.sortOrder = sortOrder;
+ }
}
Added: trunk/test-applications/facelets/src/main/java/queue/Queue.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/queue/Queue.java
(rev 0)
+++ trunk/test-applications/facelets/src/main/java/queue/Queue.java 2008-11-25 16:02:38
UTC (rev 11367)
@@ -0,0 +1,88 @@
+package queue;
+
+import org.ajax4jsf.component.UIQueue;
+
+import util.componentInfo.ComponentInfo;
+public class Queue {
+ private UIQueue myQueue = null;
+ private boolean disabled;
+ private boolean ignoreDupResponses;
+ private String name;
+ private boolean rendered;
+ private int requestDelay;
+ private int size;
+ private String sizeExceededBehavior;
+ private int timeout;
+
+ public Queue(){
+ this.disabled = false;
+ this.ignoreDupResponses = false;
+ this.name = "DefaultQueue";
+ this.rendered = true;
+ this.requestDelay = 500;
+ this.size = 3;
+ this.sizeExceededBehavior = "dropNext";
+ this.timeout = 5000;
+ }
+
+ public String addQueue(){
+ ComponentInfo info = ComponentInfo.getInstance();
+ info.addField(myQueue);
+ return null;
+ }
+
+ public UIQueue getMyQueue() {
+ return myQueue;
+ }
+ public void setMyQueue(UIQueue myQueue) {
+ this.myQueue = myQueue;
+ }
+ public boolean isDisabled() {
+ return disabled;
+ }
+ public void setDisabled(boolean disabled) {
+ this.disabled = disabled;
+ }
+ public boolean isIgnoreDupResponses() {
+ return ignoreDupResponses;
+ }
+ public void setIgnoreDupResponses(boolean ignoreDupResponses) {
+ this.ignoreDupResponses = ignoreDupResponses;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public boolean isRendered() {
+ return rendered;
+ }
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+ public int getRequestDelay() {
+ return requestDelay;
+ }
+ public void setRequestDelay(int requestDelay) {
+ this.requestDelay = requestDelay;
+ }
+ public int getSize() {
+ return size;
+ }
+ public void setSize(int size) {
+ this.size = size;
+ }
+ public String getSizeExceededBehavior() {
+ return sizeExceededBehavior;
+ }
+ public void setSizeExceededBehavior(String sizeExceededBehavior) {
+ this.sizeExceededBehavior = sizeExceededBehavior;
+ }
+ public int getTimeout() {
+ return timeout;
+ }
+ public void setTimeout(int timeout) {
+ this.timeout = timeout;
+ }
+}
Added: trunk/test-applications/facelets/src/main/java/queue/QueueComponent.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/queue/QueueComponent.java
(rev 0)
+++ trunk/test-applications/facelets/src/main/java/queue/QueueComponent.java 2008-11-25
16:02:38 UTC (rev 11367)
@@ -0,0 +1,176 @@
+package queue;
+
+import java.util.ArrayList;
+import java.util.Date;
+
+import javax.faces.model.SelectItem;
+
+public class QueueComponent {
+ private String inputValue;
+ private String inputQueue;
+ private ArrayList<SelectItem> queues;
+ private Date calendarValue;
+ private String calendarQueue;
+ private boolean checkboxValue;
+ private String checkboxQueue;
+ private String dfsQueue;
+ private Object dataScrollerValue;
+ private String dataScrollerQueue;
+ private String radioValue;
+ private String radioQueue;
+ private String selectMenuValue;
+ private String selectMenuQueue;
+ private String suggestionValue;
+ private String suggestionQueue;
+
+ public String getSuggestionValue() {
+ return suggestionValue;
+ }
+
+ public void setSuggestionValue(String suggestionValue) {
+ this.suggestionValue = suggestionValue;
+ }
+
+ public String getSuggestionQueue() {
+ return suggestionQueue;
+ }
+
+ public void setSuggestionQueue(String suggestionQueue) {
+ this.suggestionQueue = suggestionQueue;
+ }
+
+ public String getSelectMenuValue() {
+ return selectMenuValue;
+ }
+
+ public void setSelectMenuValue(String selectMenuValue) {
+ this.selectMenuValue = selectMenuValue;
+ }
+
+ public String getSelectMenuQueue() {
+ return selectMenuQueue;
+ }
+
+ public void setSelectMenuQueue(String selectMenuQueue) {
+ this.selectMenuQueue = selectMenuQueue;
+ }
+
+ public String getRadioValue() {
+ return radioValue;
+ }
+
+ public void setRadioValue(String radioValue) {
+ this.radioValue = radioValue;
+ }
+
+ public String getRadioQueue() {
+ return radioQueue;
+ }
+
+ public void setRadioQueue(String radioQueue) {
+ this.radioQueue = radioQueue;
+ }
+
+ public Object getDataScrollerValue() {
+ return dataScrollerValue;
+ }
+
+ public void setDataScrollerValue(Object dataScrollerValue) {
+ this.dataScrollerValue = dataScrollerValue;
+ }
+
+ public String getDataScrollerQueue() {
+ return dataScrollerQueue;
+ }
+
+ public void setDataScrollerQueue(String dataScrollerQueue) {
+ this.dataScrollerQueue = dataScrollerQueue;
+ }
+
+ public String getDfsQueue() {
+ return dfsQueue;
+ }
+
+ public void setDfsQueue(String dfsQueue) {
+ this.dfsQueue = dfsQueue;
+ }
+
+ public boolean isCheckboxValue() {
+ return checkboxValue;
+ }
+
+ public void setCheckboxValue(boolean checkboxValue) {
+ this.checkboxValue = checkboxValue;
+ }
+
+ public String getCheckboxQueue() {
+ return checkboxQueue;
+ }
+
+ public void setCheckboxQueue(String checkboxQueue) {
+ this.checkboxQueue = checkboxQueue;
+ }
+
+ public Date getCalendarValue() {
+ return calendarValue;
+ }
+
+ public void setCalendarValue(Date calendarValue) {
+ this.calendarValue = calendarValue;
+ }
+
+ public String getCalendarQueue() {
+ return calendarQueue;
+ }
+
+ public void setCalendarQueue(String calendarQueue) {
+ this.calendarQueue = calendarQueue;
+ }
+
+ public QueueComponent(){
+ this.inputValue = "";
+ this.inputQueue = "org.richfaces.global_queue";
+ this.calendarValue = new Date();
+ this.calendarQueue = "namedQueue";
+ this.checkboxValue = false;
+ this.checkboxQueue = "formQueue";
+ this.dataScrollerValue = null;
+ this.dataScrollerQueue = "default";
+ this.radioValue = "org.richfaces.global_queue";
+ this.radioQueue = "org.richfaces.global_queue";
+ this.dfsQueue = "namedQueue";
+ this.selectMenuValue = "apple";
+ this.selectMenuQueue = "formQueue";
+ this.suggestionValue = "";
+ this.suggestionQueue = "default";
+ String[] qu = {"org.richfaces.global_queue", "namedQueue",
"formQueue", "default"};
+ queues = new ArrayList<SelectItem>();
+ for(int i=0; i<qu.length; i++){
+ queues.add(new SelectItem(qu[i], qu[i]));
+ }
+ }
+
+ public String getInputQueue() {
+ return inputQueue;
+ }
+
+ public void setInputQueue(String inputQueue) {
+ this.inputQueue = inputQueue;
+ }
+
+ public String getInputValue() {
+ return inputValue;
+ }
+
+ public void setInputValue(String inputValue) {
+ this.inputValue = inputValue;
+ }
+
+ public ArrayList<SelectItem> getQueues() {
+ return queues;
+ }
+
+ public void setQueues(ArrayList<SelectItem> queues) {
+ this.queues = queues;
+ }
+}
Modified: trunk/test-applications/facelets/src/main/java/rich/RichBean.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/rich/RichBean.java 2008-11-25 15:54:23
UTC (rev 11366)
+++ trunk/test-applications/facelets/src/main/java/rich/RichBean.java 2008-11-25 16:02:38
UTC (rev 11367)
@@ -75,6 +75,7 @@
map.add("DataGrid", add("/DataGrid/DataGrid", new boolean []
{false, true, false}));
map.add("ExtendedDataTable",
add("/ExtendedDataTable/ExtendedDataTable", new boolean [] {false, true,
false}));
map.add("Editor", add("/Editor/Editor", new boolean [] {true, true,
false}));
+ map.add("Queue", add("/Queue/Queue", new boolean [] {false, true,
true}));
Iterator<String> iterator = map.getSet().iterator();
while(iterator.hasNext()){
list.add(new SelectItem(iterator.next()));
Modified:
trunk/test-applications/facelets/src/main/java/util/componentInfo/ComponentInfo.java
===================================================================
---
trunk/test-applications/facelets/src/main/java/util/componentInfo/ComponentInfo.java 2008-11-25
15:54:23 UTC (rev 11366)
+++
trunk/test-applications/facelets/src/main/java/util/componentInfo/ComponentInfo.java 2008-11-25
16:02:38 UTC (rev 11367)
@@ -5,19 +5,15 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-import javax.el.ELContext;
import javax.el.ValueExpression;
-import javax.faces.component.UIComponent;
import javax.faces.component.UIComponentBase;
import javax.faces.context.FacesContext;
+import util.parser.Attribute;
+import util.parser.AttributesList;
+import util.parser.TLDParser;
+
public class ComponentInfo {
private static volatile ComponentInfo INSTANCE;
private ComponentAttribute componentAttribute = new ComponentAttribute();
@@ -27,7 +23,7 @@
private String attribute;
private String property;
private boolean print;
-
+
public ComponentInfo(String beanName) {
this.beanName = beanName;
this.attribute = "";
@@ -35,15 +31,6 @@
print = true;
}
- protected ComponentInfo() {
- }
-
- public String getName() {
- if (component == null)
- return null;
- return component.getClass().getName();
- }
-
public void setComponentInfo(String attribute, String property) {
this.attribute = attribute;
this.property = property;
@@ -51,6 +38,16 @@
if(print) printInfo();
}
+ public void setComponentInfo(String attribute, String property, String description) {
+ this.attribute = attribute;
+ this.property = property;
+ this.description = description;
+ if(print) printInfo();
+ }
+
+ protected ComponentInfo() {
+ }
+
public static ComponentInfo getInstance() {
if (INSTANCE == null)
synchronized (ComponentInfo.class) {
@@ -59,81 +56,78 @@
}
return INSTANCE;
}
-
- public void setComponentInfo(String attribute, String property, String description) {
- this.attribute = attribute;
- this.property = property;
- this.description = description;
- if(print) printInfo();
+
+ public String getName() {
+ if (component == null)
+ return null;
+ return component.getClass().getName();
}
-
- public static String toString(Object obj) {
- Class cl = obj.getClass();
- String r = cl.getName() + "[";
- Class sc = cl.getSuperclass();
- if (!sc.equals(Object.class))
- r += sc + ",";
- Field[] fields = cl.getDeclaredFields();
- try {
- AccessibleObject.setAccessible(fields, true);
- } catch (SecurityException e) {
- }
- for (int i = 0; i < fields.length; i++) {
- Field f = fields[i];
- r += f.getName() + "=";
- try {
- Object val = f.get(obj);
- r += val.toString();
- } catch (IllegalAccessException e) {
- r += "???";
- }
- if (i < fields.length - 1)
- r += ",";
- else
- r += "]";
- }
- return r;
- }
-
+
public void addField(Object component) {
if (component == null)
return;
- this.component = component;
+ this.component = component;
- //if(ve.isLiteralText()) {ve.getExpressionString()} {ve.getValue(). }
-
componentAttribute.cleanAll();
String str = null;
Field[] fields = component.getClass().getDeclaredFields();
+
+ String richName = null;
+ boolean isAjax = false;
+ if(component.getClass().getName().startsWith("org.richfaces.component.html.Html")){
+ richName =
component.getClass().getName().substring("org.richfaces.component.html.Html".length());
+ richName = richName.substring(0, 1).toLowerCase() + richName.substring(1,
richName.length());
+ } else
if(component.getClass().getName().startsWith("org.richfaces.component.UI")){
+ richName =
component.getClass().getName().substring("org.richfaces.component.UI".length());
+ richName = richName.substring(0, 1).toLowerCase() + richName.substring(1,
richName.length());
+ }else if(isAjax =
component.getClass().getName().startsWith("org.ajax4jsf.component.html.Html")){
+ richName =
component.getClass().getName().substring("org.ajax4jsf.component.html.Html".length());
+ richName = richName.substring(0, 1).toLowerCase() + richName.substring(1,
richName.length());
+ }else {
+ try {
+ throw new Exception("Unknown class for component!!!Component class:" +
component.getClass().getName());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ TLDParser parser = new TLDParser(richName);
+ AttributesList allAttributes = parser.getAllAttributes();
+ for(Attribute s:allAttributes){
+ System.out.println(s.toString());
+ }
+
+ System.out.println("----------HANDLERS----------");
+ for(Attribute attr:allAttributes.getHandlers()){
+ System.out.println(attr.getName());
+ }
+
AccessibleObject.setAccessible(fields, true);
for (Field field : fields) {
- if (!Modifier.isStatic(field.getModifiers())) {
- str = field.getName().substring(1);
+ str = field.getName().substring(1);
+ if (!Modifier.isStatic(field.getModifiers()) &&
(allAttributes.getNamesArray().contains(str) || isAjax)) {
if (str.startsWith("on")) {
componentAttribute.putEvent(str,
"");
} else if (str.indexOf("tyle") != -1 || str.indexOf("lass") !=
-1) {
- try {
- //Object obj = field.get(component);
+ try {
UIComponentBase comp = (UIComponentBase) component;
ValueExpression ve = comp.getValueExpression(str);
if(ve != null){
if(ve.isLiteralText()){
- componentAttribute.putStyle(str, ve == null ? "null" :
ve.getExpressionString());
+ componentAttribute.putStyle(str, ve.getExpressionString());
} else{
- componentAttribute.putStyle(str, ve == null ? "null" :
ve.getValue(FacesContext.getCurrentInstance().getELContext()).toString());
+ componentAttribute.putStyle(str,
ve.getValue(FacesContext.getCurrentInstance().getELContext()).toString());
}
- }
+ } else componentAttribute.putStyle(str, "null");
- } catch (IllegalArgumentException e) {
- // TODO Auto-generated catch block
+ } catch (IllegalArgumentException e) {
e.printStackTrace();
}
} else {
try {
- Class cl = field.getType();
+ Class cl = field.getType();
if(cl.isPrimitive() || cl.getName().equals("java.lang.String")){
UIComponentBase comp = (UIComponentBase) component;
ValueExpression ve = comp.getValueExpression(str);
@@ -143,9 +137,7 @@
} else{
componentAttribute.putAttribute(str,
ve.getValue(FacesContext.getCurrentInstance().getELContext()).toString());
}
- }
-// Object obj = field.get(component);
-// componentAttribute.putAttribute(str, obj == null ? "null" :
obj.toString());
+ }else componentAttribute.putAttribute(str, "null");
} else componentAttribute.putAttribute(str, "---");
} catch (IllegalArgumentException e) {
e.printStackTrace();
@@ -156,31 +148,87 @@
}
- public boolean isPrint() {
- return print;
+ public static String toString(Object obj) {
+ Class cl = obj.getClass();
+ String r = cl.getName() + "[";
+ Class sc = cl.getSuperclass();
+ if (!sc.equals(Object.class))
+ r += sc + ",";
+ Field[] fields = cl.getDeclaredFields();
+ try {
+ AccessibleObject.setAccessible(fields, true);
+ } catch (SecurityException e) {
+ }
+ for (int i = 0; i < fields.length; i++) {
+ Field f = fields[i];
+ r += f.getName() + "=";
+ try {
+ Object val = f.get(obj);
+ r += val.toString();
+ } catch (IllegalAccessException e) {
+ r += "???";
+ }
+ if (i < fields.length - 1)
+ r += ",";
+ else
+ r += "]";
+ }
+ return r;
}
-
- public void setPrint(boolean print) {
- this.print = print;
+
+ public Object invoke(String aMethod, Class[] params, Object[] args) {
+ Method m;
+ System.out.println("ComponentInfo.invoke()");
+ if (component == null) return null;
+ try {
+ m = component.getClass().getDeclaredMethod(aMethod, params);
+ Object obj = m.invoke(component, args);
+ return obj;
+ } catch (SecurityException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ } catch (IllegalArgumentException e) {
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ }
+ finally {
+ return "";
+ }
}
-
+
+ private void printInfo() {
+ System.out.println("beanName: " + beanName + "[attribute: " +
attribute + "; property: " + property + "; description: " +
description + "];");
+ }
+
public String [] getComponentInfo() {
String [] str = {attribute, property};
return str;
}
- public String getAttribute() {
- return attribute;
+ public ComponentAttribute getComponentAttribute() {
+ return componentAttribute;
}
- public String getProperty() {
- return property;
+ public Object getComponent() {
+ return component;
}
-
- private void printInfo() {
- System.out.println("beanName: " + beanName + "[attribute: " +
attribute + "; property: " + property + "; description: " +
description + "];");
+
+ public void setComponent(Object component) {
+ this.component = component;
}
+ public String getBeanName() {
+ return beanName;
+ }
+
+ public void setBeanName(String beanName) {
+ this.beanName = beanName;
+ }
+
public String getDescription() {
return description;
}
@@ -189,18 +237,30 @@
this.description = description;
}
- public Object getComponent() {
- return component;
+ public String getAttribute() {
+ return attribute;
}
- public void setComponent(Object component) {
- this.component = component;
+ public void setAttribute(String attribute) {
+ this.attribute = attribute;
}
- public ComponentAttribute getComponentAttribute() {
- return componentAttribute;
+ public String getProperty() {
+ return property;
}
+ public void setProperty(String property) {
+ this.property = property;
+ }
+
+ public boolean isPrint() {
+ return print;
+ }
+
+ public void setPrint(boolean print) {
+ this.print = print;
+ }
+
public void setComponentAttribute(ComponentAttribute componentAttribute) {
this.componentAttribute = componentAttribute;
}
Modified: trunk/test-applications/facelets/src/main/java/util/event/Event.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/util/event/Event.java 2008-11-25
15:54:23 UTC (rev 11366)
+++ trunk/test-applications/facelets/src/main/java/util/event/Event.java 2008-11-25
16:02:38 UTC (rev 11367)
@@ -127,7 +127,16 @@
private String onitemmouseup;
private String onsetup;
private String onsave;
+ private String onsizeexceeded;
+ public String getOnsizeexceeded() {
+ return onsizeexceeded;
+ }
+
+ public void setOnsizeexceeded(String onsizeexceeded) {
+ this.onsizeexceeded = onsizeexceeded;
+ }
+
// showEvent('onkeypressInputID', 'onkeypress work!')
public Event() {
onsave = "showEvent('formID:infoSubview:onsaveInputID', 'onsave
work!')";
@@ -250,6 +259,7 @@
onbeforehide = "showEvent('formID:infoSubview:onbeforehideInputID',
'onbeforehide work!')";
onbeforeshow = "showEvent('formID:infoSubview:onbeforeshowInputID',
'onbeforeshow work!')";
onadd = "showEvent('formID:infoSubview:onaddInputID', 'onadd
work!')";
+ onsizeexceeded = "showEvent('formID:infoSubview:onsizeexceededInputID',
'onsizeexceeded work!')";
}
public String getOncontextmenu() {
Added: trunk/test-applications/facelets/src/main/java/util/parser/Attribute.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/util/parser/Attribute.java
(rev 0)
+++ trunk/test-applications/facelets/src/main/java/util/parser/Attribute.java 2008-11-25
16:02:38 UTC (rev 11367)
@@ -0,0 +1,64 @@
+package util.parser;
+
+public class Attribute {
+ private String name;
+ private String type;
+ private String description;
+ private Status status;
+
+ public Attribute(){
+ this.description = "";
+ }
+
+ public Attribute(String name){
+ this.name = name;
+ this.description = "";
+ }
+
+ public Attribute(String name, String type, String desc, Status status){
+ this.name = name;
+ this.type = type;
+ this.description = desc;
+ this.status = status;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Status getStatus() {
+ return status;
+ }
+
+ public void setStatus(Status status) {
+ this.status = status;
+ }
+
+ @Override
+ public String toString(){
+ return "[" + "Name: " + name + "\r\n" +
"Description: " + description + "\r\n" +
+ "Type: " + type + "\r\n" + "Status: " + status +
"]";
+ }
+}
+
+ enum Status {NOT_READY, IMPLEMENTED, FAILED, PASSED}
Added: trunk/test-applications/facelets/src/main/java/util/parser/AttributesList.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/util/parser/AttributesList.java
(rev 0)
+++
trunk/test-applications/facelets/src/main/java/util/parser/AttributesList.java 2008-11-25
16:02:38 UTC (rev 11367)
@@ -0,0 +1,78 @@
+package util.parser;
+
+import java.util.ArrayList;
+
+public class AttributesList extends ArrayList<Attribute> {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 3245089852351607636L;
+
+ public AttributesList(){
+ super();
+ }
+
+ public ArrayList<String> getNamesArray(){
+ ArrayList<String> result = new ArrayList<String>();
+ for(Attribute attr:this){
+ result.add(attr.getName());
+ }
+ return result;
+ }
+
+ public ArrayList<String> getDescriptionArray(){
+ ArrayList<String> result = new ArrayList<String>();
+ for(Attribute attr:this){
+ result.add(attr.getDescription());
+ }
+ return result;
+ }
+
+ public ArrayList<String> getTypeArray(){
+ ArrayList<String> result = new ArrayList<String>();
+ for(Attribute attr:this){
+ result.add(attr.getType());
+ }
+ return result;
+ }
+
+ public ArrayList<Status> getStatusArray(){
+ ArrayList<Status> result = new ArrayList<Status>();
+ for(Attribute attr:this){
+ result.add(attr.getStatus());
+ }
+ return result;
+ }
+
+ public ArrayList<Attribute> getHandlers(){
+ ArrayList<Attribute> result = new ArrayList<Attribute>();
+ for(Attribute attr:this){
+ if (attr.getName().startsWith("on")) {
+ result.add(attr);
+ }
+ }
+ return result;
+ }
+
+ public ArrayList<Attribute> getStyles(){
+ ArrayList<Attribute> result = new ArrayList<Attribute>();
+ for(Attribute attr:this){
+ if (attr.getName().indexOf("tyle") != -1 ||
attr.getName().indexOf("lass") != -1) {
+ result.add(attr);
+ }
+ }
+ return result;
+ }
+
+ public ArrayList<Attribute> getCommonAttributes(){
+ ArrayList<Attribute> result = new ArrayList<Attribute>();
+ for(Attribute attr:this){
+ if(!(attr.getName().startsWith("on") ||
(attr.getName().indexOf("tyle") != -1) ||
(attr.getName().indexOf("lass") != -1))){
+ result.add(attr);
+ }
+ }
+ return result;
+ }
+
+}
Added: trunk/test-applications/facelets/src/main/java/util/parser/TLDParser.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/util/parser/TLDParser.java
(rev 0)
+++ trunk/test-applications/facelets/src/main/java/util/parser/TLDParser.java 2008-11-25
16:02:38 UTC (rev 11367)
@@ -0,0 +1,125 @@
+package util.parser;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+
+public class TLDParser {
+
+ protected String component;
+ protected JarEntry tld;
+ protected JarFile richfacesUI;
+ protected AttributesList allAttributes;
+
+ public TLDParser(String str) {
+ this.component = str;
+ allAttributes = new AttributesList();
+ }
+
+ public AttributesList getAllAttributes() {
+
+ tld = getRichfacesUI().getJarEntry("META-INF/richfaces.tld");
+ InputStream input = null;
+ try {
+ input = richfacesUI.getInputStream(tld);
+
+ InputStreamReader isr = new InputStreamReader(input);
+ BufferedReader reader = new BufferedReader(isr);
+ String line, attr;
+ Attribute attribute = new Attribute();
+ int position, end;
+ boolean insideTag = true;
+ StringBuilder sb = new StringBuilder("");
+ while (((line = reader.readLine()) != null) && insideTag) {
+ if ((position = line.indexOf("<name>")) != -1) {
+ end = line.indexOf("</name>");
+ attr = line.substring(position + 6, end).trim();
+ if (attr.equalsIgnoreCase(component)) {
+ while (!(line = reader.readLine()).contains("</tag>")) {
+ if (line.contains("<attribute>")) {
+ do {
+ // find attribute name
+ if ((position = line.indexOf("<name>")) != -1) {
+ end = line.indexOf("</name>");
+ attribute.setName(line.substring(
+ position + 6, end).trim());
+ }
+ // find attribute description
+ if ((position = line.indexOf("<description>")) != -1) {
+
+ if((end = line.indexOf("</description>")) != -1){
+ attribute.setDescription(line.substring(position + 13, line.length()-14));
+ }else{
+ sb.append(line.substring(position + 13,
line.length()).trim().replaceAll("\t", ""));
+ line = reader.readLine();
+ while ((end = line.indexOf("</description>")) == -1) {
+ sb.append(line.substring(0, line.length()).replaceAll("\t",
""));
+ line = reader.readLine();
+ }
+ sb.append(line.substring(0, line.length() -
14).trim().replaceAll("\t", ""));
+
+ attribute.setDescription(sb.toString());
+ sb.delete(0, sb.length());
+ }
+ }
+ // find attribute type
+ if ((position = line.indexOf("<type>")) != -1) {
+ end = line.indexOf("</type>");
+ attribute.setType(line.substring(position + 6, end).trim());
+ }
+ // find attribute method-signature
+ if ((position = line.indexOf("<method-signature>")) != -1) {
+ end = line.indexOf("</method-signature>");
+ attribute.setType(line.substring(position + 18, end).trim());
+ }
+ } while (!((line = reader.readLine())
+ .contains("</attribute>")));
+ // define attribute status
+ attribute.setStatus(Status.NOT_READY);
+ allAttributes.add(attribute);
+ attribute = new Attribute();
+ }
+ }
+ insideTag = false;
+ }
+ }
+ }
+ reader.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return allAttributes;
+ }
+
+ public String getExtPath() {
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ String resource = "META-INF/richfaces.tld";
+ return loader.getResource(resource).toString();
+ }
+
+ public String getComponent() {
+ return component;
+ }
+
+ public void setComponent(String component) {
+ this.component = component;
+ }
+
+ public JarFile getRichfacesUI() {
+ String temp = null;
+ int position;
+ try {
+ if ((position = getExtPath().indexOf('!')) != -1) {
+ temp = getExtPath().substring("jar:file:\\".length(), position);
+ }
+ richfacesUI = new JarFile(temp);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return richfacesUI;
+ }
+}
Added: trunk/test-applications/facelets/src/main/webapp/Queue/Queue.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Queue/Queue.xhtml
(rev 0)
+++ trunk/test-applications/facelets/src/main/webapp/Queue/Queue.xhtml 2008-11-25 16:02:38
UTC (rev 11367)
@@ -0,0 +1,16 @@
+<f:subview
xmlns:ui="http://java.sun.com/jsf/facelets"
+
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="queueSubviewID">
+
+ <a4j:queue binding="#{queue.myQueue}"
disabled="#{queue.disabled}"
+ ignoreDupResponses="#{queue.ignoreDupResponses}" name="formQueue"
+ onbeforedomupdate="#{event.onbeforedomupdate}"
+ oncomplete="#{event.oncomplete}" onerror="#{event.onerror}"
+ onsizeexceeded="#{event.onsizeexceeded}"
onsubmit="#{event.onsubmit}"
+ rendered="#{queue.rendered}" requestDelay="#{queue.requestDelay}"
+ size="#{queue.size}"
+ sizeExceededBehavior="#{queue.sizeExceededBehavior}"
+ timeout="#{queue.timeout}" />
+</f:subview>
\ No newline at end of file
Added: trunk/test-applications/facelets/src/main/webapp/Queue/QueueDefault.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Queue/QueueDefault.xhtml
(rev 0)
+++ trunk/test-applications/facelets/src/main/webapp/Queue/QueueDefault.xhtml 2008-11-25
16:02:38 UTC (rev 11367)
@@ -0,0 +1,5 @@
+<f:subview
xmlns:ui="http://java.sun.com/jsf/facelets"
+
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="queueDefaultSubviewID"
\ No newline at end of file
Added: trunk/test-applications/facelets/src/main/webapp/Queue/QueueProperty.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Queue/QueueProperty.xhtml
(rev 0)
+++ trunk/test-applications/facelets/src/main/webapp/Queue/QueueProperty.xhtml 2008-11-25
16:02:38 UTC (rev 11367)
@@ -0,0 +1,40 @@
+<f:subview
xmlns:ui="http://java.sun.com/jsf/facelets"
+
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="queuePropertySubviewID">
+
+ <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()" />
+
+ <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>
+ </h:inputText>
+
+ <h:outputText value="size" />
+ <h:inputText value="#{queue.size}">
+ <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:panelGrid>
+</f:subview>
\ No newline at end of file
Added: trunk/test-applications/facelets/src/main/webapp/Queue/QueueStraightforward.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Queue/QueueStraightforward.xhtml
(rev 0)
+++
trunk/test-applications/facelets/src/main/webapp/Queue/QueueStraightforward.xhtml 2008-11-25
16:02:38 UTC (rev 11367)
@@ -0,0 +1,167 @@
+<f:subview
xmlns:ui="http://java.sun.com/jsf/facelets"
+
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="queueStraightforwardSubviewID">
+ <h:panelGrid columns="3" id="panelID" border="1"
+ style="text-align:center;">
+
+ <h:outputText value="Component name" style="FONT-WEIGHT: bold;"
/>
+ <h:outputText value="Component" style="FONT-WEIGHT: bold;"
/>
+ <h:outputText value="Select eventsQueue" style="FONT-WEIGHT:
bold;" />
+
+ <h:outputText value="h:inputText" />
+ <h:inputText value="#{queueComponent.inputValue}"
id="inputID">
+ <a4j:support id="inputSupport" event="onblur"
+ eventsQueue="#{queueComponent.inputQueue}"></a4j:support>
+ </h:inputText>
+
+ <h:selectOneMenu value="#{queueComponent.inputQueue}"
+ onchange="submit();">
+ <f:selectItems value="#{queueComponent.queues}" />
+ </h:selectOneMenu>
+
+ <h:outputText value="rich:calendar" />
+ <rich:calendar id="calendarID"
value="#{queueComponent.calendarValue}"
+ eventsQueue="#{queueComponent.calendarQueue}">
+ </rich:calendar>
+
+ <h:selectOneMenu value="#{queueComponent.calendarQueue}"
+ onchange="submit();">
+ <f:selectItems value="#{queueComponent.queues}" />
+ </h:selectOneMenu>
+
+ <h:outputText value="h:selectBooleanCheckbox" />
+ <h:selectBooleanCheckbox value="#{queueComponent.checkboxValue}"
+ id="checkboxID">
+ <a4j:support id="checkboxSupport" event="onchange"
+ eventsQueue="#{queueComponent.checkboxQueue}"></a4j:support>
+ </h:selectBooleanCheckbox>
+
+ <h:selectOneMenu value="#{queueComponent.checkboxQueue}"
+ onchange="submit();">
+ <f:selectItems value="#{queueComponent.queues}" />
+ </h:selectOneMenu>
+
+ <h:outputText value="rich:dataScroller" />
+ <rich:datascroller for="dataTableId" reRender="dataTableId"
+ boundaryControls="#{dataScroller.boundaryControls}"
+ fastStep="#{dataScroller.fastStep}" id="dsID"
+ page="#{dataScroller.page}"
+ value="#{queueComponent.dataScrollerValue}"
+ stepControls="#{dataScroller.stepControls}"
+ eventsQueue="#{queueComponent.dataScrollerQueue}"
+ fastControls="#{dataScroller.fastControls}"
+ action="#{dataScroller.act}"
+ actionListener="#{dataScroller.actListener}" maxPages="10"
+ scrollerListener="#{dataScroller.ScrollerListener}">
+ </rich:datascroller>
+
+ <h:selectOneMenu value="#{queueComponent.dataScrollerQueue}"
+ onchange="submit();">
+ <f:selectItems value="#{queueComponent.queues}" />
+ </h:selectOneMenu>
+
+ <h:outputText value="h:selectOneRadio" />
+ <h:selectOneRadio value="#{queueComponent.radioValue}">
+ <a4j:support id="radioSupport" event="onblur"
+ eventsQueue="#{queueComponent.radioQueue}"></a4j:support>
+ <f:selectItems value="#{queueComponent.queues}" />
+ </h:selectOneRadio>
+
+ <h:selectOneMenu value="#{queueComponent.radioQueue}"
+ onchange="submit();">
+ <f:selectItems value="#{queueComponent.queues}" />
+ </h:selectOneMenu>
+
+ <h:outputText value="rich:dataFilterSlider" />
+ <rich:dataFilterSlider sliderListener="#{dfs.doSlide}"
+ action="#{dfs.act}" forValRef="dataScroller.dataTable"
+ actionListener="#{dfs.actListener}" for="dataTableId"
+ filterBy="getInt0" storeResults="true" startRange="0"
endRange="999"
+ increment="9" manualInput="true" width="400px"
trailer="true"
+ handleValue="999" id="dfsID"
eventsQueue="#{queueComponent.dfsQueue}"></rich:dataFilterSlider>
+
+ <h:selectOneMenu value="#{queueComponent.dfsQueue}"
+ onchange="submit();">
+ <f:selectItems value="#{queueComponent.queues}" />
+ </h:selectOneMenu>
+
+ <h:outputText value="h:selectOneMenu" />
+ <h:selectOneMenu value="#{queueComponent.selectMenuValue}">
+ <f:selectItem itemLabel="apple" itemValue="apple" />
+ <f:selectItem itemLabel="kiwi" itemValue="kiwi" />
+ <f:selectItem itemLabel="pineapple" itemValue="pineapple"
/>
+ <a4j:support id="selectMenuSupport" event="onchange"
+ eventsQueue="#{queueComponent.selectMenuQueue}"></a4j:support>
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="#{queueComponent.selectMenuQueue}"
+ onchange="submit();">
+ <f:selectItems value="#{queueComponent.queues}" />
+ </h:selectOneMenu>
+
+ <h:outputText value="rich:suggestionbox" />
+ <h:panelGroup>
+ <h:inputText value="#{queueComponent.suggestionValue}"
id="text">
+ <f:validateLength minimum="0" maximum="30" />
+ </h:inputText>
+ <rich:suggestionbox id="suggestionBoxId"
+ bypassUpdates="#{sb.bypassUpdates}"
cellpadding="#{sb.cellpadding}"
+ cellspacing="#{sb.cellspacing}"
+ eventsQueue="#{queueComponent.suggestionQueue}"
+ fetchValue="#{result.text}" first="#{sb.first}"
for="text"
+ height="#{sb.height}"
ignoreDupResponses="#{sb.ignoreDupResponses}"
+ limitToList="false" minChars="#{sb.minchars}"
+ nothingLabel="#{sb.nothingLabel}"
+ usingSuggestObjects="#{sb.usingSuggestObjects}"
+ requestDelay="#{sb.requestDelay}"
selfRendered="#{sb.selfRendered}"
+ var="result" suggestionAction="#{sb.autocomplete}"
+ width="#{sb.width}" tokens="#{sb.tokens}">
+ <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>
+ </h:panelGroup>
+
+ <h:selectOneMenu value="#{queueComponent.suggestionQueue}"
+ onchange="submit();">
+ <f:selectItems value="#{queueComponent.queues}" />
+ </h:selectOneMenu>
+
+ </h:panelGrid>
+
+ <rich:separator width="100%"
height="10px"></rich:separator>
+ <rich:dataTable id="dataTableId"
value="#{dataScroller.dataTable}"
+ var="dT" cellpadding="5px" rows="5" border="1"
+ reRender="dsID,dataTableId"
sortMode="#{dataScroller.sortMode}">
+ <f:facet name="header">
+ <h:outputText value="Header" />
+ </f:facet>
+ <f:facet name="footer">
+
+ </f:facet>
+ <rich:column sortBy="#{dT.str0}" filterBy="#{dT.str0}"
+ filterEvent="onkeyup" selfSorted="#{dataScroller.selfSorted}"
+ filterValue="#{dataScroller.filterValue}">
+ <h:outputText value="#{dT.str0}" />
+ </rich:column>
+ <rich:column sortBy="#{dT.int0}" filterBy="#{dT.int0}"
+ filterEvent="onkeyup" selfSorted="#{dataScroller.selfSorted}">
+ <h:outputText value="#{dT.int0} " />
+ </rich:column>
+ </rich:dataTable>
+
+
+</f:subview>
\ No newline at end of file
Added: trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-Queue.xml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-Queue.xml
(rev 0)
+++
trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-Queue.xml 2008-11-25
16:02:38 UTC (rev 11367)
@@ -0,0 +1,15 @@
+<?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>queue</managed-bean-name>
+ <managed-bean-class>queue.Queue</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>queueComponent</managed-bean-name>
+ <managed-bean-class>queue.QueueComponent</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+</faces-config>
Modified: trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml 2008-11-25 15:54:23
UTC (rev 11366)
+++ trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml 2008-11-25 16:02:38
UTC (rev 11367)
@@ -41,7 +41,7 @@
</context-param>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
-
<param-value>/WEB-INF/faces-config-Editor.xml,/WEB-INF/faces-config-ExtendedDataTable.xml,/WEB-INF/faces-config-DataGrid.xml,/WEB-INF/faces-config-Validator.xml,/WEB-INF/faces-config-ComponentInfo.xml,/WEB-INF/faces-config-HotKey.xml,/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,/WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,/WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,/WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,/WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,/WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,/WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml,/WEB-INF/faces-config-Spacer.xm!
l,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,/WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,/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-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,/WEB-INF/faces-config-ListShuttle.xml,/WEB-INF/faces-config-Converter.xml,/WEB-INF/faces-config-ComponentControl.xml,/WEB-INF/faces-config-Columns.xml,/WEB-INF/faces-config-PickList.xml,/WEB-INF/faces-config-Combobox.xml,/WEB-INF/faces-config-PTComponent.xml,/WEB-INF/faces-config-Event.xml,/WEB-INF/faces-config-ProgressBar.xml,/WEB-INF/faces-config-Options.xml,/WEB-INF/faces-config-SortingAndFiltering.xml,/WEB-INF/!
faces-config-Style.xml,/WEB-INF/faces-config-FileUpload.xml,/WEB-INF/f
aces-config-InplaceSelect.xml,/WEB-INF/faces-config-InplaceInput.xml,/WEB-INF/faces-config-Skinning.xml,/WEB-INF/faces-config-Custom.xml</param-value>
+
<param-value>/WEB-INF/faces-config-Queue.xml,/WEB-INF/faces-config-Editor.xml,/WEB-INF/faces-config-ExtendedDataTable.xml,/WEB-INF/faces-config-DataGrid.xml,/WEB-INF/faces-config-Validator.xml,/WEB-INF/faces-config-ComponentInfo.xml,/WEB-INF/faces-config-HotKey.xml,/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,/WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,/WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,/WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,/WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,/WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,/WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml!
,/WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,/WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,/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-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,/WEB-INF/faces-config-ListShuttle.xml,/WEB-INF/faces-config-Converter.xml,/WEB-INF/faces-config-ComponentControl.xml,/WEB-INF/faces-config-Columns.xml,/WEB-INF/faces-config-PickList.xml,/WEB-INF/faces-config-Combobox.xml,/WEB-INF/faces-config-PTComponent.xml,/WEB-INF/faces-config-Event.xml,/WEB-INF/faces-config-ProgressBar.xml,/WEB-INF/faces-config-Options.xml,/WEB-INF/faces-config-S!
ortingAndFiltering.xml,/WEB-INF/faces-config-Style.xml,/WEB-INF/faces-
config-FileUpload.xml,/WEB-INF/faces-config-InplaceSelect.xml,/WEB-INF/faces-config-InplaceInput.xml,/WEB-INF/faces-config-Skinning.xml,/WEB-INF/faces-config-Custom.xml</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
Modified: trunk/test-applications/facelets/src/main/webapp/pages/Rich/Rich.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/pages/Rich/Rich.xhtml 2008-11-25
15:54:23 UTC (rev 11366)
+++ trunk/test-applications/facelets/src/main/webapp/pages/Rich/Rich.xhtml 2008-11-25
16:02:38 UTC (rev 11367)
@@ -27,6 +27,9 @@
type="text/css" />
</head>
<body>
+ <a4j:queue name="org.richfaces.global_queue"
disabled="false"/>
+ <a4j:queue name="namedQueue"/>
+ <a4j:queue />
<h:form id="formID">
<div id="divOpthID" align="right" style="z-index:
200"><ui:include src="/pages/RichMenu/RichMenu.xhtml"
/></div>