JBoss Rich Faces SVN: r21085 - in trunk/ui: iteration/ui/src/main/java/org/richfaces/renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-01-19 10:11:54 -0500 (Wed, 19 Jan 2011)
New Revision: 21085
Modified:
trunk/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
Log:
https://issues.jboss.org/browse/RF-10239
Modified: trunk/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java 2011-01-19 14:58:13 UTC (rev 21084)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java 2011-01-19 15:11:54 UTC (rev 21085)
@@ -762,6 +762,10 @@
}
}
+ public String getContainerClientId() {
+ return getContainerClientId(getFacesContext());
+ }
+
@Override
public String getContainerClientId(FacesContext facesContext) {
if (facesContext == null) {
@@ -1148,7 +1152,7 @@
throw new NullPointerException();
}
- String baseId = super.getClientId(context);
+ String baseId = getClientId(context);
if (!matchesBaseId(clientId, baseId, UINamingContainer.getSeparatorChar(context))) {
return false;
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2011-01-19 14:58:13 UTC (rev 21084)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2011-01-19 15:11:54 UTC (rev 21085)
@@ -560,8 +560,8 @@
encodeSelectionInput(writer, context, component);
writer.endUpdate();
writer.startEval();
- writer.write("jQuery('#" + ScriptUtils.escapeCSSMetachars(clientId)
- + "').triggerHandler('rich:onajaxcomplete', {first: " + table.getClientFirst() + "});");
+ writer.write("jQuery(" + ScriptUtils.toScript('#' + ScriptUtils.escapeCSSMetachars(clientId))
+ + ").triggerHandler('rich:onajaxcomplete', {first: " + table.getClientFirst() + "});");
writer.endEval();
table.setRowKey(context, key);
table.restoreOrigValue(context);
@@ -582,8 +582,8 @@
if (UIDataTableBase.HEADER.equals(metaComponentId)) {
encodeHeader(state);
writer.startEval();
- writer.write("jQuery('#" + ScriptUtils.escapeCSSMetachars(table.getClientId(context))
- + "').triggerHandler('rich:onajaxcomplete', {reinitializeHeader: true});");
+ writer.write("jQuery(" + ScriptUtils.toScript('#' + ScriptUtils.escapeCSSMetachars(table.getClientId(context)))
+ + ").triggerHandler('rich:onajaxcomplete', {reinitializeHeader: true});");
writer.endEval();
} else if (UIDataTableBase.FOOTER.equals(metaComponentId)) {
encodeFooter(state);
@@ -594,8 +594,8 @@
encodeSelectionInput(writer, context, component);
writer.endUpdate();
writer.startEval();
- writer.write("jQuery('#" + ScriptUtils.escapeCSSMetachars(clientId)
- + "').triggerHandler('rich:onajaxcomplete', {first: " + table.getClientFirst() + ", rowCount: "
+ writer.write("jQuery(" + ScriptUtils.toScript('#' + ScriptUtils.escapeCSSMetachars(clientId))
+ + ").triggerHandler('rich:onajaxcomplete', {first: " + table.getClientFirst() + ", rowCount: "
+ getRowCount(component) + ", reinitializeBody: true});");
writer.endEval();
} else {
13 years, 11 months
JBoss Rich Faces SVN: r21084 - in trunk: ui/output/ui/src/main/java/org/richfaces/component and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2011-01-19 09:58:13 -0500 (Wed, 19 Jan 2011)
New Revision: 21084
Modified:
trunk/core/api/src/main/java/org/richfaces/component/ComponentIterators.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TogglePanelItemRenderer.java
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tab.js
Log:
RF-10112 tabPanel: destroy failed on ajax render
Modified: trunk/core/api/src/main/java/org/richfaces/component/ComponentIterators.java
===================================================================
--- trunk/core/api/src/main/java/org/richfaces/component/ComponentIterators.java 2011-01-19 14:50:10 UTC (rev 21083)
+++ trunk/core/api/src/main/java/org/richfaces/component/ComponentIterators.java 2011-01-19 14:58:13 UTC (rev 21084)
@@ -25,12 +25,13 @@
import javax.faces.component.UIComponent;
+import com.google.common.base.Predicate;
import com.google.common.collect.AbstractIterator;
import com.google.common.collect.Iterators;
/**
* @author Nick Belaevski
- *
+ *
*/
public final class ComponentIterators {
@@ -41,24 +42,24 @@
if (component == null) {
return Iterators.<UIComponent>emptyIterator();
}
-
+
return new AbstractIterator<UIComponent>() {
private UIComponent currentComponent = component;
-
+
@Override
protected UIComponent computeNext() {
currentComponent = currentComponent.getParent();
-
+
if (currentComponent == null) {
endOfData();
}
-
+
return currentComponent;
}
};
}
-
+
public static Iterator<UIComponent> parentsAndSelf(final UIComponent component) {
if (component == null) {
return Iterators.<UIComponent>emptyIterator();
@@ -66,4 +67,40 @@
return Iterators.concat(Iterators.singletonIterator(component), parents(component));
}
+
+ public static UIComponent getParent(UIComponent component, Predicate<UIComponent> predicat) {
+ if (component == null || predicat == null) {
+ return null;
+ }
+
+ UIComponent parent = component.getParent();
+ while (parent != null) {
+ if (predicat.apply(parent)) {
+ return parent;
+ }
+ parent = parent.getParent();
+ }
+ return null;
+ }
+
+ /**
+ * Finds a parent of given UI <code>component</code>.
+ * @param component <code>UIComponent</code>
+ * @param parentClass <code>Class</code> of desired parent
+ * @return <code>UIComponent</code>
+ */
+ public static <T extends UIComponent> T getParent(UIComponent component, Class<T> parentClass) {
+ if (component == null || parentClass == null) {
+ return null;
+ }
+
+ UIComponent parent = component.getParent();
+ while (parent != null) {
+ if (parentClass.isInstance(parent)) {
+ return (T) parent;
+ }
+ parent = parent.getParent();
+ }
+ return null;
+ }
}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java 2011-01-19 14:50:10 UTC (rev 21083)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java 2011-01-19 14:58:13 UTC (rev 21084)
@@ -200,7 +200,6 @@
enum Properties {
iconLeftDisabled, iconLeftExpanded, iconRightCollapsed, iconRightDisabled, iconRightExpanded, disabledClass, styleClass, expandEvent, collapseEvent, iconLeftCollapsed
-
}
@Attribute(generate = false)
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelItem.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelItem.java 2011-01-19 14:50:10 UTC (rev 21083)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelItem.java 2011-01-19 14:58:13 UTC (rev 21084)
@@ -55,13 +55,19 @@
return COMPONENT_FAMILY;
}
+/*
@Override
public AbstractTogglePanel getParent() {
return (AbstractTogglePanel) super.getParent();
}
+*/
+ public AbstractTogglePanel getParentPanel() {
+ return ComponentIterators.getParent(this, AbstractTogglePanel.class);
+ }
+
public boolean isActive() {
- return getParent().isActiveItem(this);
+ return getParentPanel().isActiveItem(this);
}
@Override
@@ -71,7 +77,7 @@
@Override
public void encodeAll(FacesContext context) throws IOException {
- if (getParent().isActiveItem(this)) {
+ if (isActive()) {
super.encodeAll(context);
} else {
switch (getSwitchType()) {
@@ -133,7 +139,7 @@
getStateHelper().put(NAME, name);
}
- @Attribute(defaultValue = "getParent().getSwitchType()")
+ @Attribute(defaultValue = "getParentPanel().getSwitchType()")
public abstract SwitchType getSwitchType();
// ------------------------------------------------ Html Attributes
@@ -185,6 +191,3 @@
return "TogglePanelItem {name: " + getName() + ", switchType: " + getSwitchType() + '}';
}
}
-
-
-
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TogglePanelItemRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TogglePanelItemRenderer.java 2011-01-19 14:50:10 UTC (rev 21083)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TogglePanelItemRenderer.java 2011-01-19 14:58:13 UTC (rev 21084)
@@ -75,7 +75,7 @@
options.put("switchMode", panelItem.getSwitchType());
AbstractTogglePanelItem item = (AbstractTogglePanelItem) component;
- AbstractTogglePanel panel = item.getParent();
+ AbstractTogglePanel panel = item.getParentPanel();
options.put("index", panel.getChildIndex(item.getName()));
TogglePanelRenderer.addEventOption(context, component, options, LEAVE);
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tab.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tab.js 2011-01-19 14:50:10 UTC (rev 21083)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tab.js 2011-01-19 14:58:13 UTC (rev 21084)
@@ -137,7 +137,9 @@
destroy: function () {
var parent = this.getTogglePanel();
- delete parent.getItems()[this.index];
+ if (parent && parent.getItems && parent.getItems()[this.index]) {
+ delete parent.getItems()[this.index];
+ }
rf.Event.unbindById(this.id);
13 years, 11 months
JBoss Rich Faces SVN: r21083 - in trunk/ui/input/ui/src/main: java/org/richfaces/renderkit and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2011-01-19 09:50:10 -0500 (Wed, 19 Jan 2011)
New Revision: 21083
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractAutocomplete.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js
trunk/ui/input/ui/src/main/templates/autocomplete.template.xml
Log:
http://jira.jboss.com/jira/browse/RF-10166
added new functionality for setValue + bugfix
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractAutocomplete.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractAutocomplete.java 2011-01-19 13:50:02 UTC (rev 21082)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractAutocomplete.java 2011-01-19 14:50:10 UTC (rev 21083)
@@ -83,7 +83,7 @@
@Attribute
public abstract String getFilterFunction();
- @Attribute
+ @Attribute(defaultValue = "rf-au-itm-sel")
public abstract String getSelectedItemClass();
@Attribute
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java 2011-01-19 13:50:02 UTC (rev 21082)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java 2011-01-19 14:50:10 UTC (rev 21083)
@@ -308,17 +308,6 @@
throw new UnsupportedOperationException();
}
- protected String getSelectedItemClassOrDefault(UIComponent component) {
- String value = "";
- if (component instanceof AbstractAutocomplete) {
- value = ((AbstractAutocomplete) component).getSelectedItemClass();
- if (value == null || value.length() == 0) {
- value = "rf-au-sel";
- }
- }
- return value;
- }
-
protected int getMinCharsOrDefault(UIComponent component) {
int value = 1;
if (component instanceof AbstractAutocomplete) {
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js 2011-01-19 13:50:02 UTC (rev 21082)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js 2011-01-19 14:50:10 UTC (rev 21083)
@@ -100,7 +100,7 @@
$super.constructor.call(this, componentId, componentId+ID.SELECT, fieldId, options);
this.attachToDom();
this.options = $.extend(this.options, defaultOptions, options);
- this.value = this.__getSubValue();
+ this.value = "";
this.index = -1;
this.isFirstAjax = true;
updateTokenOptions.call(this);
@@ -205,17 +205,17 @@
if( this.options.autofill && value.toLowerCase().indexOf(inputValue)==0) {
var field = rf.getDomElement(this.fieldId);
var start = rf.Selection.getStart(field);
- this.setInputValue(inputValue + value.substring(inputValue.length));
+ this.__setInputValue(inputValue + value.substring(inputValue.length));
var end = start+value.length - inputValue.length;
rf.Selection.set(field, start, end);
}
};
- var callAjax = function(event, value, callback) {
+ var callAjax = function(event, callback) {
clearItems.call(this);
- rf.getDomElement(this.id+ID.VALUE).value = value;
+ rf.getDomElement(this.id+ID.VALUE).value = this.value;
var _this = this;
var _event = event;
@@ -224,7 +224,7 @@
if (_this.options.lazyClientMode && _this.value.length!=0) {
updateItemsFromCache.call(_this, _this.value);
}
- if (_this.focused && _this.items.length!=0 && callback) {
+ if ((_this.focused || _this.isMouseDown) && _this.items.length!=0 && callback) {
callback.call(_this, _event);
}
if (!callback && _this.isVisible && _this.options.selectFirst) {
@@ -317,17 +317,17 @@
callback.call(this, event);
}
if (event.which == rf.KEYS.RETURN || event.type == "click") {
- this.setInputValue(subValue);
+ this.__setInputValue(subValue);
} else if (this.options.selectFirst) {
selectItem.call(this, event, 0);
}
} else {
if (event.which == rf.KEYS.RETURN || event.type == "click") {
- this.setInputValue(subValue);
+ this.__setInputValue(subValue);
}
if (subValue.length>=this.options.minChars) {
if ((this.options.ajaxMode || this.options.lazyClientMode) && oldValue!=subValue) {
- callAjax.call(this, event, subValue, callback);
+ callAjax.call(this, event, callback);
}
} else {
if (this.options.ajaxMode) {
@@ -365,7 +365,7 @@
return result;
} else {
- return this.getInputValue();
+ return this.getValue();
}
};
@@ -407,7 +407,9 @@
// called from AutocompleteBase when not actually value changed
if (this.items.length==0 && this.isFirstAjax) {
if ((this.options.ajaxMode && subValue.length>=this.options.minChars) || this.options.lazyClientMode) {
- callAjax.call(this, event, subValue);
+ this.value = subValue;
+ callAjax.call(this, event, this.show);
+ return true;
}
}
return;
@@ -420,6 +422,9 @@
return $super.__updateInputValue.call(this, value);
}
},
+ __setInputValue: function (value) {
+ this.currentValue = this.__updateInputValue(value);
+ },
__onChangeValue: onChangeValue,
/*
* Override abstract protected methods
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js 2011-01-19 13:50:02 UTC (rev 21082)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js 2011-01-19 14:50:10 UTC (rev 21083)
@@ -26,7 +26,8 @@
this.fieldId = fieldId;
this.options = $.extend({}, defaultOptions, options);
this.namespace = this.namespace || "."+rf.Event.createNamespace(this.name, this.selectId);
- this.currentValue = this.getInputValue();
+ this.currentValue = "";
+ this.isChanged = this.getValue().length!=0;
bindEventHandlers.call(this);
};
@@ -88,7 +89,7 @@
var onFocus = function (event) {
if (!this.focused) {
- this.__focusValue = this.getInputValue();
+ this.__focusValue = this.getValue();
this.focused = true;
this.invokeEvent("focus", rf.getDomElement(this.fieldId), event);
}
@@ -106,7 +107,7 @@
if (this.focused) {
this.focused=false;
this.invokeEvent("blur", rf.getDomElement(this.fieldId), event);
- if (this.__focusValue != this.getInputValue()) {
+ if (this.__focusValue != this.getValue()) {
this.invokeEvent("change", rf.getDomElement(this.fieldId), event);
}
}
@@ -117,14 +118,14 @@
};
var onChange = function (event) {
- var value = this.getInputValue();
+ var value = this.getValue();
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.currentValue = this.getValue();
this.__onChangeValue(event, undefined, (!this.isVisible ? this.show : undefined));
- this.currentValue = this.getInputValue();
} else if (this.isVisible) {
this.__onChangeValue(event);
}
@@ -132,8 +133,12 @@
};
var onShow = function (event) {
- this.__updateState(event);
- this.show(event);
+ if (this.isChanged) {
+ this.isChanged = false;
+ onChange.call(this,{});
+ } else {
+ !this.__updateState(event) && this.show(event);
+ }
};
var onKeyDown = function (event) {
@@ -218,6 +223,15 @@
}
};
+ var updateInputValue = function (value) {
+ if (this.fieldId) {
+ rf.getDomElement(this.fieldId).value = value;
+ return value;
+ } else {
+ return "";
+ }
+ }
+
/*
* Prototype definition
*/
@@ -232,23 +246,18 @@
getNamespace: function () {
return this.namespace;
},
- getInputValue: function () {
+ getValue: function () {
return this.fieldId ? rf.getDomElement(this.fieldId).value : "";
},
- setInputValue: function (value) {
- this.currentValue = this.__updateInputValue(value);
+ setValue: function (value) {
+ if (value==this.currentValue) return;
+ updateInputValue.call(this, value);
+ this.isChanged = true;
},
/*
* Protected methods
*/
- __updateInputValue: function (value) {
- if (this.fieldId) {
- rf.getDomElement(this.fieldId).value = value;
- return value;
- } else {
- return "";
- }
- },
+ __updateInputValue: updateInputValue,
/*
* abstract protected methods
*/
Modified: trunk/ui/input/ui/src/main/templates/autocomplete.template.xml
===================================================================
--- trunk/ui/input/ui/src/main/templates/autocomplete.template.xml 2011-01-19 13:50:02 UTC (rev 21082)
+++ trunk/ui/input/ui/src/main/templates/autocomplete.template.xml 2011-01-19 14:50:10 UTC (rev 21083)
@@ -74,10 +74,9 @@
<cdk:object name="mode" type="Object" value="#{component.attributes['mode']}" />
<cdk:scriptObject name="options">
<cdk:scriptOption name="buttonId" value="#{clientId}Button" />
- <cdk:scriptOption attributes="filterFunction autofill disabled selectFirst tokens" />
+ <cdk:scriptOption attributes="selectedItemClass filterFunction autofill disabled selectFirst tokens" />
<cdk:scriptOption attributes="onbegin oncomplete onerror onbeforedomupdate onchange onselectitem onfocus onblur" wrapper="eventHandler"/>
<cdk:scriptOption name="minChars" value="#{getMinCharsOrDefault(component)}" />
- <cdk:scriptOption name="selectedItemClass" value="#{getSelectedItemClassOrDefault(component)}" />
<cdk:scriptOption name="filterFunction" value="#{getClientFilterFunction(component)}" />
<cdk:scriptOption name="isCachedAjax" value="#{'ajax'==mode ? false : true}" defaultValue="true" />
<cdk:scriptOption name="ajaxMode" value="#{'client'==mode||'lazyClient'==mode ? false : true}" defaultValue="true" />
13 years, 11 months
JBoss Rich Faces SVN: r21082 - trunk/ui/dnd/ui/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-01-19 08:50:02 -0500 (Wed, 19 Jan 2011)
New Revision: 21082
Modified:
trunk/ui/dnd/ui/src/main/templates/dragIndicator.template.xml
Log:
RF-10089 dragIndicator enhancements: allow static indicator content definition
Modified: trunk/ui/dnd/ui/src/main/templates/dragIndicator.template.xml
===================================================================
--- trunk/ui/dnd/ui/src/main/templates/dragIndicator.template.xml 2011-01-19 13:23:48 UTC (rev 21081)
+++ trunk/ui/dnd/ui/src/main/templates/dragIndicator.template.xml 2011-01-19 13:50:02 UTC (rev 21082)
@@ -35,11 +35,12 @@
</cc:interface>
<cc:implementation>
- <div id="#{clientId}" class="rf-ind #{component.attributes['styleClass']}" style="display: none;">
+ <div id="#{clientId}" class="rf-ind #{component.attributes['styleClass']}" style="display: none;">
+ <cdk:body />
<cdk:scriptObject name="options">
- <cdk:scriptOption name="acceptClass" value="#{concatClasses('rf-ind-acpt', component.attributes['acceptClass'])}"/>
- <cdk:scriptOption name="rejectClass" value="#{concatClasses('rf-ind-rejt', component.attributes['rejectClass'])}"/>
- <cdk:scriptOption name="draggingClass" value="#{concatClasses('rf-ind-drag', component.attributes['draggingClass'])}"/>
+ <cdk:scriptOption name="acceptClass" value="#{this.concatClasses('rf-ind-acpt', component.attributes['acceptClass'])}"/>
+ <cdk:scriptOption name="rejectClass" value="#{this.concatClasses('rf-ind-rejt', component.attributes['rejectClass'])}"/>
+ <cdk:scriptOption name="draggingClass" value="#{this.concatClasses('rf-ind-drag', component.attributes['draggingClass'])}"/>
</cdk:scriptObject>
<script type="text/javascript">
new RichFaces.ui.DragIndicator("#{clientId}", #{toScriptArgs(options)});
13 years, 11 months
JBoss Rich Faces SVN: r21081 - trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2011-01-19 08:23:48 -0500 (Wed, 19 Jan 2011)
New Revision: 21081
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tooltip.js
Log:
RF-9739: default offsets [10,10] is adjusted
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tooltip.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tooltip.js 2011-01-19 13:23:47 UTC (rev 21080)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tooltip.js 2011-01-19 13:23:48 UTC (rev 21081)
@@ -28,17 +28,16 @@
rf.ui.TooltipMode = {
client : "client",
ajax : "ajax",
-
DEFAULT: "client"
};
+
var TooltipMode = rf.ui.TooltipMode;
var DEFAULT_OPTIONS = {
jointPoint : "AA",
direction : "AA",
- offset: [0,0],
- attached : true,
offset : [10, 10],
+ attached : true,
mode : TooltipMode.DEFAULT,
disabled : false,
hideDelay : 0,
@@ -104,7 +103,6 @@
*
* @constructor
* @param {String} componentId - component id
- * @param {Hash} options - params
* */
init : function (componentId, options) {
$super.constructor.call(this, componentId);
@@ -141,7 +139,7 @@
}
});
- $(document.getElementById(tooltip.target)).bind(this.options.hideEvent, function (event) {
+ $(document.getElementById(tooltip.target)).bind(this.options.hideEvent, function () {
tooltip.hide();
if (tooltip.options.followMouse) {
13 years, 11 months
JBoss Rich Faces SVN: r21080 - in trunk/ui/output/ui/src/main: java/org/richfaces/renderkit/html and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-01-19 08:23:47 -0500 (Wed, 19 Jan 2011)
New Revision: 21080
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPopupPanel.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js
trunk/ui/output/ui/src/main/templates/popupPanel.template.xml
Log:
REVERT changes from RF-10097 Inline default values: output components I
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPopupPanel.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPopupPanel.java 2011-01-19 12:39:22 UTC (rev 21079)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPopupPanel.java 2011-01-19 13:23:47 UTC (rev 21080)
@@ -44,34 +44,34 @@
@Attribute
public abstract String getVisualOptions();
- @Attribute
+ @Attribute(defaultValue = "100")
public abstract int getZindex();
- @Attribute
+ @Attribute(defaultValue = "-1")
public abstract int getHeight();
- @Attribute
+ @Attribute(defaultValue = "-1")
public abstract int getWidth();
- @Attribute(defaultValue = "0")
+ @Attribute(defaultValue = "-1")
public abstract int getMinHeight();
- @Attribute(defaultValue = "0")
+ @Attribute(defaultValue = "-1")
public abstract int getMinWidth();
- @Attribute(defaultValue = "0")
+ @Attribute(defaultValue = "" + Integer.MAX_VALUE)
public abstract int getMaxHeight();
- @Attribute(defaultValue = "0")
+ @Attribute(defaultValue = "" + Integer.MAX_VALUE)
public abstract int getMaxWidth();
- @Attribute
+ @Attribute(defaultValue = "auto")
public abstract String getTop();
- @Attribute
+ @Attribute(defaultValue = "auto")
public abstract String getLeft();
- @Attribute
+ @Attribute(defaultValue = "false")
public abstract boolean isShow();
public abstract void setShow(boolean show);
@@ -79,22 +79,22 @@
@Attribute(defaultValue = "true")
public abstract boolean isMoveable();
- @Attribute
+ @Attribute(defaultValue = "false")
public abstract boolean isAutosized();
@Attribute(defaultValue = "true")
public abstract boolean isModal();
- @Attribute
+ @Attribute(defaultValue = "false")
public abstract boolean isKeepVisualState();
- @Attribute
+ @Attribute(defaultValue = "false")
public abstract boolean isOverlapEmbedObjects();
- @Attribute
+ @Attribute(defaultValue = "false")
public abstract boolean isResizeable();
- @Attribute
+ @Attribute(defaultValue = "false")
public abstract boolean isTrimOverlayedElements();
@Attribute
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java 2011-01-19 12:39:22 UTC (rev 21079)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java 2011-01-19 13:23:47 UTC (rev 21080)
@@ -37,9 +37,6 @@
private static final int SIZE = 10;
private static final String STATE_OPTION_SUFFIX = "StateOption_";
- private static final String DEFAULT_PROPERTY_LEFT = "auto";
- private static final String DEFAULT_PROPERTY_TOP = "auto";
-
//TODO nick - use enums
private static final Set<String> ALLOWED_ATTACHMENT_OPTIONS = new HashSet<String>();
static {
@@ -113,16 +110,18 @@
}
}
- if (panel.getMinWidth() != 0) {
- if (panel.getMinWidth() < SIZE) {
- throw new FacesException("Attribbute minHeight should be greater then 10px");
+ if (panel.getMinHeight() != -1) {
+ if (panel.getMinHeight() < SIZE) {
+ throw new FacesException("Attribbute minWidth should be greater then 10px");
}
+
}
- if (panel.getMinHeight() != 0) {
- if (panel.getMinHeight() < SIZE) {
- throw new FacesException("Attribbute minWidth should be greater then 10px");
+ if (panel.getMinWidth() != -1) {
+ if (panel.getMinWidth() < SIZE) {
+ throw new FacesException("Attribbute minHeight should be greater then 10px");
}
+
}
}
@@ -186,6 +185,8 @@
return result;
}
+
+
private Map<String, Object> prepareVisualOptions(Object value, AbstractPopupPanel panel) {
if (null == value) {
return new HashMap<String, Object>();
@@ -206,20 +207,4 @@
+ "] must be instance of Map or String, but its type is " + value.getClass().getSimpleName());
}
}
-
- protected String getLeftOrDefault(UIComponent component) {
- String leftProperty = ((AbstractPopupPanel) component).getLeft();
- if (leftProperty == null || leftProperty.length() == 0) {
- leftProperty = DEFAULT_PROPERTY_LEFT;
- }
- return leftProperty;
- }
-
- protected String getTopOrDefault(UIComponent component) {
- String topProperty = ((AbstractPopupPanel) component).getTop();
- if (topProperty == null || topProperty.length() == 0) {
- topProperty = DEFAULT_PROPERTY_TOP;
- }
- return topProperty;
- }
}
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js 2011-01-19 12:39:22 UTC (rev 21079)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js 2011-01-19 13:23:47 UTC (rev 21080)
@@ -31,10 +31,10 @@
}
var defaultOptions = {
- width:0,
- height:0,
- minWidth:0,
- minHeight:0,
+ width:-1,
+ height:-1,
+ minWidth:-1,
+ minHeight:-1,
modal:true,
moveable:true,
resizeable: false,
@@ -280,35 +280,39 @@
var eContentElt = this.getContentElement();
if (!this.options.autosized) {
- if (options.width && options.width == 0)
+ if (options.width && options.width == -1)
options.width = 300;
- if (options.height && options.height == 0)
+ if (options.height && options.height == -1)
options.height = 200;
}
- if (options.width && options.width != 0) {
+ if (options.width && options.width != -1) {
if (this.currentMinWidth > options.width) {
options.width = this.currentMinWidth;
}
- if (this.maxWidth && options.width > this.maxWidth) {
+ if (options.width > this.maxWidth) {
options.width = this.maxWidth;
}
$(richfaces.getDomElement(eContentElt)).css('width', options.width + (/px/.test(options.width) ? '' : 'px'));
this.shadowDiv.css('width', options.width + (/px/.test(options.width) ? '' : 'px'));
this.scrollerDiv.css('width', options.width + (/px/.test(options.width) ? '' : 'px'));
+
+
}
- if (options.height && options.height != 0) {
+ if (options.height && options.height != -1) {
if (this.currentMinHeight > options.height) {
options.height = this.currentMinHeight;
}
- if (this.maxHeigh && options.height > this.maxHeight) {
+ if (options.height > this.maxHeight) {
options.height = this.maxHeight;
}
$(richfaces.getDomElement(eContentElt)).css('height', options.height + (/px/.test(options.height) ? '' : 'px'));
this.shadowDiv.css('height', options.height + (/px/.test(options.height) ? '' : 'px'));
var headerHeight = $(richfaces.getDomElement(this.markerId +"_header"))[0] ? $(richfaces.getDomElement(this.markerId +"_header"))[0].clientHeight : 0;
this.scrollerDiv.css('height', options.height - headerHeight + (/px/.test(options.height) ? '' : 'px'));
+
+
}
var eIframe;
if (this.options.overlapEmbedObjects && !this.iframe) {
Modified: trunk/ui/output/ui/src/main/templates/popupPanel.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/popupPanel.template.xml 2011-01-19 12:39:22 UTC (rev 21079)
+++ trunk/ui/output/ui/src/main/templates/popupPanel.template.xml 2011-01-19 13:23:47 UTC (rev 21080)
@@ -73,11 +73,9 @@
</div>
<cdk:scriptObject name="options">
- <cdk:scriptOption name="left" value="#{getLeftOrDefault(component)}"/>
- <cdk:scriptOption name="top" value="#{getTopOrDefault(component)}"/>
- <cdk:scriptOption attributes="minHeight minWidth maxHeight maxWidth width height moveable followByScroll zindex shadowDepth shadowOpacity domElementAttachment show keepVisualState autosized resizeable modal overlapEmbedObjects visualOptions " />
- <cdk:scriptOption attributes="onshow onhide onresize onmove onbeforeshow onbeforehide" wrapper="eventHandler"/>
- </cdk:scriptObject>
+ <cdk:scriptOption attributes="width height minWidth minHeight maxWidth maxHeight moveable followByScroll left top zindex shadowDepth shadowOpacity domElementAttachment show keepVisualState autosized resizeable modal overlapEmbedObjects visualOptions " />
+ <cdk:scriptOption attributes="onshow onhide onresize onmove onbeforeshow onbeforehide" wrapper="eventHandler"/>
+ </cdk:scriptObject>
<script type="text/javascript">
new RichFaces.ui.PopupPanel(#{toScriptArgs(clientId, options)});
@@ -87,5 +85,7 @@
</script>
</div>
+
+
</cc:implementation>
</cdk:root>
\ No newline at end of file
13 years, 11 months
JBoss Rich Faces SVN: r21079 - modules/tests/metamer/trunk/ftest/src/test/resources.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-01-19 07:39:22 -0500 (Wed, 19 Jan 2011)
New Revision: 21079
Modified:
modules/tests/metamer/trunk/ftest/src/test/resources/testng-output.xml
Log:
* panel and progress bar added to TestNG descriptor
Modified: modules/tests/metamer/trunk/ftest/src/test/resources/testng-output.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/src/test/resources/testng-output.xml 2011-01-19 12:26:33 UTC (rev 21078)
+++ modules/tests/metamer/trunk/ftest/src/test/resources/testng-output.xml 2011-01-19 12:39:22 UTC (rev 21079)
@@ -6,6 +6,8 @@
<package name="org.richfaces.tests.metamer.ftest.richAccordion" />
<package name="org.richfaces.tests.metamer.ftest.richAccordionItem" />
<package name="org.richfaces.tests.metamer.ftest.richCollapsiblePanel" />
+ <package name="org.richfaces.tests.metamer.ftest.richPanel" />
+ <package name="org.richfaces.tests.metamer.ftest.richProgressBar" />
<package name="org.richfaces.tests.metamer.ftest.richTab" />
<package name="org.richfaces.tests.metamer.ftest.richTabPanel" />
<package name="org.richfaces.tests.metamer.ftest.richTogglePanel" />
13 years, 11 months
JBoss Rich Faces SVN: r21078 - in trunk: ui/output/ui/src/main/java/org/richfaces/component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2011-01-19 07:26:33 -0500 (Wed, 19 Jan 2011)
New Revision: 21078
Modified:
trunk/examples/output-demo/src/main/webapp/qunit/panelMenu.xhtml
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuGroup.js
Log:
RF-10159: Panel Menu - @itemMode, @groupMode attributes has not effect
RF-10174: PanelMenu: JS error on page unload
Modified: trunk/examples/output-demo/src/main/webapp/qunit/panelMenu.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/qunit/panelMenu.xhtml 2011-01-19 12:23:59 UTC (rev 21077)
+++ trunk/examples/output-demo/src/main/webapp/qunit/panelMenu.xhtml 2011-01-19 12:26:33 UTC (rev 21078)
@@ -57,6 +57,8 @@
topItemDisableIconLeft="disc"
topGroupDisableIconLeft="disc"
itemChangeListener="#{modalPanel.itemChangeEventListener}"
+ expandEvent="dblclick"
+ collapseEvent="dblclick"
>
<pn:panelMenuGroup label="Group 1" selectable="true">
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java 2011-01-19 12:23:59 UTC (rev 21077)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java 2011-01-19 12:26:33 UTC (rev 21078)
@@ -161,12 +161,35 @@
@Attribute(defaultValue = "getPanelMenu().isExpandSingle()")
public abstract boolean isExpandSingle();
- @Attribute(defaultValue = "click")
- public abstract String getCollapseEvent();
+ @Attribute(generate = false)
+ public String getCollapseEvent() {
+ String value = (String) getStateHelper().eval(Properties.collapseEvent);
+ if (value != null) {
+ return value;
+ }
- @Attribute(defaultValue = "click")
- public abstract String getExpandEvent();
+ return getPanelMenu().getCollapseEvent();
+ }
+ public void setCollapseEvent(String collapseEvent) {
+ getStateHelper().put(Properties.collapseEvent, collapseEvent);
+ }
+
+
+ @Attribute(generate = false)
+ public String getExpandEvent() {
+ String value = (String) getStateHelper().eval(Properties.expandEvent);
+ if (value != null) {
+ return value;
+ }
+
+ return getPanelMenu().getExpandEvent();
+ }
+
+ public void setExpandEvent(String expandEvent) {
+ getStateHelper().put(Properties.expandEvent, expandEvent);
+ }
+
@Attribute(defaultValue = "getPanelMenu().isBubbleSelection()")
public abstract boolean isBubbleSelection();
@@ -176,7 +199,7 @@
// ------------------------------------------------ Html Attributes
enum Properties {
- iconLeftDisabled, iconLeftExpanded, iconRightCollapsed, iconRightDisabled, iconRightExpanded, disabledClass, styleClass, iconLeftCollapsed
+ iconLeftDisabled, iconLeftExpanded, iconRightCollapsed, iconRightDisabled, iconRightExpanded, disabledClass, styleClass, expandEvent, collapseEvent, iconLeftCollapsed
}
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuGroup.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuGroup.js 2011-01-19 12:23:59 UTC (rev 21077)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuGroup.js 2011-01-19 12:26:33 UTC (rev 21078)
@@ -30,6 +30,8 @@
expandSingle : true,
bubbleSelection : true,
stylePrefix : "rf-pm-gr",
+ expandEvent: "click",
+ collapseEvent: "click",
// TODO we should use selectionType = {none, selectable, unselectable}
selectable : false,
@@ -127,9 +129,24 @@
if (!this.options.selectable) {
//TODO nick - this can be replaced by jQuery.delegate on menu itself
- this.__header().bind("click", function () {
- return menuGroup.switchExpantion();
- });
+ if (this.options.expandEvent == this.options.collapseEvent) {
+ this.__header().bind(this.options.expandEvent, function () {
+ menuGroup.switchExpantion();
+ });
+
+ } else {
+ this.__header().bind(this.options.expandEvent, function () {
+ if (menuGroup.collapsed()) {
+ return menuGroup.expand();
+ }
+ });
+
+ this.__header().bind(this.options.collapseEvent, function () {
+ if (menuGroup.expanded()) {
+ return menuGroup.collapse();
+ }
+ });
+ }
}
if (this.options.selectable || this.options.bubbleSelection) {
13 years, 11 months
JBoss Rich Faces SVN: r21077 - in modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer: bean and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-01-19 07:23:59 -0500 (Wed, 19 Jan 2011)
New Revision: 21077
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Behavior.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JActionListenerBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAjaxBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAttachQueueBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JCommandButtonBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JCommandLinkBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JJSFunctionBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JMediaOutputBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JOutputPanelBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPollBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPushBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPushEventProcuder.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JQueueBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRegionBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRepeatBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JStatusBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAutocompleteBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataGridBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataScrollerBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataTableBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichExtendedDataTableBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceSelectBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichJQueryBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuSeparatorBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichProgressBarBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/CalendarModel.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/CalendarModelItem.java
Log:
* code refactored and cleaned up
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -137,11 +137,11 @@
public void setType(Class<?> type) {
this.type = type;
}
-
+
public Class<?> getMemberType() {
return memberType;
}
-
+
public void setMemberType(Class<?> memberType) {
this.memberType = memberType;
}
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -42,6 +42,7 @@
import java.util.TreeMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+
import javax.el.ELContext;
import javax.el.ExpressionFactory;
import javax.el.MethodExpression;
@@ -57,6 +58,7 @@
import javax.xml.bind.JAXBException;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+
import org.richfaces.component.UIStatus;
import org.richfaces.tests.metamer.bean.RichBean;
import org.slf4j.Logger;
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Behavior.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Behavior.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Behavior.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -23,6 +23,7 @@
import java.io.Serializable;
import java.util.List;
+
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JActionListenerBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JActionListenerBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JActionListenerBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAjaxBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAjaxBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAjaxBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAttachQueueBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAttachQueueBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAttachQueueBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -26,8 +26,8 @@
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
+
import org.richfaces.component.UIAttachQueue;
-
import org.richfaces.tests.metamer.Attributes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -58,21 +58,21 @@
logger.debug("initializing bean " + getClass().getName());
// initialize attributes
- attributes = Attributes.getComponentAttributesFromClass(UIAttachQueue.class, getClass());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIAttachQueue.class, getClass());
initializeAttributes(attributes);
attributes.setAttribute("requestDelay", 500);
- attributes2 = Attributes.getComponentAttributesFromClass(UIAttachQueue.class, getClass());
+ attributes2 = Attributes.getComponentAttributesFromFacesConfig(UIAttachQueue.class, getClass());
initializeAttributes(attributes2);
attributes2.setAttribute("requestDelay", 1500);
}
-
+
private void initializeAttributes(Attributes attributes) {
attributes.setAttribute("rendered", true);
-
+
// hidden attributes
attributes.remove("queueId");
-
+
// not implemented yet
// TODO RFPL-734
attributes.remove("name");
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JCommandButtonBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JCommandButtonBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JCommandButtonBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -26,6 +26,7 @@
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.event.ActionEvent;
+
import org.richfaces.component.UICommandButton;
import org.richfaces.tests.metamer.Attributes;
import org.slf4j.Logger;
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JCommandLinkBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JCommandLinkBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JCommandLinkBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -22,10 +22,12 @@
package org.richfaces.tests.metamer.bean;
import java.io.Serializable;
+
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.event.ActionEvent;
+
import org.richfaces.component.UICommandLink;
import org.richfaces.tests.metamer.Attributes;
import org.slf4j.Logger;
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JJSFunctionBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JJSFunctionBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JJSFunctionBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -29,8 +29,8 @@
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.event.ActionEvent;
+
import org.richfaces.component.UIFunction;
-
import org.richfaces.tests.metamer.Attributes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JMediaOutputBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JMediaOutputBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JMediaOutputBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -61,7 +61,7 @@
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
- attributes = Attributes.getComponentAttributesFromClass(UIMediaOutput.class, getClass());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIMediaOutput.class, getClass());
attributes.setAttribute("session", true);
attributes.setAttribute("rendered", true);
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JOutputPanelBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JOutputPanelBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JOutputPanelBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -55,8 +55,8 @@
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
- attributes = Attributes.getComponentAttributesFromClass(UIOutputPanel.class, getClass());
-
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIOutputPanel.class, getClass());
+
attributes.setAttribute("ajaxRendered", true);
attributes.setAttribute("layout", "block");
attributes.setAttribute("rendered", true);
@@ -94,6 +94,4 @@
counter++;
return null;
}
-
}
-
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPollBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPollBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPollBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -57,8 +57,8 @@
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
- attributes = Attributes.getComponentAttributesFromClass(UIPoll.class, getClass());
-
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIPoll.class, getClass());
+
attributes.setAttribute("enabled", true);
attributes.setAttribute("rendered", true);
attributes.setAttribute("interval", 2500);
@@ -115,4 +115,3 @@
counter--;
}
}
-
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPushBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPushBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPushBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -19,7 +19,6 @@
* 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.bean;
import java.io.Serializable;
@@ -31,9 +30,9 @@
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.SessionScoped;
import javax.faces.event.ActionEvent;
+
//import org.ajax4jsf.event.PushEventListener;
import org.richfaces.component.UIPush;
-
import org.richfaces.tests.metamer.Attributes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -53,7 +52,6 @@
private Attributes attributes;
private int counter = 0;
// private transient volatile PushEventListener listener;
-
@ManagedProperty(value = "#{a4jPushEventProcuder}")
private transient A4JPushEventProcuder pushEventProducer;
@@ -102,12 +100,11 @@
public void setAttributes(Attributes attributes) {
this.attributes = attributes;
}
-
+
// public void setListener(EventListener listener) {
// this.listener = (PushEventListener) listener;
// pushEventProducer.registerListener(this.listener);
// }
-
public int getCounter() {
return counter;
}
@@ -134,4 +131,3 @@
return new Date();
}
}
-
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPushEventProcuder.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPushEventProcuder.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JPushEventProcuder.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JQueueBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JQueueBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JQueueBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -26,8 +26,8 @@
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
-import org.richfaces.component.UIQueue;
+import org.richfaces.component.UIQueue;
import org.richfaces.tests.metamer.Attributes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -46,7 +46,6 @@
private static Logger logger;
private Attributes attributes;
private String text;
-
private A4JQueueBean globalQueue;
private A4JQueueBean formQueue1;
private A4JQueueBean formQueue2;
@@ -60,7 +59,7 @@
logger.debug("initializing bean " + getClass().getName());
// initialize attributes
- attributes = Attributes.getComponentAttributesFromClass(UIQueue.class, getClass());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIQueue.class, getClass());
attributes.setAttribute("rendered", true);
attributes.setAttribute("requestDelay", 750);
@@ -106,7 +105,7 @@
}
return formQueue2;
}
-
+
public A4JQueueBean[] getFormQueues() {
return new A4JQueueBean[]{getFormQueue1(), getFormQueue2()};
}
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRegionBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRegionBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRegionBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -47,11 +47,11 @@
public class A4JRegionBean implements Serializable {
private static final long serialVersionUID = -1L;
- private static final SelectItem[] AVAILABLE_EXECUTE_OPTIONS = new SelectItem[] { new SelectItem(null, "default"),
+ private static final SelectItem[] AVAILABLE_EXECUTE_OPTIONS = new SelectItem[]{new SelectItem(null, "default"),
new SelectItem("@all"), new SelectItem("@form"), new SelectItem("@region"), new SelectItem("@this"),
new SelectItem("outerValueInput", "Outer"), new SelectItem("regionValueInput", "Region"),
new SelectItem("nestedRegionValueInput", "Nested region"),
- new SelectItem("decorationValueInput", "Decoration"), new SelectItem("insertionValueInput", "Insertion") };
+ new SelectItem("decorationValueInput", "Decoration"), new SelectItem("insertionValueInput", "Insertion")};
private static Logger logger;
// for page simple.xhtml
private Attributes attributes;
@@ -81,7 +81,7 @@
user1 = new Employee();
user2 = new Employee();
- attributes = Attributes.getComponentAttributesFromClass(UIRegion.class, getClass());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIRegion.class, getClass());
attributes.setAttribute("rendered", true);
}
@@ -162,7 +162,7 @@
public void setOuterExecute(String outerExecute) {
this.outerExecute = outerExecute;
}
-
+
public String getInsertionExecute() {
return insertionExecute;
}
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRepeatBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRepeatBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRepeatBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -143,7 +143,7 @@
}
// initialize attributes
- attributes = Attributes.getComponentAttributesFromClass(UIRepeat.class, getClass());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIRepeat.class, getClass());
attributes.setAttribute("rendered", true);
// TODO has to be tested in other way
attributes.remove("componentState");
@@ -155,7 +155,7 @@
attributes.remove("value");
attributes.remove("stateVar");
attributes.remove("var");
-
+
// should be hidden
attributes.remove("relativeRowIndex");
attributes.remove("rowAvailable");
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JStatusBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JStatusBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JStatusBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -45,7 +45,6 @@
private static final long serialVersionUID = -1L;
private static Logger logger;
private Attributes attributes;
-
private String facetStartValue = "START";
private String facetStopValue = "STOP";
private String facetErrorValue = "ERROR";
@@ -58,7 +57,7 @@
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
- attributes = Attributes.getComponentAttributesFromClass(UIStatus.class, getClass());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIStatus.class, getClass());
attributes.setAttribute("rendered", true);
// hidden attributes
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAutocompleteBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAutocompleteBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAutocompleteBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -30,8 +30,8 @@
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.SessionScoped;
+
import org.richfaces.component.UIAutocomplete;
-
import org.richfaces.tests.metamer.Attributes;
import org.richfaces.tests.metamer.model.Capital;
import org.slf4j.Logger;
@@ -63,7 +63,7 @@
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
- attributes = Attributes.getComponentAttributesFromClass(UIAutocomplete.class, getClass());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIAutocomplete.class, getClass());
attributes.setAttribute("converterMessage", "converter message");
attributes.setAttribute("mode", "ajax");
attributes.setAttribute("rendered", true);
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataGridBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataGridBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataGridBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -19,7 +19,6 @@
* 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.bean;
import java.io.Serializable;
@@ -49,7 +48,7 @@
// true = model, false = empty table
private boolean state = true;
private int page = 1;
-
+
/**
* Initializes the managed bean.
*/
@@ -58,11 +57,11 @@
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
- attributes = Attributes.getComponentAttributesFromClass(UIDataGrid.class, getClass());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIDataGrid.class, getClass());
attributes.setAttribute("columns", 3);
attributes.setAttribute("rendered", true);
-
+
// TODO has to be tested in other way
attributes.remove("componentState");
attributes.remove("rowKeyVar");
@@ -70,7 +69,7 @@
attributes.remove("stateVar");
attributes.remove("value");
attributes.remove("var");
-
+
// should be hidden
attributes.remove("rows");
attributes.remove("rowAvailable");
@@ -104,5 +103,4 @@
public void setPage(int page) {
this.page = page;
}
-
}
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataScrollerBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataScrollerBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataScrollerBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -19,7 +19,6 @@
* 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.bean;
import java.io.Serializable;
@@ -48,7 +47,7 @@
private Attributes attributes;
private int page = 1;
private boolean state = true;
-
+
/**
* Initializes the managed bean.
*/
@@ -57,8 +56,8 @@
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
- attributes = Attributes.getComponentAttributesFromClass(UIDataScroller.class, getClass());
-
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIDataScroller.class, getClass());
+
attributes.setAttribute("boundaryControls", "show");
attributes.setAttribute("fastControls", "show");
attributes.setAttribute("fastStep", 1);
@@ -114,5 +113,4 @@
public void setState(boolean state) {
this.state = state;
}
-
}
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataTableBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataTableBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataTableBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -87,7 +87,7 @@
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
- attributes = Attributes.getComponentAttributesFromClass(UIDataTable.class, getClass());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIDataTable.class, getClass());
attributes.setAttribute("rendered", true);
attributes.setAttribute("rows", 10);
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichExtendedDataTableBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichExtendedDataTableBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichExtendedDataTableBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -19,7 +19,6 @@
* 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.bean;
import java.io.Serializable;
@@ -59,24 +58,23 @@
private int page = 1;
// true = model, false = empty table
private boolean state = true;
-
// sorting
private ColumnSortingMap sorting = new ColumnSortingMap() {
+
private static final long serialVersionUID = 1L;
+
protected UIDataTableBase getBinding() {
return binding;
}
+
protected Attributes getAttributes() {
return attributes;
}
};
-
// filtering
private Map<String, Object> filtering = new HashMap<String, Object>();
-
// facets
private Map<String, String> facets = new HashMap<String, String>();
-
private UIExtendedDataTable binding;
/**
@@ -87,13 +85,13 @@
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
- attributes = Attributes.getComponentAttributesFromClass(UIExtendedDataTable.class, getClass());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIExtendedDataTable.class, getClass());
attributes.setAttribute("rendered", true);
attributes.setAttribute("rows", 30);
attributes.setAttribute("styleClass", "extended-data-table");
attributes.setAttribute("style", null);
-
+
// setup types
attributes.get("selection").setType(TreeSet.class);
attributes.get("selection").setMemberType(Integer.class);
@@ -215,7 +213,7 @@
public boolean accept(Employee e) {
String sex = (String) getFiltering().get("sex");
if (sex == null || sex.length() == 0 || sex.equalsIgnoreCase("all")
- || sex.equalsIgnoreCase(e.getSex().toString())) {
+ || sex.equalsIgnoreCase(e.getSex().toString())) {
return true;
}
return false;
@@ -234,8 +232,4 @@
public Map<String, Object> getFiltering() {
return filtering;
}
-
-
-
-
}
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceSelectBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceSelectBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceSelectBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -31,8 +31,8 @@
import javax.faces.bean.ViewScoped;
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
+
import org.richfaces.component.UIInplaceSelect;
-
import org.richfaces.tests.metamer.Attributes;
import org.richfaces.tests.metamer.model.Capital;
import org.slf4j.Logger;
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichJQueryBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichJQueryBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichJQueryBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -61,7 +61,7 @@
componentsDataList = new ArrayList<String>();
addComponent();
- attributes = Attributes.getComponentAttributesFromClass(UIJQuery.class, getClass());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIJQuery.class, getClass());
attributes.setAttribute("event", "click");
attributes.setAttribute("name", "bubu");
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuSeparatorBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuSeparatorBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuSeparatorBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -22,9 +22,11 @@
package org.richfaces.tests.metamer.bean;
import java.io.Serializable;
+
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
+
import org.richfaces.component.UIMenuSeparator;
import org.richfaces.tests.metamer.Attributes;
import org.slf4j.Logger;
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -54,7 +54,7 @@
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
- attributes = Attributes.getComponentAttributesFromClass(UIPanel.class, getClass());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIPanel.class, getClass());
attributes.setAttribute("rendered", true);
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichProgressBarBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichProgressBarBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichProgressBarBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -60,7 +60,7 @@
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
- attributes = Attributes.getComponentAttributesFromClass(UIProgressBar.class, getClass());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIProgressBar.class, getClass());
attributes.setAttribute("maxValue", 100);
attributes.setAttribute("minValue", 0);
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabBean.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabBean.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -27,7 +27,7 @@
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
-import org.richfaces.component.AbstractTab;
+import org.richfaces.component.UITab;
import org.richfaces.tests.metamer.Attributes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -54,7 +54,7 @@
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
- attributes = Attributes.getComponentAttributesFromClass(AbstractTab.class, getClass());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UITab.class, getClass());
attributes.setAttribute("header", "tab1 header");
attributes.setAttribute("name", "tab1");
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/CalendarModel.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/CalendarModel.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/CalendarModel.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/CalendarModelItem.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/CalendarModelItem.java 2011-01-19 11:19:22 UTC (rev 21076)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/CalendarModelItem.java 2011-01-19 12:23:59 UTC (rev 21077)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
13 years, 11 months
JBoss Rich Faces SVN: r21076 - in modules/tests/metamer/trunk: ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jLog and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-01-19 06:19:22 -0500 (Wed, 19 Jan 2011)
New Revision: 21076
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JLogBean.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jLog/TestA4JLog.java
Log:
* sample and tests for a4j:log fixed
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JLogBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JLogBean.java 2011-01-19 10:31:30 UTC (rev 21075)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JLogBean.java 2011-01-19 11:19:22 UTC (rev 21076)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -57,7 +57,7 @@
name = "John";
- attributes = Attributes.getComponentAttributesFromClass(UIAjaxLog.class, getClass());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIAjaxLog.class, getClass());
attributes.setAttribute("rendered", true);
attributes.setAttribute("level", "debug");
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jLog/TestA4JLog.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jLog/TestA4JLog.java 2011-01-19 10:31:30 UTC (rev 21075)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jLog/TestA4JLog.java 2011-01-19 11:19:22 UTC (rev 21076)
@@ -195,8 +195,8 @@
private void testLogging(LogLevel logLevel, LogLevel filterLevel) {
JQueryLocator logButton = pjq("input[id$=" + logLevel.toString().toLowerCase() + "Button]");
JQueryLocator levelInput = pjq("input[type=radio][value=" + filterLevel.toString().toLowerCase() + "]");
- JQueryLocator msgType = logMsg.getChild(jq("span:eq(0)"));
- JQueryLocator msgContent = logMsg.getChild(jq("span:eq(1)"));
+ JQueryLocator msgType = logMsg.getChild(jq("span.rf-log-entry-lbl"));
+ JQueryLocator msgContent = logMsg.getChild(jq("span.rf-log-entry-msg"));
if (filterLevel != LogLevel.DEBUG) {
selenium.click(levelInput);
@@ -217,10 +217,9 @@
return;
}
- String output = selenium.getText(msgType).replaceAll(" *\\[.*\\]:$", "");
- assertEquals(output, logLevel.toString().toLowerCase(), "Message type in log.");
- output = selenium.getText(msgContent);
- assertEquals(output, logLevel.toString(), "Message content.");
-
+ String loggedValue = selenium.getText(msgType).replaceAll(" *\\[.*\\]:$", "");
+ assertEquals(loggedValue, logLevel.toString().toLowerCase(), "Message type in log.");
+ loggedValue = selenium.getText(msgContent);
+ assertEquals(loggedValue, logLevel.toString(), "Message content.");
}
}
13 years, 11 months