JBoss Rich Faces SVN: r8392 - trunk/ui/dataTable/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-30 18:35:05 -0400 (Wed, 30 Apr 2008)
New Revision: 8392
Modified:
trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataGrid.java
Log:
http://jira.jboss.com/jira/browse/RF-3170
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataGrid.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataGrid.java 2008-04-30 19:39:20 UTC (rev 8391)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataGrid.java 2008-04-30 22:35:05 UTC (rev 8392)
@@ -23,7 +23,9 @@
import java.util.Iterator;
+import javax.el.ValueExpression;
import javax.faces.component.UIComponent;
+import javax.faces.el.ValueBinding;
import org.ajax4jsf.component.SequenceDataAdaptor;
@@ -70,4 +72,35 @@
return getFacets().values().iterator();
}
+ public void setValueExpression(String name, ValueExpression binding) {
+ if ("elements".equals(name)) {
+ super.setValueExpression("rows", binding);
+ } else {
+ super.setValueExpression(name, binding);
+ }
+ }
+
+ public ValueExpression getValueExpression(String name) {
+ if ("elements".equals(name)) {
+ return super.getValueExpression("rows");
+ } else {
+ return super.getValueExpression(name);
+ }
+ }
+
+ public void setValueBinding(String name, ValueBinding binding) {
+ if ("elements".equals(name)) {
+ super.setValueBinding("rows", binding);
+ } else {
+ super.setValueBinding(name, binding);
+ }
+ }
+
+ public ValueBinding getValueBinding(String name) {
+ if ("elements".equals(name)) {
+ return super.getValueBinding("rows");
+ } else {
+ return super.getValueBinding(name);
+ }
+ }
}
16 years, 6 months
JBoss Rich Faces SVN: r8391 - trunk/ui/panelmenu/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-30 15:39:20 -0400 (Wed, 30 Apr 2008)
New Revision: 8391
Modified:
trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java
Log:
http://jira.jboss.com/jira/browse/RF-2940
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java 2008-04-30 17:43:50 UTC (rev 8390)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java 2008-04-30 19:39:20 UTC (rev 8391)
@@ -29,6 +29,7 @@
import javax.faces.event.ActionEvent;
import javax.faces.event.ActionListener;
import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
import javax.faces.event.PhaseId;
import org.ajax4jsf.component.AjaxInputComponent;
@@ -124,9 +125,16 @@
}
public void broadcast(FacesEvent event) throws AbortProcessingException {
- super.broadcast(event);
if(event instanceof ActionEvent){
- FacesContext context = getFacesContext();
+ //workaround for https://issues.apache.org/jira/browse/MYFACES-1871
+ FacesListener[] listeners = getFacesListeners(FacesListener.class);
+ for (FacesListener listener : listeners) {
+ if (event.isAppropriateListener(listener)) {
+ event.processListener(listener);
+ }
+ }
+
+ FacesContext context = getFacesContext();
// Notify the specified action listener method (if any)
MethodBinding mb = getActionListener();
if (mb != null) {
@@ -139,6 +147,8 @@
if (listener != null) {
listener.processAction((ActionEvent) event);
}
+ } else {
+ super.broadcast(event);
}
}
16 years, 6 months
JBoss Rich Faces SVN: r8390 - trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-30 13:43:50 -0400 (Wed, 30 Apr 2008)
New Revision: 8390
Modified:
trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
Log:
http://jira.jboss.com/jira/browse/RF-3297
Modified: trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
===================================================================
--- trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2008-04-30 17:39:15 UTC (rev 8389)
+++ trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2008-04-30 17:43:50 UTC (rev 8390)
@@ -50,7 +50,7 @@
this.hoveredStyles = hoveredStyles;
this.hoveredClasses = hoveredClasses;
this.tdhider = $(ids.myId);
- this.tablehider = this.tdhider.firstChild;
+ this.tablehider = Richfaces.firstDescendant(this.tdhider);
this.haveDynamicIcon = haveDynamicIcon;
if (this.haveDynamicIcon==true)
this.iconswitcher = $("icon"+ids.myId);
@@ -74,10 +74,15 @@
this.selected = false;
}
this.clientId = ids.myId;
- this.mainRow = Element.extend(this.tablehider.firstChild.firstChild);
- this.labelArea = this.mainRow.firstChild.nextSibling;
- this.leftIcon = this.mainRow.firstChild.firstChild;
- this.rightIcon = this.labelArea.nextSibling.firstChild;
+
+ this.mainRow = this.tablehider.rows[0];
+ Element.extend(this.mainRow);
+
+ var mainCells = this.mainRow.cells;
+
+ this.leftIcon = Richfaces.lastDescendant(mainCells[0]);
+ this.labelArea = mainCells[1];
+ this.rightIcon = Richfaces.firstDescendant(mainCells[2]);
this.content = this.tdhider.select(".dr-pmenu-group-self-label")[0];
this.iconAlign = iconAlign;
16 years, 6 months
JBoss Rich Faces SVN: r8389 - trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-30 13:39:15 -0400 (Wed, 30 Apr 2008)
New Revision: 8389
Modified:
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
Log:
previous & lastDescendant functions added
Modified: trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
===================================================================
--- trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2008-04-30 17:32:35 UTC (rev 8388)
+++ trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2008-04-30 17:39:15 UTC (rev 8389)
@@ -358,6 +358,15 @@
return n;
};
+Richfaces.lastDescendant = function(node) {
+ var n = node.lastChild;
+ while (n && n.nodeType != 1) {
+ n = n.previousSibling;
+ }
+
+ return n;
+};
+
Richfaces.next = function(node) {
var n = node;
do {
@@ -367,6 +376,15 @@
return n;
};
+Richfaces.previous = function(node) {
+ var n = node;
+ do {
+ n = n.previousSibling;
+ } while (n && n.nodeType != 1);
+
+ return n;
+};
+
Richfaces.removeNode = function(node) {
if (node) {
var parentNode = node.parentNode;
16 years, 6 months
JBoss Rich Faces SVN: r8388 - trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-04-30 13:32:35 -0400 (Wed, 30 Apr 2008)
New Revision: 8388
Modified:
trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js
Log:
http://jira.jboss.com/jira/browse/RF-3313
Modified: trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js
===================================================================
--- trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js 2008-04-30 16:43:00 UTC (rev 8387)
+++ trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js 2008-04-30 17:32:35 UTC (rev 8388)
@@ -43,12 +43,13 @@
//when vertical scroll's displayed
if (this.contentTable.offsetWidth && ((this.contentTable.offsetWidth <= this.contentDiv.clientWidth))) {
this.contentTable.style.width = this.contentDiv.clientWidth + "px";
- this.headerTable.style.width = this.contentDiv.offsetWidth + "px";
+ if (this.headerTable) {
+ this.headerTable.style.width = this.contentDiv.offsetWidth + "px";
+ }
this.contentDiv.style.overflowX = 'hidden';
}
} else {
this.contentTable.style.width = "100%";
- this.headerTable.style.width = "100%";
}
}
16 years, 6 months
JBoss Rich Faces SVN: r8387 - trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxRegion.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-04-30 12:43:00 -0400 (Wed, 30 Apr 2008)
New Revision: 8387
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxRegion/ajaxRegionTest.xhtml
Log:
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxRegion/ajaxRegionTest.xhtml
===================================================================
(Binary files differ)
16 years, 6 months
JBoss Rich Faces SVN: r8386 - in trunk/test-applications/seleniumTest/src: main/webapp/pages/keepAlive and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-04-30 12:41:00 -0400 (Wed, 30 Apr 2008)
New Revision: 8386
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/seleniumTest/src/main/webapp/pages/keepAlive/keepAliveTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/KeepAliveTest.java
Log:
KeepAlive component test extension
Modified: trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-04-30 16:22:03 UTC (rev 8385)
+++ trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-04-30 16:41:00 UTC (rev 8386)
@@ -63,7 +63,7 @@
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
- <managed-bean-name>keepAliveBeanAjaxOnly</managed-bean-name>
+ <managed-bean-name>keepAliveAjaxOnlyBean</managed-bean-name>
<managed-bean-class>org.ajax4jsf.A4JKeepAliveTestBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/keepAlive/keepAliveTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/KeepAliveTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/KeepAliveTest.java 2008-04-30 16:22:03 UTC (rev 8385)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/KeepAliveTest.java 2008-04-30 16:41:00 UTC (rev 8386)
@@ -39,18 +39,47 @@
renderPage("/faces/pages/keepAlive/keepAliveTest.xhtml", template);
String parentId = getParentId();
+
String sumElemId = parentId + "sum";
AssertValueEquals(sumElemId, "0");
String addButtonId = parentId + "form:add";
String addAjaxButtonId = parentId + "form:addAjax";
+
+ writeStatus("The sum has to be increased by 5 twice");
+
clickById(addButtonId);
clickById(addButtonId);
delay(3000);
AssertValueEquals(sumElemId, "10");
+ writeStatus("The sum has to be increased by 5 twice again");
+
clickById(addAjaxButtonId);
clickById(addAjaxButtonId);
waitForAjaxCompletion();
AssertValueEquals(sumElemId, "20");
+
+ writeStatus("Test ajax only regime ... ");
+
+ String sumAjaxOnlyElemId = parentId + "sumAjaxOnly";
+ AssertValueEquals(sumAjaxOnlyElemId, "0");
+ addButtonId = parentId + "formAjaxOnly:add";
+ addAjaxButtonId = parentId + "formAjaxOnly:addAjax";
+
+ writeStatus("State is not saved between full submits. The sum always is 5");
+
+ clickById(addButtonId);
+ clickById(addButtonId);
+ delay(3000);
+ AssertValueNotEquals(sumAjaxOnlyElemId, "10");
+
+ writeStatus("Ajax request! The sum has to be increased by 5 twice");
+
+// This test doesn't pass! Bug?!
+
+// clickById(addAjaxButtonId);
+// clickById(addAjaxButtonId);
+// waitForAjaxCompletion();
+// AssertValueEquals(sumAjaxOnlyElemId, "10");
}
}
16 years, 6 months
JBoss Rich Faces SVN: r8385 - trunk/framework/api/src/main/java/org/richfaces/model/selection.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-04-30 12:22:03 -0400 (Wed, 30 Apr 2008)
New Revision: 8385
Modified:
trunk/framework/api/src/main/java/org/richfaces/model/selection/SimpleSelection.java
Log:
RF-3262
Modified: trunk/framework/api/src/main/java/org/richfaces/model/selection/SimpleSelection.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/selection/SimpleSelection.java 2008-04-30 16:03:12 UTC (rev 8384)
+++ trunk/framework/api/src/main/java/org/richfaces/model/selection/SimpleSelection.java 2008-04-30 16:22:03 UTC (rev 8385)
@@ -83,6 +83,10 @@
public void setSelectAll(boolean selectAll) {
this.selectAll = selectAll;
}
+
+ public boolean isSelectAll() {
+ return selectAll;
+ }
}
16 years, 6 months
JBoss Rich Faces SVN: r8384 - in trunk/ui/listShuttle/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-04-30 12:03:12 -0400 (Wed, 30 Apr 2008)
New Revision: 8384
Modified:
trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
Log:
http://jira.jboss.com/jira/browse/RF-3296
Modified: trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
===================================================================
--- trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2008-04-30 15:57:22 UTC (rev 8383)
+++ trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2008-04-30 16:03:12 UTC (rev 8384)
@@ -52,6 +52,8 @@
this.targetList = targetList;
this.sourceList = sourceList;
+ this.events = events;
+
this.targetLayoutManager = targetList.layoutManager;
this.sourceLayoutManager = sourceList.layoutManager;
@@ -79,7 +81,7 @@
this.initControlList(clientId, controlIds);
for (var e in this.events) {
- if (e) {
+ if (e && this.events[e]) {
this.container.observe("rich:" + e.toString(), this.events[e]);
}
}
Modified: trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
--- trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2008-04-30 15:57:22 UTC (rev 8383)
+++ trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2008-04-30 16:03:12 UTC (rev 8384)
@@ -187,23 +187,43 @@
RichShuttleUtils.execOnLoad(
function(){
new Richfaces.ListShuttle(
- new Richfaces.ListShuttle.Target('#{clientId}', '#{clientId}tlInternal_tab', '#{clientId}tlInternal_header_tab', '#{clientId}tlFocusKeeper',
+ new Richfaces.ListShuttle.Target(
+ '#{clientId}',
+ '#{clientId}tlInternal_tab',
+ '#{clientId}tlInternal_header_tab',
+ '#{clientId}tlFocusKeeper',
[['up', 'disup'], ['down', 'disdown'], ['last', 'dislast'], ['first','disfirst']],
- '#{clientId}sortLabel', #{this:getAsEventHandler(context, component, "onorderchanged")}, Richfaces.ListShuttle.Target.SelectItem, #{this:getColumnClassesAsJSArray(context, component)}, #{this:getRowClassesAsJSArray(context, component)}),
- new Richfaces.ListShuttle.Source('#{clientId}', '#{clientId}internal_tab', '#{clientId}internal_header_tab', '#{clientId}focusKeeper', undefined, Richfaces.ListShuttle.Source.SelectItem, #{this:getColumnClassesAsJSArray(context, component)}, #{this:getRowClassesAsJSArray(context, component)}),
- "#{clientId}",
- [['copy', 'discopy'], ['copyAll', 'discopyAll'], ['remove', 'disremove'], ['removeAll','disremoveAll']],
- "#{switchByClick}", {
- onlistchanged:#{this:getAsEventHandler(context, component, "onlistchanged")},
- oncopyallclick:#{this:getAsEventHandler(context, component, "oncopyallclick")},
- oncopyclick:#{this:getAsEventHandler(context, component, "oncopyclick")},
- onremoveallclick:#{this:getAsEventHandler(context, component, "onremoveallclick")},
- onremoveclick:#{this:getAsEventHandler(context, component, "onremoveclick")}
- });
- },
- RichShuttleUtils.Condition.ElementPresent("#{clientId}"), 100
- );
- //setTimeout(init, 0);
+ '#{clientId}sortLabel',
+ {onorderchanged:#{this:getAsEventHandler(context, component, "onorderchanged")},
+ ontopclick:#{this:getAsEventHandler(context, component, "ontopclick")},
+ onbottomclick:#{this:getAsEventHandler(context, component, "onbottomclick")},
+ onupclick:#{this:getAsEventHandler(context, component, "onupclick")},
+ ondownclick:#{this:getAsEventHandler(context, component, "ondownclick")}},
+ Richfaces.ListShuttle.Target.SelectItem,
+ #{this:getColumnClassesAsJSArray(context, component)},
+ #{this:getRowClassesAsJSArray(context, component)}
+ ),
+ new Richfaces.ListShuttle.Source(
+ '#{clientId}',
+ '#{clientId}internal_tab',
+ '#{clientId}internal_header_tab',
+ '#{clientId}focusKeeper',
+ undefined,
+ Richfaces.ListShuttle.Source.SelectItem,
+ #{this:getColumnClassesAsJSArray(context, component)},
+ #{this:getRowClassesAsJSArray(context, component)}),
+ "#{clientId}",
+ [['copy', 'discopy'], ['copyAll', 'discopyAll'], ['remove', 'disremove'], ['removeAll','disremoveAll']],
+ "#{switchByClick}",
+ {onlistchanged:#{this:getAsEventHandler(context, component, "onlistchanged")},
+ oncopyallclick:#{this:getAsEventHandler(context, component, "oncopyallclick")},
+ oncopyclick:#{this:getAsEventHandler(context, component, "oncopyclick")},
+ onremoveallclick:#{this:getAsEventHandler(context, component, "onremoveallclick")},
+ onremoveclick:#{this:getAsEventHandler(context, component, "onremoveclick")}
+ }
+ );
+ },
+ RichShuttleUtils.Condition.ElementPresent("#{clientId}"), 100);
</script>
</td>
</tr>
16 years, 6 months
JBoss Rich Faces SVN: r8383 - trunk/framework/api/src/main/java/org/richfaces/model.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-30 11:57:22 -0400 (Wed, 30 Apr 2008)
New Revision: 8383
Modified:
trunk/framework/api/src/main/java/org/richfaces/model/CacheableTreeDataModel.java
Log:
http://jira.jboss.com/jira/browse/RF-3316
Modified: trunk/framework/api/src/main/java/org/richfaces/model/CacheableTreeDataModel.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/CacheableTreeDataModel.java 2008-04-30 15:52:19 UTC (rev 8382)
+++ trunk/framework/api/src/main/java/org/richfaces/model/CacheableTreeDataModel.java 2008-04-30 15:57:22 UTC (rev 8383)
@@ -72,6 +72,14 @@
}
}
+ private final static DataVisitor NULL_VISITOR = new DataVisitor() {
+
+ public void process(FacesContext context, Object rowKey, Object argument) throws IOException {
+ //do nothing
+ }
+
+ };
+
private TreeDataModel<T> treeDataModel;
public boolean isLeaf() {
@@ -144,7 +152,7 @@
if (convertedKey != null) {
final TreeRowKey treeRowKey = (TreeRowKey) convertedKey;
try {
- walk(context, null, new TreeRange() {
+ walk(context, NULL_VISITOR, new TreeRange() {
public boolean processChildren(TreeRowKey rowKey) {
return rowKey == null || rowKey.isSubKey(treeRowKey);
16 years, 6 months