JBoss Rich Faces SVN: r18284 - in root: examples-sandbox/trunk/components/inputnumberslider-demo/src/main/webapp and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-07-29 13:07:39 -0400 (Thu, 29 Jul 2010)
New Revision: 18284
Modified:
root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java
root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/webapp/index.xhtml
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/config/faces-config.xml
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/templates/inputnumberslider.template.xml
Log:
RF-8983
Modified: root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java
===================================================================
--- root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java 2010-07-29 16:16:36 UTC (rev 18283)
+++ root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java 2010-07-29 17:07:39 UTC (rev 18284)
@@ -29,6 +29,7 @@
public class Bean {
private int value;
+ private String accesskey;
public void setValue(int value) {
this.value = value;
@@ -37,4 +38,12 @@
public int getValue() {
return value;
}
+
+ public void setAccesskey(String accesskey) {
+ this.accesskey = accesskey;
+ }
+
+ public String getAccesskey() {
+ return accesskey;
+ }
}
Modified: root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/webapp/index.xhtml
===================================================================
--- root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/webapp/index.xhtml 2010-07-29 16:16:36 UTC (rev 18283)
+++ root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/webapp/index.xhtml 2010-07-29 17:07:39 UTC (rev 18284)
@@ -34,8 +34,12 @@
</h:head>
<h:body>
<h:form id="form">
- <ins:inputnumberslider value="#{bean.value}" />
- <h:outputText value="#{bean.value}" />
+ <ins:inputnumberslider id="ins" value="#{bean.value}" accesskey="#{bean.accesskey}"/>
+ <br />
+ <h:outputText value="Accesskey : "/>
+ <h:inputText value="#{bean.accesskey}">
+ <f:ajax render="ins"/>
+ </h:inputText>
</h:form>
</h:body>
</html>
Modified: root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/config/faces-config.xml
===================================================================
--- root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/config/faces-config.xml 2010-07-29 16:16:36 UTC (rev 18283)
+++ root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/config/faces-config.xml 2010-07-29 17:07:39 UTC (rev 18284)
@@ -30,6 +30,13 @@
<component>
<component-type>org.richfaces.InputNumberSlider</component-type>
<component-class>org.richfaces.component.HTMLInputNumberSlider</component-class>
+ <property>
+ <property-name>accesskey</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ </property-extension>
+ </property>
<component-extension>
<cdk:generate>true</cdk:generate>
<cdk:base-class>javax.faces.component.UIInput</cdk:base-class>
Modified: root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/templates/inputnumberslider.template.xml
===================================================================
--- root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/templates/inputnumberslider.template.xml 2010-07-29 16:16:36 UTC (rev 18283)
+++ root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/templates/inputnumberslider.template.xml 2010-07-29 17:07:39 UTC (rev 18284)
@@ -50,7 +50,7 @@
</span>
<a class="rf-ins-ib" href="javascript:void(0);" />
<input name="#{clientId}" type="text" class="rf-ins-i" size="3"
- value="#{getInputValue(facesContext, component)}" />
+ value="#{getInputValue(facesContext, component)}" accesskey="#{component.attributes['accesskey']}"/>
<span class="rf-ins-tt">#{getInputValue(facesContext, component)}</span>
<script type="text/javascript">new RichFaces.ui.InputNumberSlider('#{clientId}');</script>
</span>
14 years, 4 months
JBoss Rich Faces SVN: r18283 - root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-07-29 12:16:36 -0400 (Thu, 29 Jul 2010)
New Revision: 18283
Modified:
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js
Log:
https://jira.jboss.org/browse/RF-8875
tokens fixes
Modified: root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js 2010-07-29 16:13:37 UTC (rev 18282)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js 2010-07-29 16:16:36 UTC (rev 18283)
@@ -89,7 +89,7 @@
var defaultOptions = {
selectedItemClass:'cb_select',
- autoFill:false,
+ autoFill:true,
minChars:1,
selectFirst:true,
ajaxMode:true,
@@ -121,6 +121,7 @@
var escapedTokens = this.options.tokens.split('').join("\\");
REGEXP_TOKEN_LEFT = new RegExp('[^'+escapedTokens+']+$','i');
REGEXP_TOKEN_RIGHT = new RegExp('['+escapedTokens+']','i');
+ this.hasSpaceToken = this.options.tokens.indexOf(' ')!=-1;
};
};
@@ -139,7 +140,7 @@
selectItem.call(this, index);
}
} else {
- this.__changeValue(event, getSelectedItemValue.call(this));
+ this.__onChangeValue(event, getSelectedItemValue.call(this));
rf.Selection.setCaretTo(rf.getDomElement(this.fieldId));
this.hide(event);
}
@@ -174,7 +175,8 @@
var field = rf.getDomElement(this.fieldId);
var start = rf.Selection.getStart(field);
this.setInputValue(inputValue + value.substring(inputValue.length));
- rf.Selection.set(field, start, field.value.length);
+ var end = start+value.length - inputValue.length;
+ rf.Selection.set(field, start, end);
}
};
@@ -203,10 +205,6 @@
rf.ajax(this.id, event, {parameters: params, error: ajaxError, complete:ajaxSuccess});
};
- /*
- * public API functions definition
- */
-
var selectItem = function(index, isOffset, noAutoFill) {
if (this.items.length==0) return;
@@ -240,7 +238,7 @@
!noAutoFill && autoFill.call(this, this.value, getSelectedItemValue.call(this));
};
- var changeValue = function (event, value) {
+ var onChangeValue = function (event, value) {
selectItem.call(this);
// value is undefined if called from AutoCompleteBase onChange
@@ -278,6 +276,7 @@
};
var getSubValue = function () {
+ //TODO: add posibility to use space chars before and after tokens if space not a token char
if (this.useTokens) {
var field = rf.getDomElement(this.fieldId);
var value = field.value;
@@ -302,16 +301,21 @@
var updateInputValue = function (value) {
var field = rf.getDomElement(this.fieldId);
var inputValue = field.value;
+
var cursorPosition = rf.Selection.getStart(field);
var beforeCursorStr = inputValue.substring(0, cursorPosition);
var afterCursorStr = inputValue.substring(cursorPosition);
+
var pos = beforeCursorStr.search(REGEXP_TOKEN_LEFT);
var startPos = pos!=-1 ? pos : 0;
pos = afterCursorStr.search(REGEXP_TOKEN_RIGHT);
var endPos = pos!=-1 ? pos : inputValue.length;
+
+ var beginNewValue = inputValue.substring(0, startPos) + value;
+ cursorPosition = beginNewValue.length;
+ field.value = beginNewValue + afterCursorStr.substring(endPos);
field.focus();
- field.value = inputValue.substring(0, startPos) + value + afterCursorStr.substring(endPos);
- rf.Selection.setCaretTo(field, cursorPosition+endPos);
+ rf.Selection.setCaretTo(field, cursorPosition);
return field.value;
};
@@ -327,7 +331,6 @@
/*
* Protected methods
*/
- __changeValue: changeValue,
__updateState: function () {
var subValue = this.__getSubValue();
// called from onShow method, not actually value changed
@@ -344,6 +347,7 @@
return $super.__updateInputValue.call(this, value);
}
},
+ __onChangeValue: onChangeValue,
/*
* Override abstract protected methods
*/
@@ -362,10 +366,10 @@
__onBeforeShow: function (event) {
},
__onEnter: function (event) {
- this.__changeValue(event, getSelectedItemValue.call(this));
- rf.getDomElement(this.fieldId).blur();
- rf.Selection.setCaretTo(rf.getDomElement(this.fieldId));
- rf.getDomElement(this.fieldId).focus();
+ this.__onChangeValue(event, getSelectedItemValue.call(this));
+ //rf.getDomElement(this.fieldId).blur();
+ //rf.Selection.setCaretTo(rf.getDomElement(this.fieldId));
+ //rf.getDomElement(this.fieldId).focus();
},
__onShow: function (event) {
if (event.which != rf.KEYS.BACKSPACE && this.items && this.items.length>0) {
Modified: root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js 2010-07-29 16:13:37 UTC (rev 18282)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js 2010-07-29 16:16:36 UTC (rev 18283)
@@ -133,9 +133,10 @@
var value = this.getInputValue();
var flag = value != this.currentValue;
//TODO: is it needed to chesk keys?
+ //TODO: we need to set value when autoFill used when LEFT or RIGHT was pressed
if (event.which == rf.KEYS.LEFT || event.which == rf.KEYS.RIGHT || flag) {
if (flag) {
- this.__changeValue(event);
+ this.__onChangeValue(event);
onShow.call(this, event);
}
}
@@ -176,15 +177,11 @@
break;
case rf.KEYS.TAB:
case rf.KEYS.RETURN:
- //TODO draft code, merge with code from combobox.js
+
event.preventDefault();
this.__onEnter(event);
- /*if( selectCurrentItem() ) {
- event.preventDefault();
- //TODO: bind form submit event handler to cancel form submit under the opera
- //cancelSubmit = true;
- return false;
- }*/
+ //TODO: bind form submit event handler to cancel form submit under the opera
+ //cancelSubmit = true;
this.hide();
return false;
break;
@@ -267,6 +264,8 @@
/*
* abstract protected methods
*/
+ __onChangeValue: function (event) {
+ },
__onKeyUp: function () {
},
__onKeyDown: function () {
14 years, 4 months
JBoss Rich Faces SVN: r18282 - in root/ui-sandbox/inputs/trunk/inputnumberslider/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-07-29 12:13:37 -0400 (Thu, 29 Jul 2010)
New Revision: 18282
Modified:
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.js
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/templates/inputnumberslider.template.xml
Log:
RF-8983
Modified: root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.js
===================================================================
--- root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.js 2010-07-29 15:18:41 UTC (rev 18281)
+++ root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.js 2010-07-29 16:13:37 UTC (rev 18282)
@@ -31,14 +31,13 @@
step: 5,
init: function (id) {
-
this.range = this.maxValue - this.minValue;
this.id = id;
this.element = jQuery(this.attachToDom());
- this.input = this.element.find(".rf-ins-i");
- this.track = this.element.find(".rf-ins-t");
- this.handle = this.element.find(".rf-ins-h");
- this.tooltip = this.element.find(".rf-ins-tt");
+ this.input = this.element.children(".rf-ins-i");
+ this.track = this.element.children(".rf-ins-ta").children(".rf-ins-t");
+ this.handle = this.track.children(".rf-ins-h");
+ this.tooltip = this.element.children(".rf-ins-tt");
this.track[0].tabIndex = 0;
this.handle.css("margin-left", this.input.val() * (this.track.width() - this.handle.width()) / this.range);
@@ -47,8 +46,8 @@
this.input.change(proxy);
this.input.submit(proxy);
this.track.keydown(jQuery.proxy(this.__keydownHandler, this));
- this.element.find(".rf-ins-db").mousedown(jQuery.proxy(this.__decreaseHandler, this));
- this.element.find(".rf-ins-ib").mousedown(jQuery.proxy(this.__increaseHandler, this));
+ this.element.children(".rf-ins-db").mousedown(jQuery.proxy(this.__decreaseHandler, this));
+ this.element.children(".rf-ins-ib").mousedown(jQuery.proxy(this.__increaseHandler, this));
this.track.mousedown(jQuery.proxy(this.__mousedownHandler, this));
},
Modified: root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/templates/inputnumberslider.template.xml
===================================================================
--- root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/templates/inputnumberslider.template.xml 2010-07-29 15:18:41 UTC (rev 18281)
+++ root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/templates/inputnumberslider.template.xml 2010-07-29 16:13:37 UTC (rev 18282)
@@ -40,7 +40,7 @@
</cc:interface>
<cc:implementation>
<span id="#{clientId}" class="rf-ins">
- <a class="rf-ins-db" href="#" />
+ <a class="rf-ins-db" href="javascript:void(0);" />
<span class="rf-ins-ta">
<span class="rf-ins-mn">0</span>
<span class="rf-ins-mx">100</span>
@@ -48,7 +48,7 @@
<span class="rf-ins-h" />
</span>
</span>
- <a class="rf-ins-ib" href="#" />
+ <a class="rf-ins-ib" href="javascript:void(0);" />
<input name="#{clientId}" type="text" class="rf-ins-i" size="3"
value="#{getInputValue(facesContext, component)}" />
<span class="rf-ins-tt">#{getInputValue(facesContext, component)}</span>
14 years, 4 months
JBoss Rich Faces SVN: r18281 - in root/ui-sandbox/inputs/trunk/combobox/src/main: resources/META-INF/resources/org.richfaces and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-07-29 11:18:41 -0400 (Thu, 29 Jul 2010)
New Revision: 18281
Modified:
root/ui-sandbox/inputs/trunk/combobox/src/main/java/org/richfaces/renderkit/ComboBoxRendererBase.java
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js
root/ui-sandbox/inputs/trunk/combobox/src/main/templates/comboBox.template.xml
Log:
https://jira.jboss.org/browse/RF-8875
tokens was added
some fixes
Modified: root/ui-sandbox/inputs/trunk/combobox/src/main/java/org/richfaces/renderkit/ComboBoxRendererBase.java
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/java/org/richfaces/renderkit/ComboBoxRendererBase.java 2010-07-29 12:56:25 UTC (rev 18280)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/java/org/richfaces/renderkit/ComboBoxRendererBase.java 2010-07-29 15:18:41 UTC (rev 18281)
@@ -71,7 +71,9 @@
MethodExpression autocompleteMethod = component.getAutocompleteMethod();
if (autocompleteMethod != null) {
try {
- String value = getInputValue(facesContext, component);
+ //String value = getInputValue(facesContext, component);
+ Map<String, String> requestParameters = facesContext.getExternalContext().getRequestParameterMap();
+ String value = requestParameters.get(component.getClientId(facesContext) + "Value");
itemsObject = autocompleteMethod.invoke(facesContext.getELContext(),
new Object[] {facesContext, component, value});
} catch (ELException e) {
Modified: root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js 2010-07-29 12:56:25 UTC (rev 18280)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js 2010-07-29 15:18:41 UTC (rev 18281)
@@ -73,9 +73,10 @@
$super.constructor.call(this, componentId, componentId+ID.SELECT, fieldId, options);
this.attachToDom(componentId);
this.options = $.extend(this.options, defaultOptions, options);
- this.inputValue = this.getInputValue();
+ this.value = this.__getSubValue();
this.index = -1;
this.isFirstAjax = true;
+ updateTokenOptions.call(this);
bindEventHandlers.call(this);
updateItemsList.call(this, "");
};
@@ -88,20 +89,23 @@
var defaultOptions = {
selectedItemClass:'cb_select',
- autoFill:true,
+ autoFill:false,
minChars:1,
selectFirst:true,
ajaxMode:true,
- attachToBody:true,
- tokens: ", "
+ tokens: ",",
+ attachToBody:true
};
var ID = {
SELECT:'List',
- ITEMS:'Items'
+ ITEMS:'Items',
+ VALUE:'Value'
};
var REGEXP_TRIM = /^[\n\s]*(.*)[\n\s]*$/;
+ var REGEXP_TOKEN_LEFT;
+ var REGEXP_TOKEN_RIGHT;
var getData = function (nodeList) {
var data = [];
@@ -110,6 +114,15 @@
});
return data;
}
+
+ var updateTokenOptions = function () {
+ this.useTokens = (typeof this.options.tokens == "string" && this.options.tokens.length>0);
+ if (this.useTokens) {
+ var escapedTokens = this.options.tokens.split('').join("\\");
+ REGEXP_TOKEN_LEFT = new RegExp('[^'+escapedTokens+']+$','i');
+ REGEXP_TOKEN_RIGHT = new RegExp('['+escapedTokens+']','i');
+ };
+ };
var bindEventHandlers = function () {
rf.Event.bind(rf.getDomElement(this.id+ID.ITEMS).parentNode, "click"+this.namespace+" mouseover"+this.namespace, onMouseAction, this);
@@ -165,13 +178,14 @@
}
};
- var callAjax = function(event) {
+ var callAjax = function(event, value) {
$(rf.getDomElement(this.id+ID.ITEMS)).removeData().empty();
+ rf.getDomElement(this.id+ID.VALUE).value = value;
var _this = this;
var ajaxSuccess = function (event) {
- updateItemsList.call(_this, _this.inputValue, event.componentData && event.componentData[_this.id]);
+ updateItemsList.call(_this, _this.value, event.componentData && event.componentData[_this.id]);
if (_this.isVisible && _this.options.selectFirst) {
selectItem.call(_this, 0);
}
@@ -223,36 +237,35 @@
var item = this.items.eq(this.index);
item.addClass(this.options.selectedItemClass);
scrollToSelectedItem.call(this);
- !noAutoFill && autoFill.call(this, this.inputValue, getSelectedItemValue.call(this));
+ !noAutoFill && autoFill.call(this, this.value, getSelectedItemValue.call(this));
};
var changeValue = function (event, value) {
selectItem.call(this);
- if (typeof value == "undefined") {
- // called from show method, not actually value changed
- if (this.items.length==0 && this.inputValue.length>=this.options.minChars && this.isFirstAjax) {
- this.options.ajaxMode && callAjax.call(this, event);
- }
- return;
- }
+ // value is undefined if called from AutoCompleteBase onChange
+ var subValue = (typeof value == "undefined") ? this.__getSubValue() : value;
// TODO: ajax call here if needed
- if ((!this.cache || value.toLowerCase().indexOf(this.cache.key.toLowerCase())!=0 || this.inputValue.length==0) &&
- value.length>=this.options.minChars) {
- this.inputValue = value;
- this.options.ajaxMode && callAjax.call(this, event);
+ if ((!this.cache || subValue.length==0 || subValue.toLowerCase().indexOf(this.cache.key.toLowerCase())!=0) &&
+ subValue.length>=this.options.minChars) {
+ this.value = subValue;
+ this.options.ajaxMode && callAjax.call(this, event, subValue);
return;
}
- var newItems = this.cache.getItems(value);
+ var newItems = this.cache.getItems(subValue);
this.items = $(newItems);
//TODO: works only with simple markup, not with <tr>
$(rf.getDomElement(this.id+ID.ITEMS)).empty().append(newItems);
this.index = -1;
- this.inputValue = value;
+ this.value = subValue;
if (this.options.selectFirst) {
- selectItem.call(this, 0, false, event.which == rf.KEYS.BACKSPACE);
+ if (event.which == rf.KEYS.RETURN || event.type == "click") {
+ this.setInputValue(subValue);
+ } else {
+ selectItem.call(this, 0, false, event.which == rf.KEYS.BACKSPACE);
+ }
}
};
@@ -263,6 +276,45 @@
}
return undefined;
};
+
+ var getSubValue = function () {
+ if (this.useTokens) {
+ var field = rf.getDomElement(this.fieldId);
+ var value = field.value;
+ var cursorPosition = rf.Selection.getStart(field);
+ var beforeCursorStr = value.substring(0, cursorPosition);
+ var afterCursorStr = value.substring(cursorPosition);
+ var r = REGEXP_TOKEN_LEFT.exec(beforeCursorStr);
+ var result = "";
+ if (r) {
+ result = r[0];
+ }
+ r = afterCursorStr.search(REGEXP_TOKEN_RIGHT);
+ if (r==-1) r = afterCursorStr.length;
+ result += afterCursorStr.substring(0, r);
+
+ return result;
+ } else {
+ return this.getInputValue();
+ }
+ };
+
+ var updateInputValue = function (value) {
+ var field = rf.getDomElement(this.fieldId);
+ var inputValue = field.value;
+ var cursorPosition = rf.Selection.getStart(field);
+ var beforeCursorStr = inputValue.substring(0, cursorPosition);
+ var afterCursorStr = inputValue.substring(cursorPosition);
+ var pos = beforeCursorStr.search(REGEXP_TOKEN_LEFT);
+ var startPos = pos!=-1 ? pos : 0;
+ pos = afterCursorStr.search(REGEXP_TOKEN_RIGHT);
+ var endPos = pos!=-1 ? pos : inputValue.length;
+ field.focus();
+ field.value = inputValue.substring(0, startPos) + value + afterCursorStr.substring(endPos);
+ rf.Selection.setCaretTo(field, cursorPosition+endPos);
+ return field.value;
+ };
+
/*
* Prototype definition
*/
@@ -276,6 +328,22 @@
* Protected methods
*/
__changeValue: changeValue,
+ __updateState: function () {
+ var subValue = this.__getSubValue();
+ // called from onShow method, not actually value changed
+ if (this.items.length==0 && subValue.length>=this.options.minChars && this.isFirstAjax) {
+ this.options.ajaxMode && callAjax.call(this, event, subValue);
+ }
+ return;
+ },
+ __getSubValue: getSubValue,
+ __updateInputValue: function (value) {
+ if (this.useTokens) {
+ return updateInputValue.call(this, value);
+ } else {
+ return $super.__updateInputValue.call(this, value);
+ }
+ },
/*
* Override abstract protected methods
*/
@@ -300,8 +368,7 @@
rf.getDomElement(this.fieldId).focus();
},
__onShow: function (event) {
- if (this.items && this.items.length>0) {
- //??TODO it's nessesary only if not changed value
+ if (event.which != rf.KEYS.BACKSPACE && this.items && this.items.length>0) {
if (this.index!=0 && this.options.selectFirst) {
selectItem.call(this, 0);
}
Modified: root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js 2010-07-29 12:56:25 UTC (rev 18280)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js 2010-07-29 15:18:41 UTC (rev 18281)
@@ -107,7 +107,6 @@
this.hide(event);
} else {
onShow.call(this, event);
- //rf.getDomElement(this.fieldId).focus();
}
};
@@ -136,14 +135,14 @@
//TODO: is it needed to chesk keys?
if (event.which == rf.KEYS.LEFT || event.which == rf.KEYS.RIGHT || flag) {
if (flag) {
- this.__changeValue(event, value);
- onShow.call(this, event, true);
+ this.__changeValue(event);
+ onShow.call(this, event);
}
}
};
- var onShow = function (event, noChangeValue) {
- !noChangeValue && this.__changeValue(event);
+ var onShow = function (event) {
+ this.__updateState(event);
this.show(event);
};
@@ -249,7 +248,7 @@
return this.namespace;
},
getInputValue: function () {
- return this.fieldId ? rf.getDomElement(this.fieldId).value : undefined;
+ return this.fieldId ? rf.getDomElement(this.fieldId).value : "";
},
setInputValue: function (value) {
this.currentValue = this.__updateInputValue(value);
Modified: root/ui-sandbox/inputs/trunk/combobox/src/main/templates/comboBox.template.xml
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/templates/comboBox.template.xml 2010-07-29 12:56:25 UTC (rev 18280)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/templates/comboBox.template.xml 2010-07-29 15:18:41 UTC (rev 18281)
@@ -15,6 +15,7 @@
<cc:implementation>
<div id="#{clientId}" class="cb_field_width cb_field">
+ <input id="#{clientId}Value" name="#{clientId}Value" type="hidden" class="cb_font cb_input" />
<div style="position : relative; overflow : hidden; text-align : left; padding-right : 21px;">
<input id="#{clientId}Input" name="#{clientId}" type="text" class="cb_font cb_input" />
<div id="#{clientId}Button" class="cb_button">
14 years, 4 months
JBoss Rich Faces SVN: r18280 - in root/tests/metamer/trunk/application/src/main/webapp/components: richList and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-07-29 08:56:25 -0400 (Thu, 29 Jul 2010)
New Revision: 18280
Modified:
root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/a4jRepeat.xhtml
root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/hGraphicImage.xhtml
root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/hSelectBooleanCheckbox.xhtml
root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/scroller.xhtml
root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/simple.xhtml
root/tests/metamer/trunk/application/src/main/webapp/components/richList/simple.xhtml
root/tests/metamer/trunk/application/src/main/webapp/components/richPanel/customLook.xhtml
root/tests/metamer/trunk/application/src/main/webapp/components/richPanel/nested.xhtml
root/tests/metamer/trunk/application/src/main/webapp/components/richPanel/simple.xhtml
Log:
* namespaces fixed
Modified: root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/a4jRepeat.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/a4jRepeat.xhtml 2010-07-29 12:48:48 UTC (rev 18279)
+++ root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/a4jRepeat.xhtml 2010-07-29 12:56:25 UTC (rev 18280)
@@ -23,8 +23,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
- xmlns:ta="http://java.sun.com/jsf/composite/testapp" xmlns:rich="http://richfaces.org/rich"
- xmlns:it="http://richfaces.org/iteration">
+ xmlns:ta="http://java.sun.com/jsf/composite/testapp" xmlns:rich="http://richfaces.org/rich">
<ui:composition template="/templates/template.xhtml">
@@ -35,9 +34,6 @@
</f:viewParam>
</f:metadata>
<h:outputStylesheet library="css" name="richDataGrid.css"/>
-
- <!-- why is this needed? -->
- <f:view contentType="text/html" />
</ui:define>
<ui:define name="outOfTemplateBefore">
@@ -51,28 +47,28 @@
</ui:define>
<ui:define name="component">
- <it:dataGrid id="richDataGrid"
- captionFacet="#{richDataGridBean.attributes['captionFacet'].value}"
- columns="#{richDataGridBean.attributes['columns'].value}"
- elements="#{richDataGridBean.attributes['elements'].value}"
- first="#{richDataGridBean.attributes['first'].value}"
- footerFacet="#{richDataGridBean.attributes['footerFacet'].value}"
- headerFacet="#{richDataGridBean.attributes['headerFacet'].value}"
- iterationState="#{richDataGridBean.attributes['iterationState'].value}"
- iterationStatusVar="#{richDataGridBean.attributes['iterationStatusVar'].value}"
- keepSaved="#{richDataGridBean.attributes['keepSaved'].value}"
- noDataFacet="#{richDataGridBean.attributes['noDataFacet'].value}"
- relativeRowIndex="#{richDataGridBean.attributes['relativeRowIndex'].value}"
- rendered="#{richDataGridBean.attributes['rendered'].value}"
- rowAvailable="#{richDataGridBean.attributes['rowAvailable'].value}"
- rowCount="#{richDataGridBean.attributes['rowCount'].value}"
- rowData="#{richDataGridBean.attributes['rowData'].value}"
- rowIndex="#{richDataGridBean.attributes['rowIndex'].value}"
- rowKey="#{richDataGridBean.attributes['rowKey'].value}"
- rowKeyConverter="#{richDataGridBean.attributes['rowKeyConverter'].value}"
- rows="#{richDataGridBean.attributes['rows'].value}"
- value="#{richDataGridBean.state ? model.employees : null}"
- var="record">
+ <rich:dataGrid id="richDataGrid"
+ captionFacet="#{richDataGridBean.attributes['captionFacet'].value}"
+ columns="#{richDataGridBean.attributes['columns'].value}"
+ elements="#{richDataGridBean.attributes['elements'].value}"
+ first="#{richDataGridBean.attributes['first'].value}"
+ footerFacet="#{richDataGridBean.attributes['footerFacet'].value}"
+ headerFacet="#{richDataGridBean.attributes['headerFacet'].value}"
+ iterationState="#{richDataGridBean.attributes['iterationState'].value}"
+ iterationStatusVar="#{richDataGridBean.attributes['iterationStatusVar'].value}"
+ keepSaved="#{richDataGridBean.attributes['keepSaved'].value}"
+ noDataFacet="#{richDataGridBean.attributes['noDataFacet'].value}"
+ relativeRowIndex="#{richDataGridBean.attributes['relativeRowIndex'].value}"
+ rendered="#{richDataGridBean.attributes['rendered'].value}"
+ rowAvailable="#{richDataGridBean.attributes['rowAvailable'].value}"
+ rowCount="#{richDataGridBean.attributes['rowCount'].value}"
+ rowData="#{richDataGridBean.attributes['rowData'].value}"
+ rowIndex="#{richDataGridBean.attributes['rowIndex'].value}"
+ rowKey="#{richDataGridBean.attributes['rowKey'].value}"
+ rowKeyConverter="#{richDataGridBean.attributes['rowKeyConverter'].value}"
+ rows="#{richDataGridBean.attributes['rows'].value}"
+ value="#{richDataGridBean.state ? model.employees : null}"
+ var="record">
<f:facet name="noData">
<h:outputText value="There is no data." style="color: red;"/>
@@ -96,9 +92,8 @@
<f:facet name="footer">
<rich:dataScroller id="scroller2" for="richDataGrid" page="#{richDataGridBean.page}" maxPages="7" render="richDataGrid" />
</f:facet>
- </it:dataGrid>
+ </rich:dataGrid>
-
</ui:define>
<ui:define name="outOfTemplateAfter">
Modified: root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/hGraphicImage.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/hGraphicImage.xhtml 2010-07-29 12:48:48 UTC (rev 18279)
+++ root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/hGraphicImage.xhtml 2010-07-29 12:56:25 UTC (rev 18280)
@@ -23,8 +23,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
- xmlns:ta="http://java.sun.com/jsf/composite/testapp" xmlns:rich="http://richfaces.org/rich"
- xmlns:it="http://richfaces.org/iteration">
+ xmlns:ta="http://java.sun.com/jsf/composite/testapp" xmlns:rich="http://richfaces.org/rich">
<ui:composition template="/templates/template.xhtml">
@@ -35,9 +34,6 @@
</f:viewParam>
</f:metadata>
<h:outputStylesheet library="css" name="richDataGrid.css"/>
-
- <!-- why is this needed? -->
- <f:view contentType="text/html" />
</ui:define>
<ui:define name="outOfTemplateBefore">
@@ -51,28 +47,28 @@
</ui:define>
<ui:define name="component">
- <it:dataGrid id="richDataGrid"
- captionFacet="#{richDataGridBean.attributes['captionFacet'].value}"
- columns="#{richDataGridBean.attributes['columns'].value}"
- elements="#{richDataGridBean.attributes['elements'].value}"
- first="#{richDataGridBean.attributes['first'].value}"
- footerFacet="#{richDataGridBean.attributes['footerFacet'].value}"
- headerFacet="#{richDataGridBean.attributes['headerFacet'].value}"
- iterationState="#{richDataGridBean.attributes['iterationState'].value}"
- iterationStatusVar="#{richDataGridBean.attributes['iterationStatusVar'].value}"
- keepSaved="#{richDataGridBean.attributes['keepSaved'].value}"
- noDataFacet="#{richDataGridBean.attributes['noDataFacet'].value}"
- relativeRowIndex="#{richDataGridBean.attributes['relativeRowIndex'].value}"
- rendered="#{richDataGridBean.attributes['rendered'].value}"
- rowAvailable="#{richDataGridBean.attributes['rowAvailable'].value}"
- rowCount="#{richDataGridBean.attributes['rowCount'].value}"
- rowData="#{richDataGridBean.attributes['rowData'].value}"
- rowIndex="#{richDataGridBean.attributes['rowIndex'].value}"
- rowKey="#{richDataGridBean.attributes['rowKey'].value}"
- rowKeyConverter="#{richDataGridBean.attributes['rowKeyConverter'].value}"
- rows="#{richDataGridBean.attributes['rows'].value}"
- value="#{richDataGridBean.state ? model.employees : null}"
- var="record">
+ <rich:dataGrid id="richDataGrid"
+ captionFacet="#{richDataGridBean.attributes['captionFacet'].value}"
+ columns="#{richDataGridBean.attributes['columns'].value}"
+ elements="#{richDataGridBean.attributes['elements'].value}"
+ first="#{richDataGridBean.attributes['first'].value}"
+ footerFacet="#{richDataGridBean.attributes['footerFacet'].value}"
+ headerFacet="#{richDataGridBean.attributes['headerFacet'].value}"
+ iterationState="#{richDataGridBean.attributes['iterationState'].value}"
+ iterationStatusVar="#{richDataGridBean.attributes['iterationStatusVar'].value}"
+ keepSaved="#{richDataGridBean.attributes['keepSaved'].value}"
+ noDataFacet="#{richDataGridBean.attributes['noDataFacet'].value}"
+ relativeRowIndex="#{richDataGridBean.attributes['relativeRowIndex'].value}"
+ rendered="#{richDataGridBean.attributes['rendered'].value}"
+ rowAvailable="#{richDataGridBean.attributes['rowAvailable'].value}"
+ rowCount="#{richDataGridBean.attributes['rowCount'].value}"
+ rowData="#{richDataGridBean.attributes['rowData'].value}"
+ rowIndex="#{richDataGridBean.attributes['rowIndex'].value}"
+ rowKey="#{richDataGridBean.attributes['rowKey'].value}"
+ rowKeyConverter="#{richDataGridBean.attributes['rowKeyConverter'].value}"
+ rows="#{richDataGridBean.attributes['rows'].value}"
+ value="#{richDataGridBean.state ? model.employees : null}"
+ var="record">
<f:facet name="noData">
<h:outputText value="There is no data." style="color: red;"/>
@@ -93,7 +89,7 @@
<f:facet name="footer">
<rich:dataScroller id="scroller2" for="richDataGrid" page="#{richDataGridBean.page}" maxPages="7" render="richDataGrid" />
</f:facet>
- </it:dataGrid>
+ </rich:dataGrid>
</ui:define>
Modified: root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/hSelectBooleanCheckbox.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/hSelectBooleanCheckbox.xhtml 2010-07-29 12:48:48 UTC (rev 18279)
+++ root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/hSelectBooleanCheckbox.xhtml 2010-07-29 12:56:25 UTC (rev 18280)
@@ -23,8 +23,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
- xmlns:ta="http://java.sun.com/jsf/composite/testapp" xmlns:rich="http://richfaces.org/rich"
- xmlns:it="http://richfaces.org/iteration">
+ xmlns:ta="http://java.sun.com/jsf/composite/testapp" xmlns:rich="http://richfaces.org/rich">
<ui:composition template="/templates/template.xhtml">
@@ -35,9 +34,6 @@
</f:viewParam>
</f:metadata>
<h:outputStylesheet library="css" name="richDataGrid.css"/>
-
- <!-- why is this needed? -->
- <f:view contentType="text/html" />
</ui:define>
<ui:define name="outOfTemplateBefore">
@@ -51,28 +47,28 @@
</ui:define>
<ui:define name="component">
- <it:dataGrid id="richDataGrid"
- captionFacet="#{richDataGridBean.attributes['captionFacet'].value}"
- columns="#{richDataGridBean.attributes['columns'].value}"
- elements="#{richDataGridBean.attributes['elements'].value}"
- first="#{richDataGridBean.attributes['first'].value}"
- footerFacet="#{richDataGridBean.attributes['footerFacet'].value}"
- headerFacet="#{richDataGridBean.attributes['headerFacet'].value}"
- iterationState="#{richDataGridBean.attributes['iterationState'].value}"
- iterationStatusVar="#{richDataGridBean.attributes['iterationStatusVar'].value}"
- keepSaved="#{richDataGridBean.attributes['keepSaved'].value}"
- noDataFacet="#{richDataGridBean.attributes['noDataFacet'].value}"
- relativeRowIndex="#{richDataGridBean.attributes['relativeRowIndex'].value}"
- rendered="#{richDataGridBean.attributes['rendered'].value}"
- rowAvailable="#{richDataGridBean.attributes['rowAvailable'].value}"
- rowCount="#{richDataGridBean.attributes['rowCount'].value}"
- rowData="#{richDataGridBean.attributes['rowData'].value}"
- rowIndex="#{richDataGridBean.attributes['rowIndex'].value}"
- rowKey="#{richDataGridBean.attributes['rowKey'].value}"
- rowKeyConverter="#{richDataGridBean.attributes['rowKeyConverter'].value}"
- rows="#{richDataGridBean.attributes['rows'].value}"
- value="#{richDataGridBean.state ? model.employees : null}"
- var="record">
+ <rich:dataGrid id="richDataGrid"
+ captionFacet="#{richDataGridBean.attributes['captionFacet'].value}"
+ columns="#{richDataGridBean.attributes['columns'].value}"
+ elements="#{richDataGridBean.attributes['elements'].value}"
+ first="#{richDataGridBean.attributes['first'].value}"
+ footerFacet="#{richDataGridBean.attributes['footerFacet'].value}"
+ headerFacet="#{richDataGridBean.attributes['headerFacet'].value}"
+ iterationState="#{richDataGridBean.attributes['iterationState'].value}"
+ iterationStatusVar="#{richDataGridBean.attributes['iterationStatusVar'].value}"
+ keepSaved="#{richDataGridBean.attributes['keepSaved'].value}"
+ noDataFacet="#{richDataGridBean.attributes['noDataFacet'].value}"
+ relativeRowIndex="#{richDataGridBean.attributes['relativeRowIndex'].value}"
+ rendered="#{richDataGridBean.attributes['rendered'].value}"
+ rowAvailable="#{richDataGridBean.attributes['rowAvailable'].value}"
+ rowCount="#{richDataGridBean.attributes['rowCount'].value}"
+ rowData="#{richDataGridBean.attributes['rowData'].value}"
+ rowIndex="#{richDataGridBean.attributes['rowIndex'].value}"
+ rowKey="#{richDataGridBean.attributes['rowKey'].value}"
+ rowKeyConverter="#{richDataGridBean.attributes['rowKeyConverter'].value}"
+ rows="#{richDataGridBean.attributes['rows'].value}"
+ value="#{richDataGridBean.state ? model.employees : null}"
+ var="record">
<f:facet name="noData">
<h:outputText value="There is no data." style="color: red;"/>
@@ -96,7 +92,7 @@
<f:facet name="footer">
<rich:dataScroller id="scroller2" for="richDataGrid" page="#{richDataGridBean.page}" maxPages="7" render="richDataGrid" />
</f:facet>
- </it:dataGrid>
+ </rich:dataGrid>
</ui:define>
Modified: root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/scroller.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/scroller.xhtml 2010-07-29 12:48:48 UTC (rev 18279)
+++ root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/scroller.xhtml 2010-07-29 12:56:25 UTC (rev 18280)
@@ -23,8 +23,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
- xmlns:ta="http://java.sun.com/jsf/composite/testapp" xmlns:rich="http://richfaces.org/rich"
- xmlns:it="http://richfaces.org/iteration">
+ xmlns:ta="http://java.sun.com/jsf/composite/testapp" xmlns:rich="http://richfaces.org/rich">
<ui:composition template="/templates/template.xhtml">
@@ -35,9 +34,6 @@
</f:viewParam>
</f:metadata>
<h:outputStylesheet library="css" name="richDataGrid.css"/>
-
- <!-- why is this needed? -->
- <f:view contentType="text/html" />
</ui:define>
<ui:define name="outOfTemplateBefore">
@@ -51,28 +47,28 @@
</ui:define>
<ui:define name="component">
- <it:dataGrid id="richDataGrid"
- captionFacet="#{richDataGridBean.attributes['captionFacet'].value}"
- columns="#{richDataGridBean.attributes['columns'].value}"
- elements="#{richDataGridBean.attributes['elements'].value}"
- first="#{richDataGridBean.attributes['first'].value}"
- footerFacet="#{richDataGridBean.attributes['footerFacet'].value}"
- headerFacet="#{richDataGridBean.attributes['headerFacet'].value}"
- iterationState="#{richDataGridBean.attributes['iterationState'].value}"
- iterationStatusVar="#{richDataGridBean.attributes['iterationStatusVar'].value}"
- keepSaved="#{richDataGridBean.attributes['keepSaved'].value}"
- noDataFacet="#{richDataGridBean.attributes['noDataFacet'].value}"
- relativeRowIndex="#{richDataGridBean.attributes['relativeRowIndex'].value}"
- rendered="#{richDataGridBean.attributes['rendered'].value}"
- rowAvailable="#{richDataGridBean.attributes['rowAvailable'].value}"
- rowCount="#{richDataGridBean.attributes['rowCount'].value}"
- rowData="#{richDataGridBean.attributes['rowData'].value}"
- rowIndex="#{richDataGridBean.attributes['rowIndex'].value}"
- rowKey="#{richDataGridBean.attributes['rowKey'].value}"
- rowKeyConverter="#{richDataGridBean.attributes['rowKeyConverter'].value}"
- rows="#{richDataGridBean.attributes['rows'].value}"
- value="#{richDataGridBean.state ? model.capitals : null}"
- var="record">
+ <rich:dataGrid id="richDataGrid"
+ captionFacet="#{richDataGridBean.attributes['captionFacet'].value}"
+ columns="#{richDataGridBean.attributes['columns'].value}"
+ elements="#{richDataGridBean.attributes['elements'].value}"
+ first="#{richDataGridBean.attributes['first'].value}"
+ footerFacet="#{richDataGridBean.attributes['footerFacet'].value}"
+ headerFacet="#{richDataGridBean.attributes['headerFacet'].value}"
+ iterationState="#{richDataGridBean.attributes['iterationState'].value}"
+ iterationStatusVar="#{richDataGridBean.attributes['iterationStatusVar'].value}"
+ keepSaved="#{richDataGridBean.attributes['keepSaved'].value}"
+ noDataFacet="#{richDataGridBean.attributes['noDataFacet'].value}"
+ relativeRowIndex="#{richDataGridBean.attributes['relativeRowIndex'].value}"
+ rendered="#{richDataGridBean.attributes['rendered'].value}"
+ rowAvailable="#{richDataGridBean.attributes['rowAvailable'].value}"
+ rowCount="#{richDataGridBean.attributes['rowCount'].value}"
+ rowData="#{richDataGridBean.attributes['rowData'].value}"
+ rowIndex="#{richDataGridBean.attributes['rowIndex'].value}"
+ rowKey="#{richDataGridBean.attributes['rowKey'].value}"
+ rowKeyConverter="#{richDataGridBean.attributes['rowKeyConverter'].value}"
+ rows="#{richDataGridBean.attributes['rows'].value}"
+ value="#{richDataGridBean.state ? model.capitals : null}"
+ var="record">
<f:facet name="noData">
<h:outputText value="There is no data." style="color: red;"/>
@@ -93,7 +89,7 @@
<f:facet name="footer">
<rich:dataScroller id="scroller2" for="richDataGrid" page="#{richDataGridBean.page}" maxPages="7" render="richDataGrid" />
</f:facet>
- </it:dataGrid>
+ </rich:dataGrid>
</ui:define>
Modified: root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/simple.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/simple.xhtml 2010-07-29 12:48:48 UTC (rev 18279)
+++ root/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/simple.xhtml 2010-07-29 12:56:25 UTC (rev 18280)
@@ -23,8 +23,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
- xmlns:ta="http://java.sun.com/jsf/composite/testapp" xmlns:rich="http://richfaces.org/rich"
- xmlns:it="http://richfaces.org/iteration">
+ xmlns:ta="http://java.sun.com/jsf/composite/testapp" xmlns:rich="http://richfaces.org/rich">
<ui:composition template="/templates/template.xhtml">
@@ -35,9 +34,6 @@
</f:viewParam>
</f:metadata>
<h:outputStylesheet library="css" name="richDataGrid.css" />
-
- <!-- why is this needed? -->
- <f:view contentType="text/html" />
</ui:define>
<ui:define name="outOfTemplateBefore">
@@ -50,28 +46,28 @@
</ui:define>
<ui:define name="component">
- <it:dataGrid id="richDataGrid"
- captionFacet="#{richDataGridBean.attributes['captionFacet'].value}"
- columns="#{richDataGridBean.attributes['columns'].value}"
- elements="#{richDataGridBean.attributes['elements'].value}"
- first="#{richDataGridBean.attributes['first'].value}"
- footerFacet="#{richDataGridBean.attributes['footerFacet'].value}"
- headerFacet="#{richDataGridBean.attributes['headerFacet'].value}"
- iterationState="#{richDataGridBean.attributes['iterationState'].value}"
- iterationStatusVar="#{richDataGridBean.attributes['iterationStatusVar'].value}"
- keepSaved="#{richDataGridBean.attributes['keepSaved'].value}"
- noDataFacet="#{richDataGridBean.attributes['noDataFacet'].value}"
- relativeRowIndex="#{richDataGridBean.attributes['relativeRowIndex'].value}"
- rendered="#{richDataGridBean.attributes['rendered'].value}"
- rowAvailable="#{richDataGridBean.attributes['rowAvailable'].value}"
- rowCount="#{richDataGridBean.attributes['rowCount'].value}"
- rowData="#{richDataGridBean.attributes['rowData'].value}"
- rowIndex="#{richDataGridBean.attributes['rowIndex'].value}"
- rowKey="#{richDataGridBean.attributes['rowKey'].value}"
- rowKeyConverter="#{richDataGridBean.attributes['rowKeyConverter'].value}"
- rows="#{richDataGridBean.attributes['rows'].value}"
- value="#{richDataGridBean.state ? model.capitals : null}"
- var="record">
+ <rich:dataGrid id="richDataGrid"
+ captionFacet="#{richDataGridBean.attributes['captionFacet'].value}"
+ columns="#{richDataGridBean.attributes['columns'].value}"
+ elements="#{richDataGridBean.attributes['elements'].value}"
+ first="#{richDataGridBean.attributes['first'].value}"
+ footerFacet="#{richDataGridBean.attributes['footerFacet'].value}"
+ headerFacet="#{richDataGridBean.attributes['headerFacet'].value}"
+ iterationState="#{richDataGridBean.attributes['iterationState'].value}"
+ iterationStatusVar="#{richDataGridBean.attributes['iterationStatusVar'].value}"
+ keepSaved="#{richDataGridBean.attributes['keepSaved'].value}"
+ noDataFacet="#{richDataGridBean.attributes['noDataFacet'].value}"
+ relativeRowIndex="#{richDataGridBean.attributes['relativeRowIndex'].value}"
+ rendered="#{richDataGridBean.attributes['rendered'].value}"
+ rowAvailable="#{richDataGridBean.attributes['rowAvailable'].value}"
+ rowCount="#{richDataGridBean.attributes['rowCount'].value}"
+ rowData="#{richDataGridBean.attributes['rowData'].value}"
+ rowIndex="#{richDataGridBean.attributes['rowIndex'].value}"
+ rowKey="#{richDataGridBean.attributes['rowKey'].value}"
+ rowKeyConverter="#{richDataGridBean.attributes['rowKeyConverter'].value}"
+ rows="#{richDataGridBean.attributes['rows'].value}"
+ value="#{richDataGridBean.state ? model.capitals : null}"
+ var="record">
<f:facet name="noData">
<h:outputText value="There is no data." style="color: red;"/>
@@ -93,7 +89,7 @@
<h:outputText value="footer" />
</f:facet>
- </it:dataGrid>
+ </rich:dataGrid>
</ui:define>
<ui:define name="outOfTemplateAfter">
Modified: root/tests/metamer/trunk/application/src/main/webapp/components/richList/simple.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/components/richList/simple.xhtml 2010-07-29 12:48:48 UTC (rev 18279)
+++ root/tests/metamer/trunk/application/src/main/webapp/components/richList/simple.xhtml 2010-07-29 12:56:25 UTC (rev 18280)
@@ -22,9 +22,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
- xmlns:ta="http://java.sun.com/jsf/composite/testapp" xmlns:rich="http://richfaces.org/rich"
- xmlns:it="http://richfaces.org/iteration">
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:ta="http://java.sun.com/jsf/composite/testapp"
+ xmlns:rich="http://richfaces.org/rich">
<ui:composition template="/templates/template.xhtml">
@@ -42,49 +41,49 @@
</ui:define>
<ui:define name="component">
- <it:list id="richList"
- dir="#{richListBean.attributes['dir'].value}"
- first="#{richListBean.attributes['first'].value}"
- iterationState="#{richListBean.attributes['iterationState'].value}"
- iterationStatusVar="#{richListBean.attributes['iterationStatusVar'].value}"
- keepSaved="#{richListBean.attributes['keepSaved'].value}"
- lang="#{richListBean.attributes['lang'].value}"
- onclick="#{richListBean.attributes['onclick'].value}"
- ondblclick="#{richListBean.attributes['ondblclick'].value}"
- onkeydown="#{richListBean.attributes['onkeydown'].value}"
- onkeypress="#{richListBean.attributes['onkeypress'].value}"
- onkeyup="#{richListBean.attributes['onkeyup'].value}"
- onmousedown="#{richListBean.attributes['onmousedown'].value}"
- onmousemove="#{richListBean.attributes['onmousemove'].value}"
- onmouseout="#{richListBean.attributes['onmouseout'].value}"
- onmouseover="#{richListBean.attributes['onmouseover'].value}"
- onmouseup="#{richListBean.attributes['onmouseup'].value}"
- relativeRowIndex="#{richListBean.attributes['relativeRowIndex'].value}"
- rendered="#{richListBean.attributes['rendered'].value}"
- rowAvailable="#{richListBean.attributes['rowAvailable'].value}"
- rowClass="#{richListBean.attributes['rowClass'].value}"
- rowClasses="#{richListBean.attributes['rowClasses'].value}"
- rowCount="#{richListBean.attributes['rowCount'].value}"
- rowData="#{richListBean.attributes['rowData'].value}"
- rowIndex="#{richListBean.attributes['rowIndex'].value}"
- rowKey="#{richListBean.attributes['rowKey'].value}"
- rowKeyConverter="#{richListBean.attributes['rowKeyConverter'].value}"
- rows="#{richListBean.attributes['rows'].value}"
- style="#{richListBean.attributes['style'].value}"
- styleClass="#{richListBean.attributes['styleClass'].value}"
- value="#{model.employees}"
- var="item"
- term="#{richListBean.attributes['term'].value}"
- title="#{richListBean.attributes['title'].value}"
- type="#{richListBean.attributes['type'].value}">
+ <rich:list id="richList"
+ dir="#{richListBean.attributes['dir'].value}"
+ first="#{richListBean.attributes['first'].value}"
+ iterationState="#{richListBean.attributes['iterationState'].value}"
+ iterationStatusVar="#{richListBean.attributes['iterationStatusVar'].value}"
+ keepSaved="#{richListBean.attributes['keepSaved'].value}"
+ lang="#{richListBean.attributes['lang'].value}"
+ onclick="#{richListBean.attributes['onclick'].value}"
+ ondblclick="#{richListBean.attributes['ondblclick'].value}"
+ onkeydown="#{richListBean.attributes['onkeydown'].value}"
+ onkeypress="#{richListBean.attributes['onkeypress'].value}"
+ onkeyup="#{richListBean.attributes['onkeyup'].value}"
+ onmousedown="#{richListBean.attributes['onmousedown'].value}"
+ onmousemove="#{richListBean.attributes['onmousemove'].value}"
+ onmouseout="#{richListBean.attributes['onmouseout'].value}"
+ onmouseover="#{richListBean.attributes['onmouseover'].value}"
+ onmouseup="#{richListBean.attributes['onmouseup'].value}"
+ relativeRowIndex="#{richListBean.attributes['relativeRowIndex'].value}"
+ rendered="#{richListBean.attributes['rendered'].value}"
+ rowAvailable="#{richListBean.attributes['rowAvailable'].value}"
+ rowClass="#{richListBean.attributes['rowClass'].value}"
+ rowClasses="#{richListBean.attributes['rowClasses'].value}"
+ rowCount="#{richListBean.attributes['rowCount'].value}"
+ rowData="#{richListBean.attributes['rowData'].value}"
+ rowIndex="#{richListBean.attributes['rowIndex'].value}"
+ rowKey="#{richListBean.attributes['rowKey'].value}"
+ rowKeyConverter="#{richListBean.attributes['rowKeyConverter'].value}"
+ rows="#{richListBean.attributes['rows'].value}"
+ style="#{richListBean.attributes['style'].value}"
+ styleClass="#{richListBean.attributes['styleClass'].value}"
+ value="#{model.employees}"
+ var="item"
+ term="#{richListBean.attributes['term'].value}"
+ title="#{richListBean.attributes['title'].value}"
+ type="#{richListBean.attributes['type'].value}">
<f:facet name="term">
<h:outputText id="term" value="#{item.title}" style="font-weight: bold"/>
</f:facet>
#{item.name}
- </it:list>
+ </rich:list>
- <it:dataScroller for="richList" />
+ <rich:dataScroller for="richList" />
</ui:define>
<ui:define name="outOfTemplateAfter">
Modified: root/tests/metamer/trunk/application/src/main/webapp/components/richPanel/customLook.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/components/richPanel/customLook.xhtml 2010-07-29 12:48:48 UTC (rev 18279)
+++ root/tests/metamer/trunk/application/src/main/webapp/components/richPanel/customLook.xhtml 2010-07-29 12:56:25 UTC (rev 18280)
@@ -1,7 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
- xmlns:ta="http://java.sun.com/jsf/composite/testapp" xmlns:pn="http://richfaces.org/output">
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:rich="http://richfaces.org/rich">
<ui:composition template="/templates/template.xhtml">
@@ -49,36 +48,36 @@
</style>
<h:panelGrid columnClasses="panel" border="0" columns="2">
- <pn:panel id="panel1">
+ <rich:panel id="panel1">
<f:facet name="header">
Panel #1. Changing Style Synchronously
</f:facet>
Each component in the RichFaces has a pre-defined set of classes you can manipulate with. If defined, those
classes overwrite the ones come from the skin.
- </pn:panel>
+ </rich:panel>
- <pn:panel id="panel2">
+ <rich:panel id="panel2">
<f:facet name="header">
Panel #2. Changing Style Synchronously
</f:facet>
In this example, we define header color using the .rf-panel-header class and all panels located on the same page
inherit this color
- </pn:panel>
+ </rich:panel>
</h:panelGrid>
<h:panelGrid columnClasses="panel" border="0" columns="3">
- <pn:panel id="panel3"
- onmouseover="document.getElementById(this.id+'_header').style.background='#60BA01';document.getElementById(this.id+'_body').style.background='#F4FFF8'"
- onmouseout="document.getElementById(this.id+'_header').style.background='#4C9600';document.getElementById(this.id+'_body').style.background='#E4FFC8'"
- style="width:200px;" headerClass="head2" bodyClass="body3">
+ <rich:panel id="panel3"
+ onmouseover="document.getElementById(this.id+'_header').style.background='#60BA01';document.getElementById(this.id+'_body').style.background='#F4FFF8'"
+ onmouseout="document.getElementById(this.id+'_header').style.background='#4C9600';document.getElementById(this.id+'_body').style.background='#E4FFC8'"
+ style="width:200px;" headerClass="head2" bodyClass="body3">
<f:facet name="header">
Panel header
</f:facet>
Base on the previous layout, but some javascript behaviour added.
- </pn:panel>
+ </rich:panel>
- <pn:panel id="panel4" style="width:200px;" bodyClass="body3">
+ <rich:panel id="panel4" style="width:200px;" bodyClass="body3">
<f:facet name="header">
Scrolling Text Panel
</f:facet>
@@ -88,7 +87,7 @@
aliquam faucibus ut in neque. Nulla facilisi. Donec sed arcu et velit egestas
condimentum ut ut sem. Quisque quis arcu est. Mauris nec metus congue tortor
sagittis porta in in orci. Suspendisse iaculis ipsum non.
- </pn:panel>
+ </rich:panel>
</h:panelGrid>
</ui:define>
Modified: root/tests/metamer/trunk/application/src/main/webapp/components/richPanel/nested.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/components/richPanel/nested.xhtml 2010-07-29 12:48:48 UTC (rev 18279)
+++ root/tests/metamer/trunk/application/src/main/webapp/components/richPanel/nested.xhtml 2010-07-29 12:56:25 UTC (rev 18280)
@@ -1,7 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
- xmlns:ta="http://java.sun.com/jsf/composite/testapp" xmlns:pn="http://richfaces.org/output">
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:rich="http://richfaces.org/rich">
<ui:composition template="/templates/template.xhtml">
@@ -19,11 +18,11 @@
<ui:define name="component">
- <pn:panel id="outerPanel" header="outer panel">
+ <rich:panel id="outerPanel" header="outer panel">
<h:outputText id="contentOuter" value="content of outer panel" style="font-size: x-large"/>
<h:panelGrid columns="2" columnClasses="grid-content">
- <pn:panel id="leftPanel" header="left inner panel" styleClass="inner-panel">
+ <rich:panel id="leftPanel" header="left inner panel" styleClass="inner-panel">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras sodales risus non sapien pulvinar
volutpat. Suspendisse ac neque neque. Aliquam erat volutpat. Donec luctus nulla eget lectus vehicula
facilisis. Aenean non nisl nibh. Vestibulum odio metus, fermentum nec placerat in, varius eu ligula.
@@ -31,9 +30,9 @@
suscipit vulputate suscipit varius augue. Sed non lorem erat. Vivamus ut magna sapien. In lacinia
pharetra mi viverra volutpat. Praesent rutrum cursus dui non lobortis. Morbi nec sem eros. Proin
a libero diam, id laoreet risus. Ut sit amet risus elit. Nulla facilisi.
- </pn:panel>
+ </rich:panel>
- <pn:panel id="rightPanel" header="right inner panel" styleClass="inner-panel">
+ <rich:panel id="rightPanel" header="right inner panel" styleClass="inner-panel">
<ul>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
<li>Mauris non velit sapien, nec varius elit.</li>
@@ -45,9 +44,9 @@
<li>Fusce sit amet orci quis sapien dignissim consectetur in eget leo.</li>
<li>Vestibulum auctor quam ultrices ligula congue semper.</li>
</ul>
- </pn:panel>
+ </rich:panel>
</h:panelGrid>
- </pn:panel>
+ </rich:panel>
</ui:define>
<ui:define name="outOfTemplateAfter">
Modified: root/tests/metamer/trunk/application/src/main/webapp/components/richPanel/simple.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/components/richPanel/simple.xhtml 2010-07-29 12:48:48 UTC (rev 18279)
+++ root/tests/metamer/trunk/application/src/main/webapp/components/richPanel/simple.xhtml 2010-07-29 12:56:25 UTC (rev 18280)
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
- xmlns:ta="http://java.sun.com/jsf/composite/testapp" xmlns:pn="http://richfaces.org/output">
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:ta="http://java.sun.com/jsf/composite/testapp"
+ xmlns:rich="http://richfaces.org/rich">
<ui:composition template="/templates/template.xhtml">
@@ -22,27 +22,36 @@
<fieldset id="fieldsetHeader">
<legend>Panel with header</legend>
- <pn:panel id="panelWithHeader"
- bodyClass="#{richPanelBean.attributes['bodyClass'].value}"
- header="#{richPanelBean.attributes['header'].value}"
- headerClass="#{richPanelBean.attributes['headerClass'].value}"
- onclick="#{richPanelBean.attributes['onclick'].value}"
- ondblclick="#{richPanelBean.attributes['ondblclick'].value}"
- onkeydown="#{richPanelBean.attributes['onkeydown'].value}"
- onkeypress="#{richPanelBean.attributes['onkeypress'].value}"
- onkeyup="#{richPanelBean.attributes['onkeyup'].value}"
- onmousedown="#{richPanelBean.attributes['onmousedown'].value}"
- onmousemove="#{richPanelBean.attributes['onmousemove'].value}"
- onmouseout="#{richPanelBean.attributes['onmouseout'].value}"
- onmouseover="#{richPanelBean.attributes['onmouseover'].value}"
- onmouseup="#{richPanelBean.attributes['onmouseup'].value}"
- rendered="#{richPanelBean.attributes['rendered'].value}"
- style="#{richPanelBean.attributes['style'].value}"
- styleClass="#{richPanelBean.attributes['styleClass'].value}">
+ <rich:panel id="panelWithHeader"
+ bodyClass="#{richPanelBean.attributes['bodyClass'].value}"
+ header="#{richPanelBean.attributes['header'].value}"
+ headerClass="#{richPanelBean.attributes['headerClass'].value}"
+ onclick="#{richPanelBean.attributes['onclick'].value}"
+ ondblclick="#{richPanelBean.attributes['ondblclick'].value}"
+ onkeydown="#{richPanelBean.attributes['onkeydown'].value}"
+ onkeypress="#{richPanelBean.attributes['onkeypress'].value}"
+ onkeyup="#{richPanelBean.attributes['onkeyup'].value}"
+ onmousedown="#{richPanelBean.attributes['onmousedown'].value}"
+ onmousemove="#{richPanelBean.attributes['onmousemove'].value}"
+ onmouseout="#{richPanelBean.attributes['onmouseout'].value}"
+ onmouseover="#{richPanelBean.attributes['onmouseover'].value}"
+ onmouseup="#{richPanelBean.attributes['onmouseup'].value}"
+ rendered="#{richPanelBean.attributes['rendered'].value}"
+ style="#{richPanelBean.attributes['style'].value}"
+ styleClass="#{richPanelBean.attributes['styleClass'].value}">
<f:facet name="header">header of panel</f:facet>
- content of panel
- </pn:panel>
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus a neque turpis, at cursus nunc.
+ Vestibulum et tincidunt metus. Suspendisse viverra aliquet nunc, non placerat justo commodo a. Pellentesque
+ non lacus ut mi consectetur blandit nec sed orci. Praesent tempus aliquet sapien vitae condimentum. Aenean
+ nec ligula egestas erat convallis pharetra. Donec venenatis nunc vitae justo posuere laoreet. Vestibulum
+ ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse quis convallis nulla.
+ Aenean lorem lorem, viverra eget elementum in, hendrerit sit amet felis. Curabitur venenatis lacus id diam
+ porttitor cursus. Suspendisse vulputate arcu at ante porttitor ullamcorper. Cras eleifend lacus eget justo
+ malesuada fermentum. Praesent pretium eleifend lacus, id dignissim lacus aliquam eu. Nulla imperdiet tempus
+ facilisis. Etiam nec aliquet quam. Duis fringilla ullamcorper libero, vel dictum quam feugiat a. Donec placerat
+ varius diam ullamcorper egestas. Donec molestie tellus a felis facilisis ac vestibulum risus rhoncus.
+ </rich:panel>
</fieldset>
<br/>
@@ -50,26 +59,35 @@
<fieldset id="fieldsetWithoutHeader">
<legend>Panel without header</legend>
- <pn:panel id="panelWithoutHeader"
- bodyClass="#{richPanelBean.attributes['bodyClass'].value}"
- header="#{richPanelBean.attributes['header'].value}"
- headerClass="#{richPanelBean.attributes['headerClass'].value}"
- onclick="#{richPanelBean.attributes['onclick'].value}"
- ondblclick="#{richPanelBean.attributes['ondblclick'].value}"
- onkeydown="#{richPanelBean.attributes['onkeydown'].value}"
- onkeypress="#{richPanelBean.attributes['onkeypress'].value}"
- onkeyup="#{richPanelBean.attributes['onkeyup'].value}"
- onmousedown="#{richPanelBean.attributes['onmousedown'].value}"
- onmousemove="#{richPanelBean.attributes['onmousemove'].value}"
- onmouseout="#{richPanelBean.attributes['onmouseout'].value}"
- onmouseover="#{richPanelBean.attributes['onmouseover'].value}"
- onmouseup="#{richPanelBean.attributes['onmouseup'].value}"
- rendered="#{richPanelBean.attributes['rendered'].value}"
- style="#{richPanelBean.attributes['style'].value}"
- styleClass="#{richPanelBean.attributes['styleClass'].value}">
- content of panel
- </pn:panel>
+ <rich:panel id="panelWithoutHeader"
+ bodyClass="#{richPanelBean.attributes['bodyClass'].value}"
+ header="#{richPanelBean.attributes['header'].value}"
+ headerClass="#{richPanelBean.attributes['headerClass'].value}"
+ onclick="#{richPanelBean.attributes['onclick'].value}"
+ ondblclick="#{richPanelBean.attributes['ondblclick'].value}"
+ onkeydown="#{richPanelBean.attributes['onkeydown'].value}"
+ onkeypress="#{richPanelBean.attributes['onkeypress'].value}"
+ onkeyup="#{richPanelBean.attributes['onkeyup'].value}"
+ onmousedown="#{richPanelBean.attributes['onmousedown'].value}"
+ onmousemove="#{richPanelBean.attributes['onmousemove'].value}"
+ onmouseout="#{richPanelBean.attributes['onmouseout'].value}"
+ onmouseover="#{richPanelBean.attributes['onmouseover'].value}"
+ onmouseup="#{richPanelBean.attributes['onmouseup'].value}"
+ rendered="#{richPanelBean.attributes['rendered'].value}"
+ style="#{richPanelBean.attributes['style'].value}"
+ styleClass="#{richPanelBean.attributes['styleClass'].value}">
+ Nulla ornare suscipit urna, eu adipiscing sapien interdum ut. Aenean quis lectus sed eros congue imperdiet.
+ Duis feugiat eros leo. Aenean orci orci, facilisis vel gravida condimentum, scelerisque et libero. Nullam
+ ullamcorper elementum odio, ac hendrerit orci faucibus at. Suspendisse potenti. Suspendisse potenti. Nunc
+ eleifend fringilla egestas. Nam volutpat ullamcorper dolor, quis molestie elit aliquet in. Mauris mattis
+ auctor tellus sagittis venenatis. Morbi condimentum, mi eget cursus rutrum, justo orci sodales lectus, vitae
+ tincidunt eros ante at mauris. Aenean vel neque elit, sed facilisis lectus. Lorem ipsum dolor sit amet,
+ consectetur adipiscing elit. Sed posuere metus eu magna dignissim tristique. Fusce sit amet sollicitudin elit.
+ Curabitur lobortis faucibus enim sit amet dapibus. Donec vitae volutpat leo. Nullam a odio vel ligula vulputate
+ ullamcorper tristique eu tortor. Quisque egestas rhoncus commodo.
+ </rich:panel>
+
</fieldset>
</ui:define>
14 years, 4 months
JBoss Rich Faces SVN: r18279 - in root/examples/richfaces-showcase/trunk/src/main: webapp/richfaces and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-07-29 08:48:48 -0400 (Thu, 29 Jul 2010)
New Revision: 18279
Added:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/jquery/
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/jquery/jquery.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/togglePanel/
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/togglePanel/simple.xhtml
Modified:
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
Log:
https://jira.jboss.org/browse/RF-8967 jquery and togglePanel started. (not complete because of issues filled)
Modified: root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-07-29 09:59:51 UTC (rev 18278)
+++ root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-07-29 12:48:48 UTC (rev 18279)
@@ -304,6 +304,16 @@
</samples>
</demo>
<demo>
+ <id>togglePanel</id>
+ <name>rich:togglePanel</name>
+ <samples>
+ <sample>
+ <id>simple</id>
+ <name>Simple Toggle Panel</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
<id>popup</id>
<name>rich:popup</name>
<samples>
@@ -353,6 +363,16 @@
</sample>
</samples>
</demo>
+ <demo new="true">
+ <id>jquery</id>
+ <name>rich:jQuery</name>
+ <samples>
+ <sample>
+ <id>jquery</id>
+ <name>jQuery usage</name>
+ </sample>
+ </samples>
+ </demo>
</demos>
</group>
</root>
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/jquery/jquery.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/jquery/jquery.xhtml (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/jquery/jquery.xhtml 2010-07-29 12:48:48 UTC (rev 18279)
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a4j="http://richfaces.org/a4j">
+
+ <style type="text/css">
+.pic-normal {
+ width: 120px;
+ border: 2px solid #ACBECE;
+}
+
+.wrap1 {
+ width: 190px;
+ height: 130px;
+ float: left;
+}
+</style>
+
+
+ <br />
+
+ <a4j:outputPanel id="gallery">
+ <h:graphicImage value="/images/nature/pic1.jpg" />
+ <h:graphicImage value="/images/nature/pic2.jpg" />
+ <h:graphicImage value="/images/nature/pic3.jpg" />
+ <h:graphicImage value="/images/nature/pic4.jpg" />
+ <h:graphicImage value="/images/nature/pic5.jpg" />
+ <h:graphicImage value="/images/nature/pic6.jpg" />
+ <h:graphicImage value="/images/nature/pic7.jpg" />
+ <h:graphicImage value="/images/nature/pic8.jpg" />
+ <h:graphicImage value="/images/nature/pic9.jpg" />
+ </a4j:outputPanel>
+
+ <br style="clear: both" />
+
+
+ <rich:jQuery selector="#gallery img" query="addClass('pic-normal')" />
+ <rich:jQuery selector="#gallery img"
+ query="wrap('<div class=\'wrap1\'></div>')" />
+ <rich:jQuery selector="#gallery img"
+ query="mouseover(function(){enlargePic(this)})" />
+ <rich:jQuery selector="#gallery img"
+ query="mouseout(function(){normalPic(this)})" />
+
+ <rich:jQuery name="enlargePic" query="stop().animate({width:'180px'})" />
+ <rich:jQuery name="normalPic" query="stop().animate({width:'120px'})" />
+
+
+
+</ui:composition>
\ No newline at end of file
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/togglePanel/simple.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/togglePanel/simple.xhtml (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/togglePanel/simple.xhtml 2010-07-29 12:48:48 UTC (rev 18279)
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a4j="http://richfaces.org/a4j">
+
+ <ui:composition>
+ <p>DESC</p>
+ <h:form>
+ <rich:togglePanel id="panel1" activeItem="item1">
+ <rich:togglePanelItem name="item1">
+ <h:outputText value="This Toggle Panel Item 1"/>
+ </rich:togglePanelItem>
+ <rich:togglePanelItem name="item2">
+ <h:outputText value="This Toggle Panel Item 2"/>
+ </rich:togglePanelItem>
+ </rich:togglePanel>
+ </h:form>
+ <h:commandButton value="Switch">
+ <rich:toggleControl forPanel="panel1"/>
+ </h:commandButton>
+ </ui:composition>
+
+</html>
\ No newline at end of file
14 years, 4 months
JBoss Rich Faces SVN: r18278 - root/tests/metamer/trunk/application/src/main/webapp/components/richPanel.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-07-29 05:59:51 -0400 (Thu, 29 Jul 2010)
New Revision: 18278
Modified:
root/tests/metamer/trunk/application/src/main/webapp/components/richPanel/list.xhtml
Log:
* fixed
Modified: root/tests/metamer/trunk/application/src/main/webapp/components/richPanel/list.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/components/richPanel/list.xhtml 2010-07-29 08:47:35 UTC (rev 18277)
+++ root/tests/metamer/trunk/application/src/main/webapp/components/richPanel/list.xhtml 2010-07-29 09:59:51 UTC (rev 18278)
@@ -26,20 +26,20 @@
<ui:composition template="/templates/list.xhtml">
- <ui:define name="pageTitle">Rich Toggle Panel</ui:define>
+ <ui:define name="pageTitle">Rich Panel</ui:define>
<ui:define name="links">
<ta:testPageLink id="simple" outcome="simple" value="Simple">
- Simple page that contains <b>rich:togglePanel</b> and input boxes for all its attributes.
+ Simple page that contains <b>rich:panel</b> and input boxes for all its attributes.
</ta:testPageLink>
<ta:testPageLink id="nested" outcome="nested" value="Nested Panels">
- Page containing a <b>rich:togglePanel</b> with two nested panels.
+ Page containing a <b>rich:panel</b> with two nested panels.
</ta:testPageLink>
<ta:testPageLink id="customLook" outcome="customLook" value="Look Customization">
- Page containing several <b>rich:togglePanel</b>s testing stylesheet usage and skinnability features.
+ Page containing several <b>rich:panel</b>s testing stylesheet usage and skinnability features.
</ta:testPageLink>
</ui:define>
14 years, 4 months
JBoss Rich Faces SVN: r18277 - root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-07-29 04:47:35 -0400 (Thu, 29 Jul 2010)
New Revision: 18277
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataGrid.java
Log:
added forgotten headers and javadoc for DataGrid
Modified: root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataGrid.java
===================================================================
--- root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataGrid.java 2010-07-29 08:46:46 UTC (rev 18276)
+++ root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataGrid.java 2010-07-29 08:47:35 UTC (rev 18277)
@@ -1,3 +1,24 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
package org.richfaces.tests.metamer.ftest.model;
import static org.jboss.test.selenium.locator.reference.ReferencedLocator.ref;
@@ -8,6 +29,10 @@
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.locator.reference.ReferencedLocator;
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
public class DataGrid extends AbstractModel<JQueryLocator> {
AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
14 years, 4 months
JBoss Rich Faces SVN: r18276 - in root/tests/metamer/trunk: ftest-source/src/main/java/org/richfaces/tests/metamer/ftest and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-07-29 04:46:46 -0400 (Thu, 29 Jul 2010)
New Revision: 18276
Added:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataGrid.java
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataGrid/
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataGrid/TestSimple.java
Modified:
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/Model.java
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MetamerProperties.java
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java
Log:
added DataGrid test case; fixed passing default value of templates property from maven to MatrixConfigurator; derived static metod for loading List<Capital> in bean/Model
Modified: root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/Model.java
===================================================================
--- root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/Model.java 2010-07-29 07:39:45 UTC (rev 18275)
+++ root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/Model.java 2010-07-29 08:46:46 UTC (rev 18276)
@@ -94,13 +94,8 @@
*/
public synchronized List<Capital> getCapitals() {
if (capitalsList == null) {
- ClassLoader ccl = Thread.currentThread().getContextClassLoader();
- URL resource = ccl.getResource("org/richfaces/tests/metamer/model/capitals.xml");
- JAXBContext context;
try {
- context = JAXBContext.newInstance(CapitalsHolder.class);
- CapitalsHolder capitalsHolder = (CapitalsHolder) context.createUnmarshaller().unmarshal(resource);
- capitalsList = capitalsHolder.getCapitals();
+ capitalsList = unmarshallCapitals();
} catch (JAXBException e) {
throw new FacesException(e.getMessage(), e);
}
@@ -110,6 +105,22 @@
}
/**
+ * Unmarshalls the list of capitals
+ *
+ * @return the list of capitals
+ * @throws JAXBException
+ * if any unexpected errors occurs during unmarshalling
+ */
+ @SuppressWarnings("restriction")
+ public static final List<Capital> unmarshallCapitals() throws JAXBException {
+ ClassLoader ccl = Thread.currentThread().getContextClassLoader();
+ URL resource = ccl.getResource("org/richfaces/tests/metamer/model/capitals.xml");
+ JAXBContext context = JAXBContext.newInstance(CapitalsHolder.class);
+ CapitalsHolder capitalsHolder = (CapitalsHolder) context.createUnmarshaller().unmarshal(resource);
+ return capitalsHolder.getCapitals();
+ }
+
+ /**
* Model containing employees. Can be used to test various components inside iteration components.
*
* @return list of employees
Modified: root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MetamerProperties.java
===================================================================
--- root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MetamerProperties.java 2010-07-29 07:39:45 UTC (rev 18275)
+++ root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MetamerProperties.java 2010-07-29 08:46:46 UTC (rev 18276)
@@ -40,7 +40,7 @@
public static List<TemplatesList> getTemplates() {
final String templatesString = System.getProperty("templates");
- if (templatesString == null) {
+ if (templatesString == null || "null".equals(templatesString) || "".equals(templatesString)) {
return null;
}
Modified: root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java
===================================================================
--- root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java 2010-07-29 07:39:45 UTC (rev 18275)
+++ root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java 2010-07-29 08:46:46 UTC (rev 18276)
@@ -72,9 +72,9 @@
public URL getTestUrl() {
return buildUrl(contextPath, "faces/components/a4jOutputPanel/simple.xhtml");
}
-
+
+ @Test
@Uses({ @Use(field = "event", value = "events"), @Use(field = "layout", value = "layouts") })
- @Test
public void testEvent() {
JQueryLocator element = null;
Added: root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataGrid.java
===================================================================
--- root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataGrid.java (rev 0)
+++ root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataGrid.java 2010-07-29 08:46:46 UTC (rev 18276)
@@ -0,0 +1,37 @@
+package org.richfaces.tests.metamer.ftest.model;
+
+import static org.jboss.test.selenium.locator.reference.ReferencedLocator.ref;
+import static org.jboss.test.selenium.locator.LocatorFactory.*;
+
+import org.jboss.test.selenium.framework.AjaxSelenium;
+import org.jboss.test.selenium.framework.AjaxSeleniumProxy;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.jboss.test.selenium.locator.reference.ReferencedLocator;
+
+public class DataGrid extends AbstractModel<JQueryLocator> {
+
+ AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
+
+ ReferencedLocator<JQueryLocator> rows = ref(root, "> tbody.rf-dg-body > tr.rf-dg-r");
+ JQueryLocator rowToColumn = jq("td.rf-dg-c:not(:empty)");
+
+ public DataGrid(JQueryLocator root) {
+ super(root);
+ }
+
+ public int getElementCount() {
+ return selenium.getCount(rows.getChild(rowToColumn));
+ }
+
+ public int getColumnCount() {
+ return selenium.getCount(rows.getNthOccurence(1).getChild(rowToColumn));
+ }
+
+ public int getRowCount() {
+ return selenium.getCount(rows.getChild(rowToColumn).getNthChildElement(1));
+ }
+
+ public JQueryLocator getElement(int row, int column) {
+ return rows.getNthOccurence(row).getChild(rowToColumn).getNthChildElement(column);
+ }
+}
Added: root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataGrid/TestSimple.java
===================================================================
--- root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataGrid/TestSimple.java (rev 0)
+++ root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataGrid/TestSimple.java 2010-07-29 08:46:46 UTC (rev 18276)
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richDataGrid;
+
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardHttp;
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+
+import java.net.URL;
+import java.util.List;
+
+import javax.xml.bind.JAXBException;
+
+import org.jboss.test.selenium.locator.ElementLocator;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.tests.metamer.bean.Model;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.richfaces.tests.metamer.ftest.annotations.Inject;
+import org.richfaces.tests.metamer.ftest.annotations.Use;
+import org.richfaces.tests.metamer.ftest.model.DataGrid;
+import org.richfaces.tests.metamer.model.Capital;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import static org.jboss.test.selenium.locator.LocatorFactory.*;
+import static org.testng.Assert.*;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public class TestSimple extends AbstractMetamerTest {
+
+ private static final int ELEMENTS_TOTAL = 50;
+
+ List<Capital> capitals;
+
+ JQueryLocator attributeColumns = pjq("input[id$=columnsInput]");
+ JQueryLocator attributeElements = pjq("input[id$=elementsInput]");
+
+ DataGrid dataGrid = new DataGrid(jq("table.rf-dg[id$=richDataGrid]"));
+
+ @Inject
+ @Use(ints = { 3 })
+ Integer columns;
+
+ @Inject
+ @Use(empty = true)
+ Integer elements;
+
+ @SuppressWarnings("restriction")
+ public TestSimple() throws JAXBException {
+ capitals = Model.unmarshallCapitals();
+ }
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richDataGrid/simple.xhtml");
+ }
+
+ @BeforeMethod
+ public void prepareAttributes() {
+ prepareAttribute(attributeColumns, columns);
+ prepareAttribute(attributeElements, elements);
+ }
+
+ private void prepareAttribute(ElementLocator<?> inputLocator, Object value) {
+ String v = value == null ? "" : value.toString();
+ guardHttp(selenium).type(inputLocator, v);
+ }
+
+ @Test
+ @Use(field = "columns", ints = { 1, 3, 11, ELEMENTS_TOTAL / 2, ELEMENTS_TOTAL })
+ public void testColumnsAttribute() {
+ elements = ELEMENTS_TOTAL;
+ verifyCounts();
+
+ int columnCount = dataGrid.getColumnCount();
+ int rowCount = dataGrid.getRowCount();
+ rowIteration: for (int r = 1; r <= rowCount; r++) {
+ for (int c = 1; c <= columnCount; c++) {
+ final int index = ((r - 1) * columnCount) + c - 1;
+ if (index >= ELEMENTS_TOTAL) {
+ break rowIteration;
+ }
+ String expectedStateName = capitals.get(index).getState();
+ String stateName = selenium.getText(dataGrid.getElement(r, c).getChild(jq("span")));
+ assertEquals(stateName, expectedStateName);
+ }
+ }
+ }
+
+ @Test
+ @Use(field = "elements", ints = { 0, 1, 3, 5, 7 })
+ public void testElementsAttribute() {
+ assertEquals(dataGrid.getElementCount(), (int) elements);
+ }
+
+ private void verifyCounts() {
+ assertEquals(dataGrid.getElementCount(), (int) elements);
+ assertEquals(dataGrid.getColumnCount(), (int) columns);
+ assertEquals(dataGrid.getRowCount(), (int) Math.ceil((float) elements / columns));
+ }
+}
14 years, 4 months
JBoss Rich Faces SVN: r18275 - root/tests/metamer/trunk/ftest.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-07-29 03:39:45 -0400 (Thu, 29 Jul 2010)
New Revision: 18275
Modified:
root/tests/metamer/trunk/ftest/pom.xml
Log:
added MatrixConfigurator (and modified ConsoleStatusTestListener) to listener list in ftest/pom.xml
Modified: root/tests/metamer/trunk/ftest/pom.xml
===================================================================
--- root/tests/metamer/trunk/ftest/pom.xml 2010-07-29 05:15:57 UTC (rev 18274)
+++ root/tests/metamer/trunk/ftest/pom.xml 2010-07-29 07:39:45 UTC (rev 18275)
@@ -275,7 +275,7 @@
<properties>
<property>
<name>listener</name>
- <value>org.jboss.test.selenium.listener.ConsoleStatusTestListener,org.jboss.test.selenium.listener.SeleniumLoggingTestListener,org.jboss.test.selenium.listener.FailureLoggingTestListener,org.jboss.test.selenium.listener.TestMethodSelector</value>
+ <value>org.richfaces.tests.metamer.ftest.MatrixConfigurator,org.richfaces.tests.metamer.ftest.ConsoleStatusTestListener,org.jboss.test.selenium.listener.SeleniumLoggingTestListener,org.jboss.test.selenium.listener.FailureLoggingTestListener</value>
</property>
</properties>
</configuration>
14 years, 4 months