JBoss Rich Faces SVN: r3284 - in trunk/ui/panelmenu/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-10-05 11:22:17 -0400 (Fri, 05 Oct 2007)
New Revision: 3284
Modified:
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
trunk/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx
Log:
RF-1070
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2007-10-05 13:56:15 UTC (rev 3283)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2007-10-05 15:22:17 UTC (rev 3284)
@@ -22,6 +22,7 @@
package org.richfaces.renderkit.html;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -31,13 +32,14 @@
import java.util.Set;
import javax.faces.component.UIComponent;
+import javax.faces.component.UIParameter;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import javax.faces.event.ActionEvent;
-import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.Messages;
+import org.ajax4jsf.javascript.JSFunction;
+import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
-import org.ajax4jsf.javascript.JSFunction;
import org.richfaces.component.UIPanelMenu;
import org.richfaces.component.UIPanelMenuGroup;
import org.richfaces.component.UIPanelMenuItem;
@@ -52,6 +54,41 @@
return UIComponent.class;
}
+ // find and encode UIParameter's components
+ public List encodeParams(FacesContext context, UIPanelMenuItem component) throws IOException {
+
+ UIPanelMenuItem menuItem = component;
+ List params = new ArrayList();
+ StringBuffer buff = new StringBuffer();
+
+ List children = menuItem.getChildren();
+ for (Iterator iterator = children.iterator(); iterator.hasNext();) {
+ UIComponent child = (UIComponent) iterator.next();
+
+ if(child instanceof UIParameter){
+
+ UIParameter param = (UIParameter)child;
+ String name = param.getName();
+
+ if (null == name) {
+ throw new IllegalArgumentException(Messages.getMessage(
+ Messages.UNNAMED_PARAMETER_ERROR, component.getClientId(context)));
+ }
+
+ Object value = param.getValue();
+ buff.append("params[");
+ buff.append(ScriptUtils.toScript(name));
+ buff.append("] = ");
+ buff.append(ScriptUtils.toScript(value));
+ buff.append(";");
+ params.add(buff.toString());
+ }
+ }
+
+ return params;
+ }
+
+
public void insertScript(FacesContext context, UIComponent component)
throws IOException {
@@ -122,8 +159,11 @@
if (null == target)
targetString = "";
else
- targetString = target.toString();
+ targetString = target.toString();
+
+
+
if (childRendered && parentRendered){
if ( !isParentDisabled(child) ){
String childName;
@@ -139,8 +179,19 @@
itemNames.add(childName);
}
+
+ if(child instanceof UIPanelMenuItem){
+ List paramsList = encodeParams(context, (UIPanelMenuItem)child);
+ if(!paramsList.isEmpty()){
+ buffer.append("var params = new Object();");
+ for (Iterator iterator = paramsList.iterator(); iterator.hasNext();) {
+ buffer.append(iterator.next());
+ }
+ }
+ }
+
buffer
- .append("new PanelMenuItem({myId:'")
+ .append("new PanelMenuItem(params,{myId:'")
.append((String) child.getClientId(context))
.append("',parentId:'")
.append((String) child.getParent().getClientId(context))
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 2007-10-05 13:56:15 UTC (rev 3283)
+++ trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2007-10-05 15:22:17 UTC (rev 3284)
@@ -27,14 +27,17 @@
PanelMenuItem = Class.create();
PanelMenuItem.prototype = {
- initialize: function(ids, options, hoveredStyles, hoveredClasses, level, haveDynamicIcon, action, opened, ajaxFunction, onItemHover, iconAlign, iconExpanded, iconCollapsed, iconSpacer){
+ initialize: function(params,ids, options, hoveredStyles, hoveredClasses, level, haveDynamicIcon, action, opened, ajaxFunction, onItemHover, iconAlign, iconExpanded, iconCollapsed, iconSpacer){
if (!ids.parentId){return};
this.type = options.type;
this.onopen = options.onopen;
+ this.itemId = ids.myId;
this.onclose = options.onclose;
this.event = options.event;
this.disabled = options.disabled;
this.name = options.name;
+ this.params = params;
+ this.myId = ids.myId;
this.mode = options.mode;
if (!this.mode)
@@ -214,7 +217,9 @@
if ("server" == this.mode) {
if (this.target)
form.target = this.target;
- form.submit();
+
+ Richfaces.jsFormSubmit(this.myId, form.name, this.target,this.params);
+ //form.submit();
}
else if ("ajax" == this.mode) {
var event = e;
Modified: trunk/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx
===================================================================
--- trunk/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx 2007-10-05 13:56:15 UTC (rev 3283)
+++ trunk/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx 2007-10-05 15:22:17 UTC (rev 3284)
@@ -17,7 +17,9 @@
<h:scripts>
new org.ajax4jsf.javascript.PrototypeScript(),
new org.ajax4jsf.javascript.AjaxScript(),
- /org/richfaces/renderkit/html/scripts/utils.js,
+ /org/richfaces/renderkit/html/scripts/utils.js,
+ /org/ajax4jsf/javascript/scripts/form.js,
+ /org/richfaces/renderkit/html/scripts/form.js
/org/richfaces/renderkit/html/scripts/panelMenu.js,
</h:scripts>
17 years, 2 months
JBoss Rich Faces SVN: r3283 - trunk/ui/scrollableDataTable/src/main/java/org/richfaces/model/internal.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-10-05 09:56:15 -0400 (Fri, 05 Oct 2007)
New Revision: 3283
Modified:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/model/internal/ComponentSortableDataModel.java
Log:
RF-1043
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/model/internal/ComponentSortableDataModel.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/model/internal/ComponentSortableDataModel.java 2007-10-05 13:29:41 UTC (rev 3282)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/model/internal/ComponentSortableDataModel.java 2007-10-05 13:56:15 UTC (rev 3283)
@@ -27,6 +27,7 @@
import java.util.List;
import javax.faces.context.FacesContext;
+import javax.faces.model.DataModel;
import org.richfaces.model.ScrollableTableDataModel;
import org.richfaces.model.SortField;
@@ -65,6 +66,7 @@
private List wrappedList;
+ DataModel model;
private String var;
public ComponentSortableDataModel(String var, Object value) {
@@ -76,12 +78,7 @@
* @see org.richfaces.model.ScrollableTableDataModel#loadData(int, int, org.richfaces.model.SortOrder)
*/
public List loadData(int startRow, int endRow, SortOrder sortOrder) {
-
-
- List sortedCollection = sortOrder != null ?
- prepareCollection(FacesContext.getCurrentInstance(), new ArrayList(wrappedList), sortOrder) : wrappedList;
-
-
+ List list = null;
int rc = getRowCount();
if (startRow < 0) {
startRow = 0;
@@ -90,24 +87,51 @@
if (endRow > rc) {
endRow = rc;
}
-
- return sortedCollection.subList(startRow, endRow);
+ if (sortOrder == null) {
+ if(model != null) {
+ list = new ArrayList(rc);
+ for (int i = startRow; i < endRow; i++) {
+ model.setRowIndex(i);
+ list.add(model.getRowData());
+ }
+ } else {
+ list = wrappedList.subList(startRow, endRow);
+ }
+ } else {
+ if(model != null) {
+ list = new ArrayList(rc);
+ for (int i = 0; i < rc; i++) {
+ model.setRowIndex(i);
+ list.add(model.getRowData());
+ }
+ } else {
+ list = new ArrayList(wrappedList);
+ }
+ list = prepareCollection(FacesContext.getCurrentInstance(), list, sortOrder).subList(startRow, endRow);
+ }
+ return list;
}
/* (non-Javadoc)
* @see javax.faces.model.DataModel#getRowCount()
*/
public int getRowCount() {
- // TODO Auto-generated method stub
- return wrappedList.size();
+ if (model != null) {
+ return model.getRowCount();
+ } else {
+ return wrappedList.size();
+ }
}
/* (non-Javadoc)
* @see javax.faces.model.DataModel#getWrappedData()
*/
public Object getWrappedData() {
- // TODO Auto-generated method stub
- return wrappedList;
+ if (model != null) {
+ return model;
+ } else {
+ return wrappedList;
+ }
}
/* (non-Javadoc)
@@ -132,6 +156,8 @@
wrappedList = new ArrayList((Collection) value);
+ } else if (value instanceof DataModel) {
+ model = (DataModel)value;
} else {
wrappedList = new ArrayList(1);
wrappedList.add(value);
17 years, 2 months
JBoss Rich Faces SVN: r3282 - branches/3.1.x.
by richfaces-svn-commits@lists.jboss.org
Author: afrancuzov
Date: 2007-10-05 09:29:41 -0400 (Fri, 05 Oct 2007)
New Revision: 3282
Modified:
branches/3.1.x/release notes.txt
Log:
Modified: branches/3.1.x/release notes.txt
===================================================================
--- branches/3.1.x/release notes.txt 2007-10-05 13:18:15 UTC (rev 3281)
+++ branches/3.1.x/release notes.txt 2007-10-05 13:29:41 UTC (rev 3282)
@@ -24,6 +24,7 @@
* [RF-934] - Calendar: converter is not working
* [RF-935] - TogglePanel: breakes inside repeat
* [RF-936] - PanelMenu: partial background in Opera
+ * [RF-938] - scrollableDataTable - jumping on intitialization
* [RF-945] - calendar. Selection doesn't applied with a4j:support inside calendar
* [RF-949] - can't use parameters using menu server mode
* [RF-956] - Messages produce unnessesarry html when no messages exsist.
@@ -32,22 +33,28 @@
* [RF-965] - Calendar isn't work in ajax mode.
* [RF-966] - ajaxSingle doesn't work on calendar component
* [RF-967] - PanelMenuItem: ajax attributes missed.
+ * [RF-972] - error when use rich:calendar with datePattern
* [RF-973] - Sorting doesn't work after rerender ScrollableDataTable using ajax.
+ * [RF-975] - Modal Panel - showWhenRendered EL binding provides errors
* [RF-976] - rich:column width property throws pointless exceptions
* [RF-981] - Menu Components do not support non-latin character
* [RF-984] - Calendar exception
* [RF-985] - Test application. Data filter slider not rendered
* [RF-986] - DataTable's BGcolor can't be changed
+ * [RF-991] - dragIndicator.xcss linked to twice, with different URLs
* [RF-992] - calendar: the typo in style attribute
* [RF-993] - drag-n-drop on the tree: Problem with Netscape 7.1
+ * [RF-1016] - ToggleControlRenderer doDecode does not consider action/actionListener attributes
* [RF-1019] - ui/create.bat does not contain the good CDK reference
* [RF-1020] - Images for a tree lines not loaded after application restart.
* # RF-1022 suggestionBox closes unexpectedly in IE if the page vertical scroller is not at 0 position
* # RF-1028 Calendar performs unnesessary submit
+ * [RF-1033] - Data table: fix test sample in test application
* # RF-1039 onClick attribute for toolbargroup
* # RF-1055 Scrollable Data Table - missing resource exception
* # RF-1056 exception on access ty generated resources in Jboss Seam
* # RF-1061 blank page displayed after network error in AJAX request
+ * [RF-1063] - scrollableDataTable: the resizer marker is not at the right position in FF after increasing the column lenght
* # RF-1064 ResourceLifecycle? fails to restore UIViewRoot?. Junit tests affected only.
** Feature Request
17 years, 2 months
JBoss Rich Faces SVN: r3281 - branches/3.1.x/test-applications/qa.
by richfaces-svn-commits@lists.jboss.org
Author: viktor_volkov
Date: 2007-10-05 09:18:15 -0400 (Fri, 05 Oct 2007)
New Revision: 3281
Modified:
branches/3.1.x/test-applications/qa/QA test report Build RF3.1.1 CR2.xls
Log:
Modified: branches/3.1.x/test-applications/qa/QA test report Build RF3.1.1 CR2.xls
===================================================================
(Binary files differ)
17 years, 2 months
JBoss Rich Faces SVN: r3280 - branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-10-05 08:39:44 -0400 (Fri, 05 Oct 2007)
New Revision: 3280
Modified:
branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
RF-1072
Modified: branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-10-05 12:37:06 UTC (rev 3279)
+++ branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-10-05 12:39:44 UTC (rev 3280)
@@ -1106,6 +1106,17 @@
}
}
//alert(new Date().getTime()-_d.getTime());
+
+ // hack for IE 6.0 //fix 1072
+ if (Richfaces.browser.isIE6)
+ {
+ var element = $(this.id);
+ if (element)
+ {
+ element.style.width = "0px";
+ element.style.height = "0px";
+ }
+ }
},
renderHeader: function()
{
17 years, 2 months
JBoss Rich Faces SVN: r3279 - trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-10-05 08:37:06 -0400 (Fri, 05 Oct 2007)
New Revision: 3279
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
RF-1072
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-10-05 11:57:31 UTC (rev 3278)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-10-05 12:37:06 UTC (rev 3279)
@@ -1106,6 +1106,17 @@
}
}
//alert(new Date().getTime()-_d.getTime());
+
+ // hack for IE 6.0 //fix 1072
+ if (Richfaces.browser.isIE6)
+ {
+ var element = $(this.id);
+ if (element)
+ {
+ element.style.width = "0px";
+ element.style.height = "0px";
+ }
+ }
},
renderHeader: function()
{
17 years, 2 months
JBoss Rich Faces SVN: r3278 - branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-10-05 07:57:31 -0400 (Fri, 05 Oct 2007)
New Revision: 3278
Modified:
branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
RF-1075
Modified: branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-10-05 11:54:26 UTC (rev 3277)
+++ branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-10-05 11:57:31 UTC (rev 3278)
@@ -337,7 +337,7 @@
}
function daysInMonthByDate(date) {
- return 32 - new Date(date.getYear(), date.getMonth(), 32).getDate();
+ return 32 - new Date(date.getFullYear(), date.getMonth(), 32).getDate();
}
function getDay(date, firstWeekDay ) {
17 years, 2 months
JBoss Rich Faces SVN: r3277 - trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-10-05 07:54:26 -0400 (Fri, 05 Oct 2007)
New Revision: 3277
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
RF-1075
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-10-05 11:45:57 UTC (rev 3276)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-10-05 11:54:26 UTC (rev 3277)
@@ -337,7 +337,7 @@
}
function daysInMonthByDate(date) {
- return 32 - new Date(date.getYear(), date.getMonth(), 32).getDate();
+ return 32 - new Date(date.getFullYear(), date.getMonth(), 32).getDate();
}
function getDay(date, firstWeekDay ) {
17 years, 2 months
JBoss Rich Faces SVN: r3275 - branches/3.1.x/test-applications/qa.
by richfaces-svn-commits@lists.jboss.org
Author: viktor_volkov
Date: 2007-10-05 07:02:59 -0400 (Fri, 05 Oct 2007)
New Revision: 3275
Modified:
branches/3.1.x/test-applications/qa/QA test report Build RF3.1.1 CR2.xls
Log:
Modified: branches/3.1.x/test-applications/qa/QA test report Build RF3.1.1 CR2.xls
===================================================================
(Binary files differ)
17 years, 2 months