JBoss Rich Faces SVN: r11370 - in trunk/test-applications/seamApp/web/src/main: java/org/richfaces/helloworld/domain/dataScroller and 9 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-11-25 12:07:46 -0500 (Tue, 25 Nov 2008)
New Revision: 11370
Added:
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/queue/
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/queue/Queue.java
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/queue/QueueComponent.java
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/parser/
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/parser/Attribute.java
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/parser/AttributesList.java
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/parser/TLDParser.java
trunk/test-applications/seamApp/web/src/main/webapp/Queue/
trunk/test-applications/seamApp/web/src/main/webapp/Queue/Queue.xhtml
trunk/test-applications/seamApp/web/src/main/webapp/Queue/QueueDefault.xhtml
trunk/test-applications/seamApp/web/src/main/webapp/Queue/QueueProperty.xhtml
trunk/test-applications/seamApp/web/src/main/webapp/Queue/QueueStraightforward.xhtml
Modified:
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/dataScroller/DataScroller.java
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/rich/RichBean.java
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/sb/Sb.java
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/componentInfo/ComponentInfo.java
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/event/Event.java
Log:
Modified: trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/dataScroller/DataScroller.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/dataScroller/DataScroller.java 2008-11-25 16:40:07 UTC (rev 11369)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/dataScroller/DataScroller.java 2008-11-25 17:07:46 UTC (rev 11370)
@@ -10,11 +10,13 @@
import org.richfaces.event.DataScrollerEvent;
import org.richfaces.model.Ordering;
+import org.richfaces.helloworld.domain.util.data.Data;
+
@Name("dataScroller")
@Scope(ScopeType.SESSION)
public class DataScroller {
- private ArrayList<Data> dataTable;
+ private ArrayList dataTable;
public Data tD;
public String align;
public String fastControls;
@@ -139,13 +141,13 @@
sortMode = "single";
sortOrder = Ordering.ASCENDING;
selfSorted = true;
- currentSortOrder = "ASCENDING";
+ currentSortOrder = "ASCENDING";
+ dataTable = new ArrayList();
- dataTable = new ArrayList<Data>();
-
for(int i=0;i<1000;i++)
{
- dataTable.add(new Data("Random", i));
+
+ dataTable.add(new Data(Data.Random(6),i));
}
}
@@ -170,7 +172,7 @@
int k = dataTable.size()-1;
for(int i = k;i < (k+1)*2;i++)
{
- dataTable.add(new Data("Random", i));
+ dataTable.add(new Data("Random",i));
}
}
Added: trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/queue/Queue.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/queue/Queue.java (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/queue/Queue.java 2008-11-25 17:07:46 UTC (rev 11370)
@@ -0,0 +1,94 @@
+package org.richfaces.helloworld.domain.queue;
+
+import org.ajax4jsf.component.UIQueue;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.helloworld.domain.util.componentInfo.ComponentInfo;
+
+@Name("queue")
+(a)Scope(ScopeType.SESSION)
+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/seamApp/web/src/main/java/org/richfaces/helloworld/domain/queue/QueueComponent.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/queue/QueueComponent.java (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/queue/QueueComponent.java 2008-11-25 17:07:46 UTC (rev 11370)
@@ -0,0 +1,182 @@
+package org.richfaces.helloworld.domain.queue;
+
+import java.util.ArrayList;
+import java.util.Date;
+
+import javax.faces.model.SelectItem;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+@Name("queueComponent")
+(a)Scope(ScopeType.SESSION)
+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/seamApp/web/src/main/java/org/richfaces/helloworld/domain/rich/RichBean.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/rich/RichBean.java 2008-11-25 16:40:07 UTC (rev 11369)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/rich/RichBean.java 2008-11-25 17:07:46 UTC (rev 11370)
@@ -77,6 +77,8 @@
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/seamApp/web/src/main/java/org/richfaces/helloworld/domain/sb/Sb.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/sb/Sb.java 2008-11-25 16:40:07 UTC (rev 11369)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/sb/Sb.java 2008-11-25 17:07:46 UTC (rev 11370)
@@ -4,15 +4,17 @@
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import javax.faces.context.FacesContext;
-import javax.faces.event.ActionEvent;
+//import javax.faces.context.FacesContext;
+//import javax.faces.event.ActionEvent;
+import javax.persistence.Entity;
+
import org.richfaces.helloworld.domain.util.componentInfo.ComponentInfo;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.richfaces.component.html.HtmlSuggestionBox;
import org.richfaces.renderkit.html.SuggestionBoxRenderer;
-
+@Entity
@Name("sb")
@Scope(ScopeType.SESSION)
public class Sb implements Serializable {
@@ -107,15 +109,15 @@
setCities(getAllData());
}
- public void selectValue(ActionEvent actionEvent){
- System.out.println("----inside selectValue(ActionEvent actionEvent)-----");
- }
+// public void selectValue(ActionEvent actionEvent){
+// System.out.println("----inside selectValue(ActionEvent actionEvent)-----");
+// }
+//
+// public void checkBinding(ActionEvent actionEvent) {
+// FacesContext context = FacesContext.getCurrentInstance();
+// bindLabel = mySuggestionBox.getClientId(context) + "; param: " + mySuggestionBox.getParam();
+// }
- public void checkBinding(ActionEvent actionEvent) {
- FacesContext context = FacesContext.getCurrentInstance();
- bindLabel = mySuggestionBox.getClientId(context) + "; param: " + mySuggestionBox.getParam();
- }
-
public List autocomplete(Object event) {
String pref = event.toString();
ArrayList result = new ArrayList();
Modified: trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/componentInfo/ComponentInfo.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/componentInfo/ComponentInfo.java 2008-11-25 16:40:07 UTC (rev 11369)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/componentInfo/ComponentInfo.java 2008-11-25 17:07:46 UTC (rev 11370)
@@ -5,17 +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.ValueExpression;
-import javax.faces.component.UIComponent;
import javax.faces.component.UIComponentBase;
import javax.faces.context.FacesContext;
+import org.richfaces.helloworld.domain.util.parser.Attribute;
+import org.richfaces.helloworld.domain.util.parser.AttributesList;
+import org.richfaces.helloworld.domain.util.parser.TLDParser;
+
public class ComponentInfo {
private static volatile ComponentInfo INSTANCE;
private ComponentAttribute componentAttribute = new ComponentAttribute();
@@ -68,23 +66,50 @@
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){
@@ -95,15 +120,14 @@
}
} 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);
@@ -114,8 +138,6 @@
componentAttribute.putAttribute(str, ve.getValue(FacesContext.getCurrentInstance().getELContext()).toString());
}
}else componentAttribute.putAttribute(str, "null");
-// Object obj = field.get(component);
-// componentAttribute.putAttribute(str, obj == null ? "null" : obj.toString());
} else componentAttribute.putAttribute(str, "---");
} catch (IllegalArgumentException e) {
e.printStackTrace();
@@ -126,7 +148,7 @@
}
- public static String toString(Object obj) {
+ public static String toString(Object obj) {
Class cl = obj.getClass();
String r = cl.getName() + "[";
Class sc = cl.getSuperclass();
Modified: trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/event/Event.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/event/Event.java 2008-11-25 16:40:07 UTC (rev 11369)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/event/Event.java 2008-11-25 17:07:46 UTC (rev 11370)
@@ -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/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/parser/Attribute.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/parser/Attribute.java (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/parser/Attribute.java 2008-11-25 17:07:46 UTC (rev 11370)
@@ -0,0 +1,64 @@
+package org.richfaces.helloworld.domain.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/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/parser/AttributesList.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/parser/AttributesList.java (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/parser/AttributesList.java 2008-11-25 17:07:46 UTC (rev 11370)
@@ -0,0 +1,78 @@
+package org.richfaces.helloworld.domain.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/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/parser/TLDParser.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/parser/TLDParser.java (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/parser/TLDParser.java 2008-11-25 17:07:46 UTC (rev 11370)
@@ -0,0 +1,125 @@
+package org.richfaces.helloworld.domain.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/seamApp/web/src/main/webapp/Queue/Queue.xhtml
===================================================================
--- trunk/test-applications/seamApp/web/src/main/webapp/Queue/Queue.xhtml (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/webapp/Queue/Queue.xhtml 2008-11-25 17:07:46 UTC (rev 11370)
@@ -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/seamApp/web/src/main/webapp/Queue/QueueDefault.xhtml
===================================================================
--- trunk/test-applications/seamApp/web/src/main/webapp/Queue/QueueDefault.xhtml (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/webapp/Queue/QueueDefault.xhtml 2008-11-25 17:07:46 UTC (rev 11370)
@@ -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/seamApp/web/src/main/webapp/Queue/QueueProperty.xhtml
===================================================================
--- trunk/test-applications/seamApp/web/src/main/webapp/Queue/QueueProperty.xhtml (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/webapp/Queue/QueueProperty.xhtml 2008-11-25 17:07:46 UTC (rev 11370)
@@ -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/seamApp/web/src/main/webapp/Queue/QueueStraightforward.xhtml
===================================================================
--- trunk/test-applications/seamApp/web/src/main/webapp/Queue/QueueStraightforward.xhtml (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/webapp/Queue/QueueStraightforward.xhtml 2008-11-25 17:07:46 UTC (rev 11370)
@@ -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
17 years, 1 month
JBoss Rich Faces SVN: r11369 - trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-11-25 11:40:07 -0500 (Tue, 25 Nov 2008)
New Revision: 11369
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml
Log:
removed redundant reRender
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml 2008-11-25 16:09:00 UTC (rev 11368)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml 2008-11-25 16:40:07 UTC (rev 11369)
@@ -11,5 +11,5 @@
<h:outputText id="_auto_time" style="display: none;" value="#{autoTestBean.text}"></h:outputText>
<h:commandButton id="_auto_simple_submit" value="Simple submit" immediate="#{autoTestBean.immediate}" style="display: none;" />
<a4j:commandButton id="_auto_ajax_submit" value="Ajax submit" reRender="componentId" immediate="#{autoTestBean.immediate}" style="display: none;" />
- <a4j:commandButton id="_auto_ajax_reset" value="Ajax reset" ajaxSingle="true" style="display: none;" action="#{autoTestBean.reset}" reRender="_auto_status"/>
+ <a4j:commandButton id="_auto_ajax_reset" value="Ajax reset" ajaxSingle="true" style="display: none;" action="#{autoTestBean.reset}" />
</html>
\ No newline at end of file
17 years, 1 month
JBoss Rich Faces SVN: r11368 - in trunk/test-applications/seamApp/web/src/main: java/org/richfaces/helloworld/domain/editor and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-11-25 11:09:00 -0500 (Tue, 25 Nov 2008)
New Revision: 11368
Added:
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/editor/
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/editor/Editor.java
trunk/test-applications/seamApp/web/src/main/webapp/Editor/
trunk/test-applications/seamApp/web/src/main/webapp/Editor/Editor.xhtml
trunk/test-applications/seamApp/web/src/main/webapp/Editor/EditorProperty.xhtml
Modified:
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/rich/RichBean.java
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/event/Event.java
Log:
+ editor
Added: trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/editor/Editor.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/editor/Editor.java (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/editor/Editor.java 2008-11-25 16:09:00 UTC (rev 11368)
@@ -0,0 +1,250 @@
+package org.richfaces.helloworld.domain.editor;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.validator.ValidatorException;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.component.html.HtmlEditor;
+import org.richfaces.helloworld.domain.util.componentInfo.ComponentInfo;;
+
+@Name("editor")
+(a)Scope(ScopeType.SESSION)
+public class Editor {
+ private HtmlEditor htmlEditor;
+ private String value;
+ private String width;
+ private String height;
+ private String theme;
+ private boolean autoResize;
+ private boolean immediate;
+ private boolean rendered;
+ private boolean required;
+ private boolean useSeamText;
+ private String viewMode;
+ private boolean readonly;
+ private String tabindex;
+ private String dialogType;
+ private String language;
+ // private String skin;
+
+ public Editor() {
+ value = "Collaboration-oriented websites require a human-friendly markup language for easy entry of formatted text in forum posts, wiki pages, blogs, comments, etc. Seam provides the <s:formattedText/> control for display of formatted text that conforms to the Seam Text language. Seam Text is implemented using an ANTLR-based parser. You don't need to know anything about ANTLR to use it, however.";
+ width = "400";
+ height = "200";
+ theme = "simple";
+ autoResize = false;
+ immediate = false;
+ rendered = true;
+ required = false;
+ useSeamText = false;
+ viewMode = "visual";
+ readonly = false;
+ tabindex = "1";
+ dialogType = "window";
+ language = "en";
+ // skin = "default";
+ }
+
+ /*
+ * Custom valueChangeListener
+ */
+ public void valueChangeListener(ValueChangeEvent e) {
+ System.out.println("!!! valueChangeListener work !!!");
+ }
+
+ /*
+ * Custom Converter for editor
+ */
+ public Converter getConvert() {
+ return new Converter() {
+ public Object getAsObject(FacesContext context,
+ UIComponent component, String newValue)
+ throws ConverterException {
+
+ System.out.println("!!! getAsObject work !!!");
+
+ if (false)
+ throw new ConverterException(new FacesMessage(
+ FacesMessage.SEVERITY_ERROR, "Converter error",
+ "Error while convert to Object"));
+
+ return newValue;
+ }
+
+ public String getAsString(FacesContext context,
+ UIComponent component, Object value)
+ throws ConverterException {
+
+ System.out.println("!!! getAsString work !!!");
+
+ if (false)
+ throw new ConverterException(new FacesMessage(
+ FacesMessage.SEVERITY_ERROR, "Converter error",
+ "Error while convert to String"));
+
+ String result = (value == null) ? "" : value.toString();
+ return result;
+ }
+ };
+ }
+
+ /*
+ * Custom Validator for Editor
+ */
+ public void validate(FacesContext context, UIComponent component,
+ Object value) throws ValidatorException {
+
+ System.out.println("!!! Validator work !!!");
+ if (value != null) {
+
+ if (false) {
+ throw new ValidatorException(new FacesMessage(
+ FacesMessage.SEVERITY_ERROR, "Validation error",
+ "Incorrect input"));
+ }
+ }
+ }
+
+ /*
+ * Add test via reflection
+ */
+ public void addHtmlEditor() {
+ ComponentInfo info = ComponentInfo.getInstance();
+ info.addField(htmlEditor);
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public String getWidth() {
+ return width;
+ }
+
+ public void setWidth(String width) {
+ this.width = width;
+ }
+
+ public String getHeight() {
+ return height;
+ }
+
+ public void setHeight(String height) {
+ this.height = height;
+ }
+
+ public HtmlEditor getHtmlEditor() {
+ return htmlEditor;
+ }
+
+ public void setHtmlEditor(HtmlEditor htmlEditor) {
+ this.htmlEditor = htmlEditor;
+ }
+
+ public String getTheme() {
+ return theme;
+ }
+
+ public void setTheme(String theme) {
+ this.theme = theme;
+ }
+
+ public boolean isAutoResize() {
+ return autoResize;
+ }
+
+ public void setAutoResize(boolean autoResize) {
+ this.autoResize = autoResize;
+ }
+
+ public boolean isImmediate() {
+ return immediate;
+ }
+
+ public void setImmediate(boolean immediate) {
+ this.immediate = immediate;
+ }
+
+ public boolean isRendered() {
+ return rendered;
+ }
+
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public boolean isRequired() {
+ return required;
+ }
+
+ public void setRequired(boolean required) {
+ this.required = required;
+ }
+
+ public boolean isUseSeamText() {
+ return useSeamText;
+ }
+
+ public void setUseSeamText(boolean useSeamText) {
+ this.useSeamText = useSeamText;
+ }
+
+ public String getViewMode() {
+ return viewMode;
+ }
+
+ public void setViewMode(String viewMode) {
+ this.viewMode = viewMode;
+ }
+
+ public boolean isReadonly() {
+ return readonly;
+ }
+
+ public void setReadonly(boolean readonly) {
+ this.readonly = readonly;
+ }
+
+ public String getTabindex() {
+ return tabindex;
+ }
+
+ public void setTabindex(String tabindex) {
+ this.tabindex = tabindex;
+ }
+
+ public String getDialogType() {
+ return dialogType;
+ }
+
+ public void setDialogType(String dialogType) {
+ this.dialogType = dialogType;
+ }
+
+ public String getLanguage() {
+ return language;
+ }
+
+ public void setLanguage(String language) {
+ this.language = language;
+ }
+
+ // public String getSkin() {
+ // return skin;
+ // }
+ //
+ // public void setSkin(String skin) {
+ // this.skin = skin;
+ // }
+}
Modified: trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/rich/RichBean.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/rich/RichBean.java 2008-11-25 16:02:38 UTC (rev 11367)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/rich/RichBean.java 2008-11-25 16:09:00 UTC (rev 11368)
@@ -76,6 +76,7 @@
map.add("Validator", add("/Validator/Validator", new boolean [] {true, true, true}));
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}));
Iterator<String> iterator = map.getSet().iterator();
while(iterator.hasNext()){
list.add(new SelectItem(iterator.next()));
Modified: trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/event/Event.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/event/Event.java 2008-11-25 16:02:38 UTC (rev 11367)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/event/Event.java 2008-11-25 16:09:00 UTC (rev 11368)
@@ -125,9 +125,13 @@
private String onitemmouseout;
private String onitemmouseover;
private String onitemmouseup;
+ private String onsetup;
+ private String onsave;
// showEvent('onkeypressInputID', 'onkeypress work!')
public Event() {
+ onsave = "showEvent('formID:infoSubview:onsaveInputID', 'onsave work!')";
+ onsetup = "showEvent('formID:infoSubview:onsetupInputID', 'onsetup work!')";
onitemclick = "showEvent('formID:infoSubview:onitemclickInputID', 'onitemclick work!')";
onitemdblclick = "showEvent('formID:infoSubview:onitemdblclickInputID', 'onitemdblclick work!')";
onitemkeydown = "showEvent('formID:infoSubview:onitemkeydownInputID', 'onitemkeydown work!')";
@@ -1379,4 +1383,20 @@
this.onitemmouseup = onitemmouseup;
}
+ public String getOnsetup() {
+ return onsetup;
+ }
+
+ public void setOnsetup(String onsetup) {
+ this.onsetup = onsetup;
+ }
+
+ public String getOnsave() {
+ return onsave;
+ }
+
+ public void setOnsave(String onsave) {
+ this.onsave = onsave;
+ }
+
}
\ No newline at end of file
Added: trunk/test-applications/seamApp/web/src/main/webapp/Editor/Editor.xhtml
===================================================================
--- trunk/test-applications/seamApp/web/src/main/webapp/Editor/Editor.xhtml (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/webapp/Editor/Editor.xhtml 2008-11-25 16:09:00 UTC (rev 11368)
@@ -0,0 +1,36 @@
+<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="editorSubviewID">
+
+ <h:panelGrid id="EditorPanelID" columns="2" border="1">
+
+ <rich:editor id="editorID" binding="#{editor.htmlEditor}"
+ value="#{editor.value}" width="#{editor.width}"
+ height="#{editor.height}" theme="#{editor.theme}"
+ onchange="#{event.onchange}" oninit="#{event.oninit}"
+ onsave="#{event.onsave}" onsetup="#{event.onsetup}"
+ autoResize="#{editor.autoResize}" converter="#{editor.convert}"
+ converterMessage="converterMessage" immediate="#{editor.immediate}"
+ rendered="#{editor.rendered}" required="#{editor.required}"
+ requiredMessage="requiredMessage" useSeamText="#{editor.useSeamText}"
+ validator="#{editor.validate}" validatorMessage="validatorMessage"
+ valueChangeListener="#{editor.valueChangeListener}"
+ viewMode="#{editor.viewMode}" readonly="#{editor.readonly}"
+ tabindex="#{editor.tabindex}" dialogType="#{editor.dialogType}"
+ language="#{editor.language}" styleClass="EditorStyleClass"></rich:editor>
+
+ <h:panelGrid columns="1">
+ <f:facet name="header">
+ <h:outputText value="Results" />
+ </f:facet>
+ <h:outputText value="#{editor.value}" escape="false" />
+ <div style="color: red; font-style: italic">HTML code:</div>
+ <h:outputText value="#{editor.value}"
+ style="font-style: italic; color: gray" />
+ </h:panelGrid>
+ </h:panelGrid>
+ <a4j:commandButton value="Show Result" reRender="EditorPanelID" />
+ <a4j:commandButton value="reRender editor" reRender="editorID" />
+</f:subview>
Added: trunk/test-applications/seamApp/web/src/main/webapp/Editor/EditorProperty.xhtml
===================================================================
--- trunk/test-applications/seamApp/web/src/main/webapp/Editor/EditorProperty.xhtml (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/webapp/Editor/EditorProperty.xhtml 2008-11-25 16:09:00 UTC (rev 11368)
@@ -0,0 +1,72 @@
+<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="editorPropertySubviewID">
+
+ <h:panelGrid columns="2">
+ <f:facet name="header">
+ <h:outputText value="List of Attributes" />
+ </f:facet>
+
+ <h:outputText value="height: "></h:outputText>
+ <h:inputText value="#{editor.height}" onchange="submit();"></h:inputText>
+
+ <h:outputText value="width: "></h:outputText>
+ <h:inputText value="#{editor.width}" onchange="submit();"></h:inputText>
+
+ <h:outputText value="theme: "></h:outputText>
+ <h:selectOneRadio value="#{editor.theme}" onchange="submit();">
+ <f:selectItem itemValue="simple" itemLabel="simple" />
+ <f:selectItem itemValue="advanced" itemLabel="advanced" />
+ </h:selectOneRadio>
+
+ <h:outputText value="autoResize: "></h:outputText>
+ <h:selectBooleanCheckbox value="#{editor.autoResize}"
+ onchange="submit();" />
+
+ <h:outputText value="immediate: "></h:outputText>
+ <h:selectBooleanCheckbox value="#{editor.immediate}"
+ onchange="submit();" />
+
+ <h:outputText value="rendered: "></h:outputText>
+ <h:selectBooleanCheckbox value="#{editor.rendered}"
+ onchange="submit();" />
+
+ <h:outputText value="required: "></h:outputText>
+ <h:selectBooleanCheckbox value="#{editor.required}"
+ onchange="submit();" />
+
+ <h:outputText value="useSeamText (work only with Seam libraries): "></h:outputText>
+ <h:selectBooleanCheckbox value="#{editor.useSeamText}"
+ onchange="submit();" />
+
+ <h:outputText value="readonly: "></h:outputText>
+ <h:selectBooleanCheckbox value="#{editor.readonly}"
+ onchange="submit();" />
+
+ <h:outputText value="viewMode: "></h:outputText>
+ <h:selectOneRadio value="#{editor.viewMode}" onchange="submit();">
+ <f:selectItem itemValue="visual" itemLabel="visual" />
+ <f:selectItem itemValue="source" itemLabel="source" />
+ </h:selectOneRadio>
+
+ <h:outputText value="tabindex: "></h:outputText>
+ <h:inputText value="#{editor.tabindex}" onchange="submit();"></h:inputText>
+
+ <h:outputText value="dialogType: "></h:outputText>
+ <h:selectOneRadio value="#{editor.dialogType}" onchange="submit();">
+ <f:selectItem itemValue="window" itemLabel="window" />
+ <f:selectItem itemValue="modal" itemLabel="modal" />
+ </h:selectOneRadio>
+
+ <h:outputText value="language: "></h:outputText>
+ <h:selectOneRadio value="#{editor.language}" onchange="submit();">
+ <f:selectItem itemValue="en" itemLabel="en" />
+ <f:selectItem itemValue="de" itemLabel="de" />
+ <f:selectItem itemValue="ru" itemLabel="ru" />
+ </h:selectOneRadio>
+
+ </h:panelGrid>
+ <h:commandButton value="add test" action="#{editor.addHtmlEditor}"></h:commandButton>
+</f:subview>
\ No newline at end of file
17 years, 1 month
JBoss Rich Faces SVN: r11367 - in trunk/test-applications/facelets/src/main: java/dataScroller and 10 other directories.
by richfaces-svn-commits@lists.jboss.org
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>
17 years, 1 month
JBoss Rich Faces SVN: r11366 - in trunk/ui/core/src/test: resources and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-11-25 10:54:23 -0500 (Tue, 25 Nov 2008)
New Revision: 11366
Removed:
trunk/ui/core/src/test/resources/META-INF/
Modified:
trunk/ui/core/src/test/java/org/ajax4jsf/component/AbstractQueueComponentTest.java
Log:
simulation.js registered dynamically
Modified: trunk/ui/core/src/test/java/org/ajax4jsf/component/AbstractQueueComponentTest.java
===================================================================
--- trunk/ui/core/src/test/java/org/ajax4jsf/component/AbstractQueueComponentTest.java 2008-11-25 14:47:15 UTC (rev 11365)
+++ trunk/ui/core/src/test/java/org/ajax4jsf/component/AbstractQueueComponentTest.java 2008-11-25 15:54:23 UTC (rev 11366)
@@ -46,6 +46,9 @@
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.UserResourceRenderer2;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
+import org.ajax4jsf.resource.InternetResource;
+import org.ajax4jsf.resource.InternetResourceBuilder;
+import org.ajax4jsf.resource.ResourceNotFoundException;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import org.mozilla.javascript.FunctionObject;
import org.mozilla.javascript.NativeArray;
@@ -127,10 +130,19 @@
super(name);
}
+ private static final String SIMULATION_SCRIPT_NAME = "org/ajax4jsf/component/simulation.js";
+
@Override
public void setUp() throws Exception {
super.setUp();
+ InternetResourceBuilder resourceBuilder = InternetResourceBuilder.getInstance();
+ try {
+ resourceBuilder.getResource(SIMULATION_SCRIPT_NAME);
+ } catch (ResourceNotFoundException e) {
+ resourceBuilder.createResource(null, SIMULATION_SCRIPT_NAME);
+ }
+
UIViewRoot viewRoot = facesContext.getViewRoot();
UIResource resource;
@@ -143,7 +155,7 @@
form.getChildren().add(new AjaxSubmitFunctionComponent());
resource = (UIResource) application.createComponent("org.ajax4jsf.LoadScript");
- resource.setSrc("resource:///org/ajax4jsf/component/simulation.js");
+ resource.setSrc("resource:///" + SIMULATION_SCRIPT_NAME);
viewRoot.getChildren().add(resource);
}
17 years, 1 month
JBoss Rich Faces SVN: r11365 - in trunk/test-applications/facelets/src/main: java/editor and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-11-25 09:47:15 -0500 (Tue, 25 Nov 2008)
New Revision: 11365
Added:
trunk/test-applications/facelets/src/main/java/editor/
trunk/test-applications/facelets/src/main/java/editor/Editor.java
trunk/test-applications/facelets/src/main/webapp/Editor/
trunk/test-applications/facelets/src/main/webapp/Editor/Editor.xhtml
trunk/test-applications/facelets/src/main/webapp/Editor/EditorProperty.xhtml
trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-Editor.xml
Modified:
trunk/test-applications/facelets/src/main/java/rich/RichBean.java
trunk/test-applications/facelets/src/main/java/util/event/Event.java
trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml
Log:
+ Editor
Added: trunk/test-applications/facelets/src/main/java/editor/Editor.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/editor/Editor.java (rev 0)
+++ trunk/test-applications/facelets/src/main/java/editor/Editor.java 2008-11-25 14:47:15 UTC (rev 11365)
@@ -0,0 +1,244 @@
+package editor;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.validator.ValidatorException;
+import org.richfaces.component.html.HtmlEditor;
+import util.componentInfo.ComponentInfo;
+
+public class Editor {
+ private HtmlEditor htmlEditor;
+ private String value;
+ private String width;
+ private String height;
+ private String theme;
+ private boolean autoResize;
+ private boolean immediate;
+ private boolean rendered;
+ private boolean required;
+ private boolean useSeamText;
+ private String viewMode;
+ private boolean readonly;
+ private String tabindex;
+ private String dialogType;
+ private String language;
+ // private String skin;
+
+ public Editor() {
+ value = "Collaboration-oriented websites require a human-friendly markup language for easy entry of formatted text in forum posts, wiki pages, blogs, comments, etc. Seam provides the <s:formattedText/> control for display of formatted text that conforms to the Seam Text language. Seam Text is implemented using an ANTLR-based parser. You don't need to know anything about ANTLR to use it, however.";
+ width = "400";
+ height = "200";
+ theme = "simple";
+ autoResize = false;
+ immediate = false;
+ rendered = true;
+ required = false;
+ useSeamText = false;
+ viewMode = "visual";
+ readonly = false;
+ tabindex = "1";
+ dialogType = "window";
+ language = "en";
+ // skin = "default";
+ }
+
+ /*
+ * Custom valueChangeListener
+ */
+ public void valueChangeListener(ValueChangeEvent e) {
+ System.out.println("!!! valueChangeListener work !!!");
+ }
+
+ /*
+ * Custom Converter for editor
+ */
+ public Converter getConvert() {
+ return new Converter() {
+ public Object getAsObject(FacesContext context,
+ UIComponent component, String newValue)
+ throws ConverterException {
+
+ System.out.println("!!! getAsObject work !!!");
+
+ if (false)
+ throw new ConverterException(new FacesMessage(
+ FacesMessage.SEVERITY_ERROR, "Converter error",
+ "Error while convert to Object"));
+
+ return newValue;
+ }
+
+ public String getAsString(FacesContext context,
+ UIComponent component, Object value)
+ throws ConverterException {
+
+ System.out.println("!!! getAsString work !!!");
+
+ if (false)
+ throw new ConverterException(new FacesMessage(
+ FacesMessage.SEVERITY_ERROR, "Converter error",
+ "Error while convert to String"));
+
+ String result = (value == null) ? "" : value.toString();
+ return result;
+ }
+ };
+ }
+
+ /*
+ * Custom Validator for Editor
+ */
+ public void validate(FacesContext context, UIComponent component,
+ Object value) throws ValidatorException {
+
+ System.out.println("!!! Validator work !!!");
+ if (value != null) {
+
+ if (false) {
+ throw new ValidatorException(new FacesMessage(
+ FacesMessage.SEVERITY_ERROR, "Validation error",
+ "Incorrect input"));
+ }
+ }
+ }
+
+ /*
+ * Add test via reflection
+ */
+ public void addHtmlEditor() {
+ ComponentInfo info = ComponentInfo.getInstance();
+ info.addField(htmlEditor);
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public String getWidth() {
+ return width;
+ }
+
+ public void setWidth(String width) {
+ this.width = width;
+ }
+
+ public String getHeight() {
+ return height;
+ }
+
+ public void setHeight(String height) {
+ this.height = height;
+ }
+
+ public HtmlEditor getHtmlEditor() {
+ return htmlEditor;
+ }
+
+ public void setHtmlEditor(HtmlEditor htmlEditor) {
+ this.htmlEditor = htmlEditor;
+ }
+
+ public String getTheme() {
+ return theme;
+ }
+
+ public void setTheme(String theme) {
+ this.theme = theme;
+ }
+
+ public boolean isAutoResize() {
+ return autoResize;
+ }
+
+ public void setAutoResize(boolean autoResize) {
+ this.autoResize = autoResize;
+ }
+
+ public boolean isImmediate() {
+ return immediate;
+ }
+
+ public void setImmediate(boolean immediate) {
+ this.immediate = immediate;
+ }
+
+ public boolean isRendered() {
+ return rendered;
+ }
+
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public boolean isRequired() {
+ return required;
+ }
+
+ public void setRequired(boolean required) {
+ this.required = required;
+ }
+
+ public boolean isUseSeamText() {
+ return useSeamText;
+ }
+
+ public void setUseSeamText(boolean useSeamText) {
+ this.useSeamText = useSeamText;
+ }
+
+ public String getViewMode() {
+ return viewMode;
+ }
+
+ public void setViewMode(String viewMode) {
+ this.viewMode = viewMode;
+ }
+
+ public boolean isReadonly() {
+ return readonly;
+ }
+
+ public void setReadonly(boolean readonly) {
+ this.readonly = readonly;
+ }
+
+ public String getTabindex() {
+ return tabindex;
+ }
+
+ public void setTabindex(String tabindex) {
+ this.tabindex = tabindex;
+ }
+
+ public String getDialogType() {
+ return dialogType;
+ }
+
+ public void setDialogType(String dialogType) {
+ this.dialogType = dialogType;
+ }
+
+ public String getLanguage() {
+ return language;
+ }
+
+ public void setLanguage(String language) {
+ this.language = language;
+ }
+
+ // public String getSkin() {
+ // return skin;
+ // }
+ //
+ // public void setSkin(String skin) {
+ // this.skin = skin;
+ // }
+}
Modified: trunk/test-applications/facelets/src/main/java/rich/RichBean.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/rich/RichBean.java 2008-11-25 14:44:09 UTC (rev 11364)
+++ trunk/test-applications/facelets/src/main/java/rich/RichBean.java 2008-11-25 14:47:15 UTC (rev 11365)
@@ -74,6 +74,7 @@
map.add("Validator", add("/Validator/Validator", new boolean [] {true, true, true}));
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}));
Iterator<String> iterator = map.getSet().iterator();
while(iterator.hasNext()){
list.add(new SelectItem(iterator.next()));
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 14:44:09 UTC (rev 11364)
+++ trunk/test-applications/facelets/src/main/java/util/event/Event.java 2008-11-25 14:47:15 UTC (rev 11365)
@@ -125,9 +125,13 @@
private String onitemmouseout;
private String onitemmouseover;
private String onitemmouseup;
+ private String onsetup;
+ private String onsave;
// showEvent('onkeypressInputID', 'onkeypress work!')
public Event() {
+ onsave = "showEvent('formID:infoSubview:onsaveInputID', 'onsave work!')";
+ onsetup = "showEvent('formID:infoSubview:onsetupInputID', 'onsetup work!')";
onitemclick = "showEvent('formID:infoSubview:onitemclickInputID', 'onitemclick work!')";
onitemdblclick = "showEvent('formID:infoSubview:onitemdblclickInputID', 'onitemdblclick work!')";
onitemkeydown = "showEvent('formID:infoSubview:onitemkeydownInputID', 'onitemkeydown work!')";
@@ -1379,4 +1383,20 @@
this.onitemmouseup = onitemmouseup;
}
+ public String getOnsetup() {
+ return onsetup;
+ }
+
+ public void setOnsetup(String onsetup) {
+ this.onsetup = onsetup;
+ }
+
+ public String getOnsave() {
+ return onsave;
+ }
+
+ public void setOnsave(String onsave) {
+ this.onsave = onsave;
+ }
+
}
\ No newline at end of file
Added: trunk/test-applications/facelets/src/main/webapp/Editor/Editor.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Editor/Editor.xhtml (rev 0)
+++ trunk/test-applications/facelets/src/main/webapp/Editor/Editor.xhtml 2008-11-25 14:47:15 UTC (rev 11365)
@@ -0,0 +1,36 @@
+<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="editorSubviewID">
+
+ <h:panelGrid id="EditorPanelID" columns="2" border="1">
+
+ <rich:editor id="editorID" binding="#{editor.htmlEditor}"
+ value="#{editor.value}" width="#{editor.width}"
+ height="#{editor.height}" theme="#{editor.theme}"
+ onchange="#{event.onchange}" oninit="#{event.oninit}"
+ onsave="#{event.onsave}" onsetup="#{event.onsetup}"
+ autoResize="#{editor.autoResize}" converter="#{editor.convert}"
+ converterMessage="converterMessage" immediate="#{editor.immediate}"
+ rendered="#{editor.rendered}" required="#{editor.required}"
+ requiredMessage="requiredMessage" useSeamText="#{editor.useSeamText}"
+ validator="#{editor.validate}" validatorMessage="validatorMessage"
+ valueChangeListener="#{editor.valueChangeListener}"
+ viewMode="#{editor.viewMode}" readonly="#{editor.readonly}"
+ tabindex="#{editor.tabindex}" dialogType="#{editor.dialogType}"
+ language="#{editor.language}" styleClass="EditorStyleClass"></rich:editor>
+
+ <h:panelGrid columns="1">
+ <f:facet name="header">
+ <h:outputText value="Results" />
+ </f:facet>
+ <h:outputText value="#{editor.value}" escape="false" />
+ <div style="color: red; font-style: italic">HTML code:</div>
+ <h:outputText value="#{editor.value}"
+ style="font-style: italic; color: gray" />
+ </h:panelGrid>
+ </h:panelGrid>
+ <a4j:commandButton value="Show Result" reRender="EditorPanelID" />
+ <a4j:commandButton value="reRender editor" reRender="editorID" />
+</f:subview>
Added: trunk/test-applications/facelets/src/main/webapp/Editor/EditorProperty.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Editor/EditorProperty.xhtml (rev 0)
+++ trunk/test-applications/facelets/src/main/webapp/Editor/EditorProperty.xhtml 2008-11-25 14:47:15 UTC (rev 11365)
@@ -0,0 +1,72 @@
+<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="editorPropertySubviewID">
+
+ <h:panelGrid columns="2">
+ <f:facet name="header">
+ <h:outputText value="List of Attributes" />
+ </f:facet>
+
+ <h:outputText value="height: "></h:outputText>
+ <h:inputText value="#{editor.height}" onchange="submit();"></h:inputText>
+
+ <h:outputText value="width: "></h:outputText>
+ <h:inputText value="#{editor.width}" onchange="submit();"></h:inputText>
+
+ <h:outputText value="theme: "></h:outputText>
+ <h:selectOneRadio value="#{editor.theme}" onchange="submit();">
+ <f:selectItem itemValue="simple" itemLabel="simple" />
+ <f:selectItem itemValue="advanced" itemLabel="advanced" />
+ </h:selectOneRadio>
+
+ <h:outputText value="autoResize: "></h:outputText>
+ <h:selectBooleanCheckbox value="#{editor.autoResize}"
+ onchange="submit();" />
+
+ <h:outputText value="immediate: "></h:outputText>
+ <h:selectBooleanCheckbox value="#{editor.immediate}"
+ onchange="submit();" />
+
+ <h:outputText value="rendered: "></h:outputText>
+ <h:selectBooleanCheckbox value="#{editor.rendered}"
+ onchange="submit();" />
+
+ <h:outputText value="required: "></h:outputText>
+ <h:selectBooleanCheckbox value="#{editor.required}"
+ onchange="submit();" />
+
+ <h:outputText value="useSeamText (work only with Seam libraries): "></h:outputText>
+ <h:selectBooleanCheckbox value="#{editor.useSeamText}"
+ onchange="submit();" />
+
+ <h:outputText value="readonly: "></h:outputText>
+ <h:selectBooleanCheckbox value="#{editor.readonly}"
+ onchange="submit();" />
+
+ <h:outputText value="viewMode: "></h:outputText>
+ <h:selectOneRadio value="#{editor.viewMode}" onchange="submit();">
+ <f:selectItem itemValue="visual" itemLabel="visual" />
+ <f:selectItem itemValue="source" itemLabel="source" />
+ </h:selectOneRadio>
+
+ <h:outputText value="tabindex: "></h:outputText>
+ <h:inputText value="#{editor.tabindex}" onchange="submit();"></h:inputText>
+
+ <h:outputText value="dialogType: "></h:outputText>
+ <h:selectOneRadio value="#{editor.dialogType}" onchange="submit();">
+ <f:selectItem itemValue="window" itemLabel="window" />
+ <f:selectItem itemValue="modal" itemLabel="modal" />
+ </h:selectOneRadio>
+
+ <h:outputText value="language: "></h:outputText>
+ <h:selectOneRadio value="#{editor.language}" onchange="submit();">
+ <f:selectItem itemValue="en" itemLabel="en" />
+ <f:selectItem itemValue="de" itemLabel="de" />
+ <f:selectItem itemValue="ru" itemLabel="ru" />
+ </h:selectOneRadio>
+
+ </h:panelGrid>
+ <h:commandButton value="add test" action="#{editor.addHtmlEditor}"></h:commandButton>
+</f:subview>
\ No newline at end of file
Added: trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-Editor.xml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-Editor.xml (rev 0)
+++ trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-Editor.xml 2008-11-25 14:47:15 UTC (rev 11365)
@@ -0,0 +1,10 @@
+<?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>editor</managed-bean-name>
+ <managed-bean-class>editor.Editor</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+</faces-config>
\ No newline at end of file
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 14:44:09 UTC (rev 11364)
+++ trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml 2008-11-25 14:47:15 UTC (rev 11365)
@@ -41,7 +41,7 @@
</context-param>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
- <param-value>/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.x!
ml,/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/f!
aces-config-FileUpload.xml,/WEB-INF/faces-config-InplaceSelect.xml,/WE
B-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-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>
</context-param>
<context-param>
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
17 years, 1 month
JBoss Rich Faces SVN: r11364 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-11-25 09:44:09 -0500 (Tue, 25 Nov 2008)
New Revision: 11364
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java
Log:
RF-4718
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java 2008-11-25 14:35:26 UTC (rev 11363)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java 2008-11-25 14:44:09 UTC (rev 11364)
@@ -117,7 +117,25 @@
tagValidatorId = attrFormId + ":tagValidatorId";
}
- /**
+ /**
+ * Check control facets
+ */
+ @Test
+ public void testControlFacets(Template template) {
+ init(template);
+ String orderingListId = getParentId() + "testControlFacets";
+ Assert.assertTrue(selenium.isElementPresent(orderingListId + ":topControlFacet"));
+ Assert.assertTrue(selenium.isElementPresent(orderingListId + ":topControlDisabledFacet"));
+ Assert.assertTrue(selenium.isElementPresent(orderingListId + ":bottomControlFacet"));
+ Assert.assertTrue(selenium.isElementPresent(orderingListId + ":bottomControlDisabledFacet"));
+ Assert.assertTrue(selenium.isElementPresent(orderingListId + ":upControlFacet"));
+ Assert.assertTrue(selenium.isElementPresent(orderingListId + ":upControlDisabledFacet"));
+ Assert.assertTrue(selenium.isElementPresent(orderingListId + ":downControlFacet"));
+ Assert.assertTrue(selenium.isElementPresent(orderingListId + ":downControlDisabledFacet"));
+ _checkVisibility(false);
+ }
+
+ /**
* check internationalization
*/
@Test
17 years, 1 month
JBoss Rich Faces SVN: r11363 - trunk/test-applications/jsp/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-11-25 09:35:26 -0500 (Tue, 25 Nov 2008)
New Revision: 11363
Modified:
trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Calendar.xml
Log:
Modified: trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Calendar.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Calendar.xml 2008-11-25 14:34:17 UTC (rev 11362)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Calendar.xml 2008-11-25 14:35:26 UTC (rev 11363)
@@ -16,4 +16,15 @@
<validator-id>org.richfaces.CalendarValidator</validator-id>
<validator-class>calendar.CalendarValidator</validator-class>
</validator>
+ <application>
+ <locale-config>
+ <default-locale>en_US</default-locale>
+ <supported-locale>en_US</supported-locale>
+ <supported-locale>ru_RU</supported-locale>
+ <supported-locale>en</supported-locale>
+ <supported-locale>de</supported-locale>
+ <supported-locale>fr</supported-locale>
+ <supported-locale>es</supported-locale>
+ </locale-config>
+</application>
</faces-config>
17 years, 1 month
JBoss Rich Faces SVN: r11362 - trunk/test-applications/jsp/src/main/webapp/Queue.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-11-25 09:34:17 -0500 (Tue, 25 Nov 2008)
New Revision: 11362
Modified:
trunk/test-applications/jsp/src/main/webapp/Queue/QueueStraightforward.jsp
Log:
Modified: trunk/test-applications/jsp/src/main/webapp/Queue/QueueStraightforward.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Queue/QueueStraightforward.jsp 2008-11-25 14:34:01 UTC (rev 11361)
+++ trunk/test-applications/jsp/src/main/webapp/Queue/QueueStraightforward.jsp 2008-11-25 14:34:17 UTC (rev 11362)
@@ -53,8 +53,7 @@
eventsQueue="#{queueComponent.dataScrollerQueue}"
fastControls="#{dataScroller.fastControls}"
action="#{dataScroller.act}"
- actionListener="#{dataScroller.actListener}"
- maxPages="10"
+ actionListener="#{dataScroller.actListener}" maxPages="10"
scrollerListener="#{dataScroller.ScrollerListener}">
</rich:datascroller>
@@ -67,26 +66,81 @@
<h:selectOneRadio value="#{queueComponent.radioValue}">
<a4j:support id="radioSupport" event="onblur"
eventsQueue="#{queueComponent.radioQueue}"></a4j:support>
- <f:selectItems value="#{queueComponent.queues}"/>
+ <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>
-
+ <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>
17 years, 1 month
JBoss Rich Faces SVN: r11361 - trunk/test-applications/jsp/src/main/webapp/pages/Rich.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-11-25 09:34:01 -0500 (Tue, 25 Nov 2008)
New Revision: 11361
Modified:
trunk/test-applications/jsp/src/main/webapp/pages/Rich/Rich.jsp
Log:
add 3 ajax queues
Modified: trunk/test-applications/jsp/src/main/webapp/pages/Rich/Rich.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/pages/Rich/Rich.jsp 2008-11-25 14:33:31 UTC (rev 11360)
+++ trunk/test-applications/jsp/src/main/webapp/pages/Rich/Rich.jsp 2008-11-25 14:34:01 UTC (rev 11361)
@@ -26,6 +26,9 @@
<link rel="stylesheet" href="<%=request.getContextPath()%>/styles/styles.css" 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">
<jsp:include page="/pages/RichMenu/RichMenu.jsp"/>
17 years, 1 month