JBoss Rich Faces SVN: r17582 - root/core/trunk/impl/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-06-09 09:52:44 -0400 (Wed, 09 Jun 2010)
New Revision: 17582
Modified:
root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces.js
Log:
https://jira.jboss.org/browse/RF-8744
Modified: root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces.js
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces.js 2010-06-09 09:53:10 UTC (rev 17581)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces.js 2010-06-09 13:52:44 UTC (rev 17582)
@@ -560,6 +560,7 @@
richfaces.ajax = function(source, event, options) {
var sourceId = (typeof source == 'object' && source.id) ? source.id : source;
+ var sourceElt = (typeof source == 'object') ? source : document.getElementById(sourceId);
options = options || {};
@@ -599,7 +600,9 @@
}
}
- parameters[sourceId] = sourceId;
+ if (!jQuery(sourceElt).is('input, select, textarea')) {
+ parameters[sourceId] = sourceId;
+ }
if (eventHandlers) {
var eventsAdapter = richfaces.createJSFEventsAdapter(eventHandlers);
14 years, 6 months
JBoss Rich Faces SVN: r17581 - in root/archetypes: richfaces-component-short/trunk/src/main/resources/META-INF/maven and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-06-09 05:53:10 -0400 (Wed, 09 Jun 2010)
New Revision: 17581
Modified:
root/archetypes/richfaces-component-short/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml
root/archetypes/richfaces-component/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml
root/archetypes/richfaces-components-aggregator/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml
Log:
RFPL-602 Update component module archetypes
set version
Modified: root/archetypes/richfaces-component/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml
===================================================================
--- root/archetypes/richfaces-component/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-06-09 09:44:43 UTC (rev 17580)
+++ root/archetypes/richfaces-component/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-06-09 09:53:10 UTC (rev 17581)
@@ -36,7 +36,7 @@
<defaultValue>${category}-${name}</defaultValue>
</requiredProperty>
<requiredProperty key="version">
- <defaultValue>4.3.2.1</defaultValue>
+ <defaultValue>4.0.0-SNAPSHOT</defaultValue>
</requiredProperty>
</requiredProperties>
Modified: root/archetypes/richfaces-component-short/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml
===================================================================
--- root/archetypes/richfaces-component-short/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-06-09 09:44:43 UTC (rev 17580)
+++ root/archetypes/richfaces-component-short/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-06-09 09:53:10 UTC (rev 17581)
@@ -36,7 +36,7 @@
<defaultValue>${name}-ui</defaultValue>
</requiredProperty>
<requiredProperty key="version">
- <defaultValue>4.3.2.1</defaultValue>
+ <defaultValue>4.0.0-SNAPSHOT</defaultValue>
</requiredProperty>
</requiredProperties>
Modified: root/archetypes/richfaces-components-aggregator/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml
===================================================================
--- root/archetypes/richfaces-components-aggregator/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-06-09 09:44:43 UTC (rev 17580)
+++ root/archetypes/richfaces-components-aggregator/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-06-09 09:53:10 UTC (rev 17581)
@@ -33,7 +33,7 @@
<defaultValue>richfaces-ui-${category}</defaultValue>
</requiredProperty>
<requiredProperty key="version">
- <defaultValue>4.3.2.1</defaultValue>
+ <defaultValue>4.0.0-SNAPSHOT</defaultValue>
</requiredProperty>
</requiredProperties>
14 years, 6 months
JBoss Rich Faces SVN: r17580 - root/ui/core/trunk/ui/src/main/java/org/ajax4jsf/component/behavior.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-06-09 05:44:43 -0400 (Wed, 09 Jun 2010)
New Revision: 17580
Modified:
root/ui/core/trunk/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java
Log:
https://jira.jboss.org/browse/RF-8733
Modified: root/ui/core/trunk/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java
===================================================================
--- root/ui/core/trunk/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java 2010-06-09 09:44:35 UTC (rev 17579)
+++ root/ui/core/trunk/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java 2010-06-09 09:44:43 UTC (rev 17580)
@@ -26,6 +26,7 @@
import javax.el.ELException;
import javax.el.MethodExpression;
import javax.el.MethodNotFoundException;
+import javax.faces.component.StateHolder;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.AjaxBehaviorEvent;
@@ -35,13 +36,15 @@
* @author Anton Belevich
*
*/
-public class MethodExpressionAjaxBehaviorListener implements AjaxBehaviorListener {
+public class MethodExpressionAjaxBehaviorListener implements AjaxBehaviorListener, StateHolder {
private static final Class<?>[] ACTION_LISTENER_ZEROARG_SIG = new Class[] {};
private MethodExpression methodExpressionOneArg = null;
private MethodExpression methodExpressionZeroArg = null;
+
+ private boolean isTransient;
public MethodExpressionAjaxBehaviorListener() {
}
@@ -96,4 +99,30 @@
}
}
+ public boolean isTransient() {
+ return isTransient;
+ }
+
+ public void setTransient(boolean newTransientValue) {
+ isTransient = newTransientValue;
+ }
+
+ public void restoreState(FacesContext context, Object state) {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+ if (state == null) {
+ return;
+ }
+ methodExpressionOneArg = (MethodExpression) ((Object[]) state)[0];
+ methodExpressionZeroArg = (MethodExpression) ((Object[]) state)[1];
+ }
+
+ public Object saveState(FacesContext context) {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+ return new Object[] { methodExpressionOneArg, methodExpressionZeroArg };
+ }
+
}
14 years, 6 months
JBoss Rich Faces SVN: r17579 - root/ui/core/branches/richfaces-ui-core-4.0.0.Alpha2/ui/src/main/java/org/ajax4jsf/component/behavior.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-06-09 05:44:35 -0400 (Wed, 09 Jun 2010)
New Revision: 17579
Modified:
root/ui/core/branches/richfaces-ui-core-4.0.0.Alpha2/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java
Log:
https://jira.jboss.org/browse/RF-8733
Modified: root/ui/core/branches/richfaces-ui-core-4.0.0.Alpha2/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java
===================================================================
--- root/ui/core/branches/richfaces-ui-core-4.0.0.Alpha2/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java 2010-06-09 06:53:24 UTC (rev 17578)
+++ root/ui/core/branches/richfaces-ui-core-4.0.0.Alpha2/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java 2010-06-09 09:44:35 UTC (rev 17579)
@@ -26,6 +26,7 @@
import javax.el.ELException;
import javax.el.MethodExpression;
import javax.el.MethodNotFoundException;
+import javax.faces.component.StateHolder;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.AjaxBehaviorEvent;
@@ -35,13 +36,15 @@
* @author Anton Belevich
*
*/
-public class MethodExpressionAjaxBehaviorListener implements AjaxBehaviorListener {
+public class MethodExpressionAjaxBehaviorListener implements AjaxBehaviorListener, StateHolder {
private static final Class<?>[] ACTION_LISTENER_ZEROARG_SIG = new Class[] {};
private MethodExpression methodExpressionOneArg = null;
private MethodExpression methodExpressionZeroArg = null;
+
+ private boolean isTransient;
public MethodExpressionAjaxBehaviorListener() {
}
@@ -96,4 +99,30 @@
}
}
+ public boolean isTransient() {
+ return isTransient;
+ }
+
+ public void setTransient(boolean newTransientValue) {
+ isTransient = newTransientValue;
+ }
+
+ public void restoreState(FacesContext context, Object state) {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+ if (state == null) {
+ return;
+ }
+ methodExpressionOneArg = (MethodExpression) ((Object[]) state)[0];
+ methodExpressionZeroArg = (MethodExpression) ((Object[]) state)[1];
+ }
+
+ public Object saveState(FacesContext context) {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+ return new Object[] { methodExpressionOneArg, methodExpressionZeroArg };
+ }
+
}
14 years, 6 months
JBoss Rich Faces SVN: r17578 - root/core/trunk/impl/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-06-09 02:53:24 -0400 (Wed, 09 Jun 2010)
New Revision: 17578
Modified:
root/core/trunk/impl/src/main/java/org/richfaces/component/UISequence.java
Log:
add relatibeRowIndex method
Modified: root/core/trunk/impl/src/main/java/org/richfaces/component/UISequence.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/component/UISequence.java 2010-06-08 14:01:29 UTC (rev 17577)
+++ root/core/trunk/impl/src/main/java/org/richfaces/component/UISequence.java 2010-06-09 06:53:24 UTC (rev 17578)
@@ -28,6 +28,7 @@
import java.util.Map;
import javax.el.ValueExpression;
+import javax.faces.component.UINamingContainer;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.model.ArrayDataModel;
@@ -271,4 +272,27 @@
updateState();
}
+
+ public int getRelativeRowIndex() {
+ return (getRowIndex() % getRows());
+ }
+
+ public String getRelativeClientId(FacesContext facesContext) {
+
+ //save current rowKey
+ Object savedRowKey = getRowKey();
+
+ setRowKey(null);
+
+ //retrieve base client id without rowkey part
+ StringBuilder baseId = new StringBuilder(getClientId(facesContext));
+
+ //restore rowKey
+ setRowKey(savedRowKey);
+
+ String result = baseId.append(UINamingContainer.getSeparatorChar(facesContext)).append(getRelativeRowIndex())
+ .toString();
+
+ return result;
+ }
}
14 years, 6 months
JBoss Rich Faces SVN: r17577 - in root/archetypes: richfaces-component/trunk/src/main/resources/archetype-resources/api and 10 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-06-08 10:01:29 -0400 (Tue, 08 Jun 2010)
New Revision: 17577
Added:
root/archetypes/richfaces-component-short/trunk/src/main/resources/archetype-resources/src/
root/archetypes/richfaces-component-short/trunk/src/main/resources/archetype-resources/src/main/
root/archetypes/richfaces-component-short/trunk/src/main/resources/archetype-resources/src/main/java/
root/archetypes/richfaces-component/trunk/src/main/resources/archetype-resources/api/src/
root/archetypes/richfaces-component/trunk/src/main/resources/archetype-resources/api/src/main/
root/archetypes/richfaces-component/trunk/src/main/resources/archetype-resources/api/src/main/java/
root/archetypes/richfaces-component/trunk/src/main/resources/archetype-resources/impl/src/
root/archetypes/richfaces-component/trunk/src/main/resources/archetype-resources/impl/src/main/
root/archetypes/richfaces-component/trunk/src/main/resources/archetype-resources/impl/src/main/java/
Modified:
root/archetypes/richfaces-component-short/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml
root/archetypes/richfaces-component-short/trunk/src/main/resources/META-INF/maven/archetype.xml
root/archetypes/richfaces-component/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml
root/archetypes/richfaces-components-aggregator/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml
Log:
RFPL-602 Update component module archetypes
Modified: root/archetypes/richfaces-component/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml
===================================================================
--- root/archetypes/richfaces-component/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-06-08 12:43:52 UTC (rev 17576)
+++ root/archetypes/richfaces-component/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-06-08 14:01:29 UTC (rev 17577)
@@ -44,7 +44,7 @@
<module dir="api" >
<fileSets>
<fileSet filtered="true">
- <directory>/</directory>
+ <directory>/src/main/java</directory>
<includes>
<include>pom.xml</include>
</includes>
@@ -55,7 +55,7 @@
<module dir="impl" >
<fileSets>
<fileSet filtered="true">
- <directory>/</directory>
+ <directory>/src/main/java</directory>
<includes>
<include>pom.xml</include>
</includes>
@@ -66,7 +66,7 @@
<module dir="ui" >
<fileSets>
<fileSet filtered="true">
- <directory>/</directory>
+ <directory>/src/main/java</directory>
<includes>
<include>pom.xml</include>
</includes>
Modified: root/archetypes/richfaces-component-short/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml
===================================================================
--- root/archetypes/richfaces-component-short/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-06-08 12:43:52 UTC (rev 17576)
+++ root/archetypes/richfaces-component-short/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-06-08 14:01:29 UTC (rev 17577)
@@ -39,4 +39,10 @@
<defaultValue>4.3.2.1</defaultValue>
</requiredProperty>
</requiredProperties>
+
+ <fileSets>
+ <fileSet>
+ <directory>src/main/java</directory>
+ </fileSet>
+ </fileSets>
</archetype-descriptor>
\ No newline at end of file
Modified: root/archetypes/richfaces-component-short/trunk/src/main/resources/META-INF/maven/archetype.xml
===================================================================
--- root/archetypes/richfaces-component-short/trunk/src/main/resources/META-INF/maven/archetype.xml 2010-06-08 12:43:52 UTC (rev 17576)
+++ root/archetypes/richfaces-component-short/trunk/src/main/resources/META-INF/maven/archetype.xml 2010-06-08 14:01:29 UTC (rev 17577)
@@ -21,4 +21,5 @@
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0 http://maven.apache.org/xsd/archetype-1.0.0.xsd">
<id>richfaces-component-short</id>
+
</archetype>
\ No newline at end of file
Modified: root/archetypes/richfaces-components-aggregator/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml
===================================================================
--- root/archetypes/richfaces-components-aggregator/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-06-08 12:43:52 UTC (rev 17576)
+++ root/archetypes/richfaces-components-aggregator/trunk/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-06-08 14:01:29 UTC (rev 17577)
@@ -39,7 +39,7 @@
<fileSets>
<fileSet>
- <directory>./</directory>
+ <directory>/</directory>
<excludes>
<exclude>pom.xml</exclude>
</excludes>
14 years, 6 months
JBoss Rich Faces SVN: r17576 - root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-06-08 08:43:52 -0400 (Tue, 08 Jun 2010)
New Revision: 17576
Added:
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/EncodeStrategy.java
Log:
Added: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/EncodeStrategy.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/EncodeStrategy.java (rev 0)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/EncodeStrategy.java 2010-06-08 12:43:52 UTC (rev 17576)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+
+package org.richfaces.renderkit;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public interface EncodeStrategy {
+
+ public void begin(ResponseWriter writer, FacesContext context, UIComponent component, Object[] params) throws IOException;
+
+ public void end(ResponseWriter writer, FacesContext context, UIComponent component, Object[] params) throws IOException;
+
+}
14 years, 6 months
JBoss Rich Faces SVN: r17575 - in root/ui/iteration/trunk/tables/ui/src/main: java/org/richfaces/component/html and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-06-08 08:37:56 -0400 (Tue, 08 Jun 2010)
New Revision: 17575
Removed:
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/HeaderEncodeStrategy.java
Modified:
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/UIColumnGroup.java
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/UIDataTableBase.java
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/UISubTable.java
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/html/HtmlColumnGroup.java
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractRowsRenderer.java
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/ColumnGroupRenderer.java
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/RowHolder.java
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SortingFilteringRowsRenderer.java
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SubTableToggleControlRendererBase.java
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/html/images/ColumnHeaderGradientImage.java
root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/resources/subtable.js
Log:
https://jira.jboss.org/browse/RF-8718
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/UIColumnGroup.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/UIColumnGroup.java 2010-06-08 11:18:42 UTC (rev 17574)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/UIColumnGroup.java 2010-06-08 12:37:56 UTC (rev 17575)
@@ -27,6 +27,7 @@
import javax.faces.component.UIComponent;
import javax.faces.component.UIPanel;
import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
import org.ajax4jsf.model.DataVisitor;
import org.richfaces.renderkit.RowHolderBase;
@@ -54,4 +55,4 @@
//TODO nick - implement in the proper way
visitor.process(context, null, argument);
}
-}
+ }
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/UIDataTableBase.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/UIDataTableBase.java 2010-06-08 11:18:42 UTC (rev 17574)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/UIDataTableBase.java 2010-06-08 12:37:56 UTC (rev 17575)
@@ -325,5 +325,5 @@
}
super.queueEvent(event);
}
-
+
}
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/UISubTable.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/UISubTable.java 2010-06-08 11:18:42 UTC (rev 17574)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/UISubTable.java 2010-06-08 12:37:56 UTC (rev 17575)
@@ -22,13 +22,22 @@
package org.richfaces.component;
+import java.util.HashSet;
+import java.util.Set;
+
import javax.el.ELContext;
import javax.el.ValueExpression;
import javax.faces.application.ResourceDependency;
+import javax.faces.component.UIComponent;
+import javax.faces.component.visit.VisitCallback;
+import javax.faces.component.visit.VisitContext;
+import javax.faces.component.visit.VisitResult;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
+import org.richfaces.context.ExtendedVisitContext;
+import org.richfaces.context.ExtendedVisitContextMode;
import org.richfaces.event.ToggleEvent;
import org.richfaces.event.ToggleListener;
@@ -41,6 +50,18 @@
public static final String MODE_SERVER = "server";
public static final String MODE_CLIENT = "client";
+
+ public static final String PARENT_PARTIAL = "partial";
+
+ public static final String TB_ID = ":c";
+
+ public static final String SUBTABLE = "subtable";
+
+ private static final Set<String> SUPPORTED_META_COMPONENTS = new HashSet<String>();
+
+ static {
+ SUPPORTED_META_COMPONENTS.add(SUBTABLE);
+ }
enum PropertyKeys {
expandMode, expanded, toggleExpression
@@ -48,7 +69,6 @@
public void broadcast(FacesEvent event) throws AbortProcessingException {
- super.broadcast(event);
if (event instanceof ToggleEvent) {
ToggleEvent toggleEvent = (ToggleEvent) event;
boolean newValue = toggleEvent.isExpanded();
@@ -61,8 +81,12 @@
if (valueExpression != null && !valueExpression.isReadOnly(elContext)) {
valueExpression.setValue(elContext, newValue);
}
- facesContext.getPartialViewContext().getRenderIds().add(getClientId(facesContext));
+
+ String render = resolveClientId(facesContext, this, SUBTABLE);
+ getFacesContext().getPartialViewContext().getRenderIds().add(render);
+
}
+ super.broadcast(event);
}
public boolean isExpanded() {
@@ -110,6 +134,32 @@
getStateHelper().put(PropertyKeys.expandMode, expandMode);
}
+ @Override
+ public String resolveClientId(FacesContext facesContext, UIComponent contextComponent, String metaComponentId) {
+ String clientId = super.resolveClientId(facesContext, contextComponent, metaComponentId);
+ if(clientId == null && SUPPORTED_META_COMPONENTS.contains(metaComponentId)) {
+ return getClientId(facesContext) + MetaComponentResolver.META_COMPONENT_SEPARATOR_CHAR + metaComponentId;
+ //TODO: LOG
+ }
+ return null;
+ }
+
+ @Override
+ protected boolean visitDataChildren(VisitContext visitContext, VisitCallback callback, boolean visitRows) {
+ if(visitContext instanceof ExtendedVisitContext) {
+ ExtendedVisitContext extendedVisitContext = (ExtendedVisitContext)visitContext;
+ if (extendedVisitContext.getVisitMode() == ExtendedVisitContextMode.RENDER) {
+ VisitResult result = extendedVisitContext.invokeMetaComponentVisitCallback(this, callback, SUBTABLE);
+ if(result == VisitResult.ACCEPT) {
+ //TODO:
+ } else {
+ return result == VisitResult.COMPLETE;
+ }
+ }
+ }
+ return super.visitDataChildren(visitContext, callback, visitRows);
+ }
+
public void setIterationState(Object stateObject) {
Object[] state = (Object[]) stateObject;
if (state != null) {
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/html/HtmlColumnGroup.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/html/HtmlColumnGroup.java 2010-06-08 11:18:42 UTC (rev 17574)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/html/HtmlColumnGroup.java 2010-06-08 12:37:56 UTC (rev 17575)
@@ -1,6 +1,11 @@
package org.richfaces.component.html;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+
import org.richfaces.component.UIColumnGroup;
+import org.richfaces.component.UIDataTableBase;
public class HtmlColumnGroup extends UIColumnGroup {
@@ -12,5 +17,4 @@
public String getFamily() {
return COMPONENT_FAMILY;
}
-
}
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractRowsRenderer.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractRowsRenderer.java 2010-06-08 11:18:42 UTC (rev 17574)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractRowsRenderer.java 2010-06-08 12:37:56 UTC (rev 17575)
@@ -66,23 +66,13 @@
public void processRows(ResponseWriter writer, FacesContext facesContext, UIComponent component, boolean updatePartial) throws IOException {
RowHolderBase rowHolder = createRowHolder(facesContext, component);
rowHolder.setPartialUpdate(updatePartial);
-
- encodeBeforeRows(writer, facesContext, rowHolder);
encodeRows(facesContext, rowHolder);
- encodeAfterRows(writer, facesContext, rowHolder);
}
-
protected void doEncodeChildren(ResponseWriter writer, FacesContext facesContext, UIComponent component) throws IOException {
processRows(writer, facesContext, component, false);
}
- public void encodeBeforeRows(ResponseWriter writer, FacesContext facesContext, RowHolderBase holder) throws IOException {
- }
-
- public void encodeAfterRows(ResponseWriter writer, FacesContext facesContext, RowHolderBase holder) throws IOException {
- }
-
public boolean getRendersChildren() {
return true;
}
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java 2010-06-08 11:18:42 UTC (rev 17574)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java 2010-06-08 12:37:56 UTC (rev 17575)
@@ -58,7 +58,7 @@
public void encodeColumn(FacesContext context, ResponseWriter writer, UIColumn component, RowHolder rowHolder) throws IOException {
- String parentId = rowHolder.getBaseClientId();
+ String parentId = rowHolder.getParentClientId();
if (component instanceof org.richfaces.component.UIColumn) {
Map<String, Object> attributes = component.getAttributes();
@@ -70,10 +70,11 @@
}
if (rowHolder.isRowStart()) {
+ int currentRow = rowHolder.getCurrentRow();
if (rowHolder.getCurrentRow() == 0) {
- encodeFirstRowStart(writer, context, parentId, component);
+ encodeFirstRowStart(writer, context, parentId, currentRow, component);
} else {
- encodeRowStart(writer, context, parentId, component);
+ encodeRowStart(writer, context, parentId, currentRow, component);
}
rowHolder.setRowStart(false);
}
@@ -111,7 +112,7 @@
writer.endElement(getCellElement(context, parentId));
}
- public void encodeFirstRowStart(ResponseWriter writer, FacesContext context, String parentId, UIComponent component) throws IOException {
+ public void encodeFirstRowStart(ResponseWriter writer, FacesContext context, String parentId, int currentRow, UIComponent component) throws IOException {
writer.startElement(HTML.TR_ELEMENT, component);
String styleClass = getFirstRowClass(context, parentId);
encodeStyleClass(writer, context, component, HTML.STYLE_CLASS_ATTR, styleClass);
@@ -121,7 +122,7 @@
writer.endElement(HTML.TR_ELEMENT);
}
- public void encodeRowStart(ResponseWriter writer, FacesContext context, String parentId, UIComponent component) throws IOException {
+ public void encodeRowStart(ResponseWriter writer, FacesContext context, String parentId, int currentRow, UIComponent component) throws IOException {
writer.startElement(HTML.TR_ELEMENT, component);
String styleClass = getRowClass(context, parentId);
encodeStyleClass(writer, context, component, HTML.STYLE_CLASS_ATTR, styleClass);
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-06-08 11:18:42 UTC (rev 17574)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-06-08 12:37:56 UTC (rev 17575)
@@ -43,22 +43,25 @@
@ResourceDependency(name = "jquery.js"), @ResourceDependency(name = "richfaces.js"), @ResourceDependency(name = "richfaces-event.js")})
public abstract class AbstractTableRenderer extends AbstractTableBaseRenderer implements MetaComponentRenderer {
- protected void doDecode(FacesContext context, UIComponent component) {
- decodeSortingFiltering(context, component);
- }
+ public static final String HIDDEN_CONTAINER_ID =":sc";
- protected class SimpleHeaderEncodeStrategy implements HeaderEncodeStrategy {
+ protected class SimpleHeaderEncodeStrategy implements EncodeStrategy {
- public void encodeBegin(FacesContext context, ResponseWriter writer, UIComponent column, String facetName)
+ public void begin(ResponseWriter writer, FacesContext context, UIComponent column, Object [] params)
throws IOException {
-
}
- public void encodeEnd(FacesContext context, ResponseWriter writer, UIComponent column, String facetName)
+ public void end(ResponseWriter writer, FacesContext context, UIComponent column, Object [] params)
throws IOException {
}
}
-
+
+ public abstract EncodeStrategy getHiddenContainerStrategy();
+
+ protected void doDecode(FacesContext context, UIComponent component) {
+ decodeSortingFiltering(context, component);
+ }
+
@Override
protected void encodeRows(FacesContext facesContext, RowHolderBase rowHolder) {
UIDataTableBase dataTableBase = (UIDataTableBase)rowHolder.getRow();
@@ -116,32 +119,11 @@
//DataTableRenderer override this method
}
- @Override
- public void encodeBeforeRows(ResponseWriter writer, FacesContext facesContext, RowHolderBase holder) throws IOException {
- RowHolder rowHolder = (RowHolder)holder;
- Row row = rowHolder.getRow();
-
- if(encodeParentTBody((UIDataTableBase)row)) {
- if(rowHolder.isPartialUpdate()) {
- facesContext.getPartialViewContext().getPartialResponseWriter().startUpdate(row.getClientId(facesContext)+ ":tb");
- }
- encodeTableBodyStart(writer, facesContext, (UIDataTableBase)row);
- }
+ public void encodeBeforeRows(ResponseWriter writer, FacesContext facesContext, Row row) throws IOException {
}
- public void encodeAfterRows(ResponseWriter writer, FacesContext facesContext, RowHolderBase holder) throws IOException {
- RowHolder rowHolder = (RowHolder)holder;
- Row row = rowHolder.getRow();
-
- if(encodeParentTBody((UIDataTableBase)row)) {
- encodeTableBodyEnd(writer);
- encodeHiddenContainer(writer, facesContext, (UIDataTableBase)row);
- if(rowHolder.isPartialUpdate()) {
- facesContext.getPartialViewContext().getPartialResponseWriter().endUpdate();
- }
- }
+ public void encodeAfterRows(ResponseWriter writer, FacesContext facesContext, Row row) throws IOException {
}
-
public abstract boolean encodeParentTBody(UIDataTableBase dataTableBase);
@@ -163,8 +145,10 @@
public void encodeTableRows(ResponseWriter writer, FacesContext facesContext, UIDataTableBase dataTableBase,
boolean encodePartialUpdate) throws IOException {
- put(facesContext, dataTableBase.getClientId(facesContext), CELL_ELEMENT_KEY, HTML.TD_ELEM);
+
int rowCount = dataTableBase.getRowCount();
+ put(facesContext, dataTableBase.getClientId(facesContext), CELL_ELEMENT_KEY, HTML.TD_ELEM);
+
if (rowCount > 0) {
processRows(writer, facesContext, dataTableBase, encodePartialUpdate);
} else {
@@ -200,17 +184,29 @@
writer.endElement(HTML.TD_ELEM);
writer.endElement(HTML.TR_ELEMENT);
writer.endElement(HTML.TBODY_ELEMENT);
-
+
if (encodePartialUpdate) {
facesContext.getPartialViewContext().getPartialResponseWriter().endUpdate();
}
-
+ }
+
+ if(encodePartialUpdate) {
+ String id = dataTableBase.getClientId(facesContext) + HIDDEN_CONTAINER_ID;
+ facesContext.getPartialViewContext().getPartialResponseWriter().startUpdate(id);
}
+
+ encodeHiddens(writer, facesContext, dataTableBase);
+
+ if(encodePartialUpdate) {
+ facesContext.getPartialViewContext().getPartialResponseWriter().endUpdate();
+ }
}
-
+
protected void doEncodeChildren(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
if(component instanceof UIDataTableBase) {
+ encodeBeforeRows(writer, context, (Row)component);
encodeTableRows(writer, context, (UIDataTableBase)component, false);
+ encodeAfterRows(writer, context, (Row)component);
}
}
@@ -221,22 +217,15 @@
encodeStyleClass(writer, context, component, HTML.STYLE_CLASS_ATTR, styleClass);
}
- protected void encodeHiddenContainer(ResponseWriter writer, FacesContext context, UIDataTableBase dataTableBase) throws IOException {
- writer.startElement(HTML.TBODY_ELEMENT, dataTableBase);
- writer.writeAttribute(HTML.ID_ATTRIBUTE, dataTableBase.getClientId(context) +":sc",null);
- writer.writeAttribute(HTML.STYLE_ATTRIBUTE, "display: none", null);
-
- writer.startElement(HTML.TR_ELEMENT, dataTableBase);
- writer.startElement(HTML.TD_ELEM, dataTableBase);
-
- encodeClientScript(writer, context, dataTableBase);
- encodeHiddenInput(writer, context, dataTableBase);
+ protected void encodeHiddens(ResponseWriter writer, FacesContext facesContext, UIDataTableBase dataTableBase) throws IOException {
+ EncodeStrategy encodeStrategy = getHiddenContainerStrategy();
+ encodeStrategy.begin(writer, facesContext, dataTableBase, null);
- writer.endElement(HTML.TD_ELEM);
- writer.endElement(HTML.TR_ELEMENT);
- writer.endElement(HTML.TBODY_ELEMENT);
+ encodeClientScript(writer, facesContext, dataTableBase);
+ encodeHiddenInput(writer, facesContext, dataTableBase);
+
+ encodeStrategy.end(writer, facesContext, dataTableBase, null);
}
-
public void encodeTableEnd(ResponseWriter writer) throws IOException {
writer.endElement(HTML.TABLE_ELEMENT);
@@ -246,12 +235,13 @@
public abstract void encodeHiddenInput(ResponseWriter writer, FacesContext context, UIDataTableBase component) throws IOException;
- public void encodeTableBodyStart(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable)
+ public void encodeTableBodyStart(ResponseWriter writer, FacesContext facesContext, UIDataTableBase dataTableBase)
throws IOException {
- writer.startElement(HTML.TBODY_ELEMENT, dataTable);
- writer.writeAttribute(HTML.ID_ATTRIBUTE, dataTable.getClientId(context) + ":tb", null);
+
+ writer.startElement(HTML.TBODY_ELEMENT, dataTableBase);
+ writer.writeAttribute(HTML.ID_ATTRIBUTE, dataTableBase.getRelativeClientId(facesContext) + ":tb", null);
writer.writeAttribute(HTML.CLASS_ATTRIBUTE, getTableSkinClass(), null);
- encodeStyle(writer, context, dataTable, null);
+ encodeStyle(writer, facesContext, dataTableBase, null);
}
public void encodeTableBodyEnd(ResponseWriter writer) throws IOException {
@@ -477,16 +467,15 @@
writer.writeAttribute("scope", "col", null);
getUtils().encodeAttribute(context, column, "colspan");
- HeaderEncodeStrategy strategy = getHeaderEncodeStrategy(column, facetName);
+ EncodeStrategy strategy = getHeaderEncodeStrategy(column, facetName);
if(strategy != null) {
- strategy.encodeBegin(context, writer, column, facetName);
+ strategy.begin(writer, context, column, new String[] {facetName});
UIComponent facet = column.getFacet(facetName);
if (facet != null && facet.isRendered()) {
facet.encodeAll(context);
}
-
- strategy.encodeEnd(context, writer, column, facetName);
+ strategy.end(writer, context, column, new String[] {facetName});
}
writer.endElement(element);
}
@@ -544,7 +533,7 @@
}
}
- public abstract HeaderEncodeStrategy getHeaderEncodeStrategy(UIComponent column, String tableFacetName);
+ public abstract EncodeStrategy getHeaderEncodeStrategy(UIComponent column, String tableFacetName);
public abstract boolean containsThead();
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/ColumnGroupRenderer.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/ColumnGroupRenderer.java 2010-06-08 11:18:42 UTC (rev 17574)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/ColumnGroupRenderer.java 2010-06-08 12:37:56 UTC (rev 17575)
@@ -65,7 +65,7 @@
}
RowHolder rowHolder = new RowHolder(context, (UIColumnGroup)component);
- rowHolder.setBaseClientId(parent.getClientId());
+ rowHolder.setParentClientId(parent.getClientId());
return rowHolder;
}
}
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2010-06-08 11:18:42 UTC (rev 17574)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2010-06-08 12:37:56 UTC (rev 17575)
@@ -41,6 +41,7 @@
import org.richfaces.component.Row;
import org.richfaces.component.UIDataTable;
import org.richfaces.component.UIDataTableBase;
+import org.richfaces.component.UISubTable;
/**
* @author Anton Belevich
@@ -51,6 +52,47 @@
@ResourceDependency(name = "datatable.js"), @ResourceDependency(name = "datatable.ecss")})
public class DataTableRenderer extends AbstractTableRenderer {
+ private class DataTableHiddenEncodeStrategy implements EncodeStrategy {
+
+ public void begin(ResponseWriter writer, FacesContext context, UIComponent component, Object[] params) throws IOException {
+ UIDataTable dataTable = (UIDataTable)component;
+
+ writer.startElement(HTML.TBODY_ELEMENT, dataTable);
+ writer.writeAttribute(HTML.ID_ATTRIBUTE, dataTable.getClientId(context) + HIDDEN_CONTAINER_ID, null);
+ writer.writeAttribute(HTML.STYLE_ATTRIBUTE, "display: none", null);
+ writer.startElement(HTML.TR_ELEMENT, dataTable);
+ writer.startElement(HTML.TD_ELEM, dataTable);
+ }
+
+ public void end(ResponseWriter writer, FacesContext context, UIComponent component, Object[] params) throws IOException {
+ writer.endElement(HTML.TD_ELEM);
+ writer.endElement(HTML.TR_ELEMENT);
+ writer.endElement(HTML.TBODY_ELEMENT);
+ }
+ };
+
+ private class RichHeaderEncodeStrategy implements EncodeStrategy {
+
+ public void begin(ResponseWriter writer, FacesContext context, UIComponent component, Object [] params) throws IOException {
+ org.richfaces.component.UIColumn column = (org.richfaces.component.UIColumn) component;
+ writer.writeAttribute("id", column.getClientId(context), null);
+
+ boolean sortableColumn = isSortable(column);
+ if (sortableColumn) {
+ //TODO :anton -> should component be selfSorted
+ writer.startElement(HTML.SPAN_ELEM, column);
+ writer.writeAttribute(HTML.CLASS_ATTRIBUTE, "rich-table-sortable-header", null);
+ }
+ }
+
+ public void end(ResponseWriter writer, FacesContext context, UIComponent component, Object [] params) throws IOException {
+ org.richfaces.component.UIColumn column = (org.richfaces.component.UIColumn) component;
+ if (isSortable(column)) {
+ writer.endElement(HTML.SPAN_ELEM);
+ }
+ }
+ }
+
public void encodeTableStructure(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable)
throws IOException {
@@ -81,15 +123,17 @@
return new RowHolder(context, (UIDataTable) component);
}
- public void encodeRow(ResponseWriter writer, FacesContext context, RowHolderBase holder) throws IOException {
+ public void encodeRow(ResponseWriter writer, FacesContext facesContext, RowHolderBase holder) throws IOException {
RowHolder rowHolder = (RowHolder) holder;
Row row = rowHolder.getRow();
+
+ UIDataTable dataTable = (UIDataTable)row;
- if (!encodeParentTBody((UIDataTable) row)) {
+ if (!encodeParentTBody(dataTable)) {
if (rowHolder.isPartialUpdate()) {
- context.getPartialViewContext().getPartialResponseWriter().startUpdate(((UIDataTable) row).getClientId() + ":tb");
+ facesContext.getPartialViewContext().getPartialResponseWriter().startUpdate(dataTable.getRelativeClientId(facesContext) + ":tb");
}
- encodeTableBodyStart(writer, context, (UIDataTable) row);
+ encodeTableBodyStart(writer, facesContext, dataTable);
}
rowHolder.setRowStart(true);
@@ -99,31 +143,47 @@
while (components.hasNext()) {
UIComponent child = components.next();
+
+ //could be columnGroup or SubTable
if (child instanceof Row) {
-
+
+ boolean isSubtable = (child instanceof UISubTable);
+
+ //new row -> close </tr>
if (rowHolder.getProcessCell() != 0) {
encodeRowEnd(writer);
isTRopen = false;
- encodeTableBodyEnd(writer);
- if (rowHolder.isPartialUpdate()) {
- context.getPartialViewContext().getPartialResponseWriter().endUpdate();
- }
+
+ //only SubTables could have <tbody>
+ if(isSubtable) {
+ encodeTableBodyEnd(writer);
+ if (rowHolder.isPartialUpdate()) {
+ facesContext.getPartialViewContext().getPartialResponseWriter().endUpdate();
+ }
+ }
}
rowHolder.nextCell();
+
+ boolean partial = rowHolder.isPartialUpdate();
+ if(isSubtable){
+ UISubTable subTable = (UISubTable)child;
- if (rowHolder.isPartialUpdate()) {
- context.getPartialViewContext().getPartialResponseWriter().startUpdate(child.getClientId());
- }
+ //generate id for the container
+ String containerId = dataTable.getRelativeClientId(facesContext) + ":"+ subTable.getId() +":c";
+ if(partial) {
+ facesContext.getPartialViewContext().getPartialResponseWriter().startUpdate(containerId);
+ }
+ }
+
+ child.encodeAll(facesContext);
- child.encodeAll(context);
-
- if (rowHolder.isPartialUpdate()) {
- context.getPartialViewContext().getPartialResponseWriter().endUpdate();
+ if (partial) {
+ facesContext.getPartialViewContext().getPartialResponseWriter().endUpdate();
}
} else if (child instanceof UIColumn) {
- encodeColumn(context, writer, (UIColumn) child, rowHolder);
+ encodeColumn(facesContext, writer, (UIColumn) child, rowHolder);
isTRopen = true;
}
}
@@ -143,7 +203,7 @@
}
return true;
}
-
+
protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
if (!shouldProceed(component)) {
return;
@@ -203,40 +263,12 @@
writer.endElement(HTML.CAPTION_ELEMENT);
}
- public HeaderEncodeStrategy getHeaderEncodeStrategy(UIComponent column, String tableFacetName) {
+ public EncodeStrategy getHeaderEncodeStrategy(UIComponent column, String tableFacetName) {
return (column instanceof org.richfaces.component.UIColumn && "header".equals(tableFacetName))
? new RichHeaderEncodeStrategy() : new SimpleHeaderEncodeStrategy();
}
- protected class RichHeaderEncodeStrategy implements HeaderEncodeStrategy {
-
- public void encodeBegin(FacesContext context, ResponseWriter writer, UIComponent component, String facetName) throws IOException {
- org.richfaces.component.UIColumn column = (org.richfaces.component.UIColumn) component;
-
- writer.writeAttribute("id", column.getClientId(context), null);
-
- boolean sortableColumn = isSortable(column);
- if (sortableColumn) {
- //TODO :anton -> should component be selfSorted
- writer.startElement(HTML.SPAN_ELEM, column);
- writer.writeAttribute(HTML.CLASS_ATTRIBUTE, "rich-table-sortable-header", null);
- }
- }
-
- public void encodeEnd(FacesContext context, ResponseWriter writer, UIComponent component, String facetName) throws IOException {
-
- org.richfaces.component.UIColumn column = (org.richfaces.component.UIColumn) component;
- if (isSortable(column)) {
- writer.endElement(HTML.SPAN_ELEM);
- }
- }
-
- public void encodeSortControls(FacesContext context, ResponseWriter writer, org.richfaces.component.UIColumn column, boolean enableAsc, boolean enableDesc, boolean enableUnsort) throws IOException {
- }
-
- }
-
public boolean containsThead() {
return true;
}
@@ -348,4 +380,8 @@
protected void setupTableStartElement(FacesContext context, UIComponent component) {
put(context, component.getClientId(context), CELL_ELEMENT_KEY, HTML.TH_ELEM);
}
+
+ public EncodeStrategy getHiddenContainerStrategy() {
+ return new DataTableHiddenEncodeStrategy();
+ }
}
Deleted: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/HeaderEncodeStrategy.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/HeaderEncodeStrategy.java 2010-06-08 11:18:42 UTC (rev 17574)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/HeaderEncodeStrategy.java 2010-06-08 12:37:56 UTC (rev 17575)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.richfaces.renderkit;
-
-import java.io.IOException;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-
-public interface HeaderEncodeStrategy {
-
-
- public abstract void encodeBegin(FacesContext context, ResponseWriter writer,
- UIComponent column, String facetName) throws IOException;
-
- public abstract void encodeEnd(FacesContext context, ResponseWriter writer,
- UIComponent column, String facetName) throws IOException;
-
-}
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/RowHolder.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/RowHolder.java 2010-06-08 11:18:42 UTC (rev 17574)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/RowHolder.java 2010-06-08 12:37:56 UTC (rev 17575)
@@ -34,14 +34,13 @@
private Row row;
- private int processCell;
+ private String parentClientId;
- private String baseClientId;
-
+ private int processCell;
+
private boolean isRowStart;
+
- private boolean startPartialUpdate;
-
public RowHolder(FacesContext context, Row row) {
this(context, row, 0, true);
}
@@ -50,24 +49,16 @@
super(context);
this.row = row;
this.processCell = processCell;
- this.baseClientId = row.getClientId(context);
+ this.parentClientId = row.getClientId(context);
}
- public boolean isStartPartialUpdate() {
- return startPartialUpdate;
+ public String getParentClientId() {
+ return parentClientId;
}
- public void setStartPartialUpdate(boolean startPartialUpdate) {
- this.startPartialUpdate = startPartialUpdate;
+ public void setParentClientId(String parentClientId) {
+ this.parentClientId = parentClientId;
}
-
- public String getBaseClientId() {
- return baseClientId;
- }
-
- public void setBaseClientId(String baseClientId) {
- this.baseClientId = baseClientId;
- }
public Row getRow() {
return this.row;
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SortingFilteringRowsRenderer.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SortingFilteringRowsRenderer.java 2010-06-08 11:18:42 UTC (rev 17574)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SortingFilteringRowsRenderer.java 2010-06-08 12:37:56 UTC (rev 17575)
@@ -55,11 +55,12 @@
private static final String SORT_PRIORITY_STRING = "sortPriority";
-
private static final String SEPARATOR = ":";
protected void decodeSortingFiltering(FacesContext context, UIComponent component) {
+
if(component instanceof UIDataTableBase) {
+
UIDataTableBase dataTableBase = (UIDataTableBase)component;
Map<String, String> requestMap = context.getExternalContext().getRequestParameterMap();
String clientId = dataTableBase.getClientId(context);
@@ -115,6 +116,7 @@
}
sortPriority.add(values[0]);
}
+
updateAttribute(context, dataTableBase, SORT_PRIORITY_STRING, sortPriority);
context.getPartialViewContext().getRenderIds().add(dataTableBase.getClientId(context)); // TODO Use partial re-rendering here.
}
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java 2010-06-08 11:18:42 UTC (rev 17574)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java 2010-06-08 12:37:56 UTC (rev 17575)
@@ -32,11 +32,13 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import javax.faces.event.AbortProcessingException;
import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.richfaces.component.Row;
+import org.richfaces.component.UIDataTable;
import org.richfaces.component.UIDataTableBase;
import org.richfaces.component.UISubTable;
import org.richfaces.event.ToggleEvent;
@@ -51,7 +53,26 @@
private static final String OPTIONS = ":options";
+ private static final String HIDDEN_STYLE = "display: none";
+
+
+ private class SubTableHiddenEncodeStrategy implements EncodeStrategy {
+
+ public void begin(ResponseWriter writer, FacesContext context, UIComponent component, Object[] params) throws IOException {
+ UISubTable subTable = (UISubTable)component;
+ writer.startElement(HTML.TR_ELEMENT, subTable);
+ writer.writeAttribute(HTML.ID_ATTRIBUTE, subTable.getClientId(context) + HIDDEN_CONTAINER_ID, null);
+ writer.writeAttribute(HTML.STYLE_ATTRIBUTE, HIDDEN_STYLE, null);
+ writer.startElement(HTML.TD_ELEM, subTable);
+ }
+ public void end(ResponseWriter writer, FacesContext context, UIComponent component, Object[] params) throws IOException {
+ writer.endElement(HTML.TD_ELEM);
+ writer.endElement(HTML.TR_ELEMENT);
+ }
+
+ };
+
protected void doDecode(FacesContext facesContext, UIComponent component) {
UISubTable subTable = (UISubTable)component;
@@ -76,9 +97,25 @@
}
}
+ @Override
+ public void encodeFirstRowStart(ResponseWriter writer, FacesContext context, String parentId, int currentRow, UIComponent component) throws IOException {
+ writer.startElement(HTML.TR_ELEMENT, component);
+ writer.writeAttribute(HTML.ID_ATTRIBUTE, parentId + ":" + currentRow + ":b", null);
+ String styleClass = getFirstRowClass(context, parentId);
+ encodeStyleClass(writer, context, component, HTML.STYLE_CLASS_ATTR, styleClass);
+ }
+
+ @Override
+ public void encodeRowStart(ResponseWriter writer, FacesContext context, String parentId, int currentRow, UIComponent component) throws IOException {
+ writer.startElement(HTML.TR_ELEMENT, component);
+ writer.writeAttribute(HTML.ID_ATTRIBUTE, parentId + ":" + currentRow + ":b", null);
+ String styleClass = getRowClass(context, parentId);
+ encodeStyleClass(writer, context, component, HTML.STYLE_CLASS_ATTR, styleClass);
+ }
+
public void encodeTableFacets(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable) throws IOException {
UISubTable subTable = (UISubTable)dataTable;
-
+
encodeHeaderFacet(writer, context, subTable, false);
String rowClass = getRowSkinClass();
@@ -92,57 +129,73 @@
saveRowStyles(context, subTable.getClientId(context), firstClass, rowClass, cellClass);
}
- public void encodeTableBodyStart(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable)
- throws IOException {
-
- UISubTable subTable = (UISubTable) dataTable;
- writer.startElement(HTML.TBODY_ELEMENT, subTable);
- getUtils().encodeId(context, subTable);
+ @Override
+ public void encodeTableBodyStart(ResponseWriter writer, FacesContext facesContext, UIDataTableBase dataTableBase) throws IOException {
+ UISubTable subTable = (UISubTable)dataTableBase;
+ UIComponent component = subTable.getParent();
+ if (!(component instanceof UIDataTable)) {
+ // TODO: anton -> throw exception
+ }
+ UIDataTable dataTable = (UIDataTable)component;
+ writer.startElement(HTML.TBODY_ELEMENT, null);
+ writer.writeAttribute(HTML.ID_ATTRIBUTE, dataTable.getRelativeClientId(facesContext) + ":" + subTable.getId() + ":c", null);
+
String predefinedStyles = !subTable.isExpanded() ? "display: none;" : null;
+
writer.writeAttribute(HTML.CLASS_ATTRIBUTE, getTableSkinClass(), null);
- encodeStyle(writer, context, dataTable, predefinedStyles);
+ encodeStyle(writer, facesContext, dataTable, predefinedStyles);
}
public RowHolderBase createRowHolder(FacesContext context, UIComponent component) {
return new RowHolder(context, (UISubTable)component);
}
-
- @Override
- public void encodeBeforeRows(ResponseWriter writer, FacesContext facesContext, RowHolderBase holder)
- throws IOException {
- RowHolder rowHolder = (RowHolder)holder;
- Row row = rowHolder.getRow();
- if(rowHolder.isPartialUpdate()) {
- facesContext.getPartialViewContext().getPartialResponseWriter().startUpdate(row.getClientId(facesContext)+ ":tb");
- }
- encodeTableBodyStart(writer, facesContext, (UISubTable)row);
- encodeHeaderFacet(writer, facesContext, (UISubTable)row, false);
+
+ public void encodeBeforeRows(ResponseWriter writer, FacesContext facesContext, Row row) throws IOException {
+ UISubTable subTable = (UISubTable)row;
+
+ encodeTableBodyStart(writer, facesContext, subTable);
+ encodeSubTableDomElement(writer, facesContext, subTable);
+ setupTableStartElement(facesContext, subTable);
+ encodeHeaderFacet(writer, facesContext, subTable, false);
}
+ private void encodeSubTableDomElement(ResponseWriter writer, FacesContext facesContext, UISubTable subTable) throws IOException{
+ writer.startElement(HTML.TR_ELEMENT, subTable);
+ writer.writeAttribute(HTML.STYLE_ATTRIBUTE, "display: none", null);
+ writer.writeAttribute(HTML.ID_ATTRIBUTE, subTable.getClientId(facesContext), null);
+ writer.startElement(HTML.TD_ELEM, subTable);
+ writer.endElement(HTML.TD_ELEM);
+ writer.endElement(HTML.TR_ELEMENT);
+
+ }
+
public void encodeRow(ResponseWriter writer, FacesContext context, RowHolderBase holder) throws IOException {
RowHolder rowHolder = (RowHolder)holder;
Row row = rowHolder.getRow();
-
+
rowHolder.setRowStart(true);
Iterator<UIComponent> components = row.columns();
- while(components.hasNext()) {
- encodeColumn(context, writer, (UIColumn)components.next(), rowHolder);
+ if (rowHolder.isPartialUpdate()) {
+ context.getPartialViewContext().getPartialResponseWriter().startUpdate(
+ ((UISubTable) row).getRelativeClientId(context) + ":b");
}
+
+ while (components.hasNext()) {
+ encodeColumn(context, writer, (UIColumn) components.next(), rowHolder);
+ }
+
encodeRowEnd(writer);
+
+ if (rowHolder.isPartialUpdate()) {
+ context.getPartialViewContext().getPartialResponseWriter().endUpdate();
+ }
}
- public void encodeAfterRows(ResponseWriter writer, FacesContext facesContext, RowHolderBase holder) throws IOException {
- RowHolder rowHolder = (RowHolder)holder;
- Row row = rowHolder.getRow();
-
+ public void encodeAfterRows(ResponseWriter writer, FacesContext facesContext, Row row) throws IOException {
UISubTable subTable = (UISubTable)row;
encodeFooterFacet(writer, facesContext, subTable, false);
encodeTableBodyEnd(writer);
- encodeHiddenContainer(writer, facesContext, subTable);
- if(rowHolder.isPartialUpdate()) {
- facesContext.getPartialViewContext().getPartialResponseWriter().endUpdate();
- }
}
@Override
@@ -176,7 +229,7 @@
return false;
}
- public HeaderEncodeStrategy getHeaderEncodeStrategy(UIComponent column, String tableFacetName) {
+ public EncodeStrategy getHeaderEncodeStrategy(UIComponent column, String tableFacetName) {
//TODO: anton -> use RichHeaderEncodeStrategy for our columns ???
return new SimpleHeaderEncodeStrategy();
@@ -185,7 +238,7 @@
public void encodeClientScript(ResponseWriter writer, FacesContext facesContext, UIDataTableBase component) throws IOException {
UISubTable subTable = (UISubTable)component;
String id = subTable.getClientId(facesContext);
-
+
UIComponent nestingForm = getUtils().getNestingForm(facesContext, subTable);
String formId = nestingForm != null ? nestingForm.getClientId(facesContext) : "";
@@ -234,7 +287,6 @@
return "rf-st-h-c";
}
-
public String getColumnHeaderCellSkinClass() {
return "rf-st-sh-c";
}
@@ -286,8 +338,49 @@
public String getNoDataClass() {
return "rf-st-nd-c";
}
+
+ @Override
+ public void encodeMetaComponent(FacesContext facesContext, UIComponent component, String metaComponentId)
+ throws IOException {
+
+ UISubTable subTable = (UISubTable)component;
+ setupTableStartElement(facesContext, subTable);
+
+ if(UISubTable.SUBTABLE.equals(metaComponentId)) {
+ ResponseWriter writer = facesContext.getResponseWriter();
+
+ UIComponent parent = subTable.getParent();
+ while(parent != null && !(parent instanceof UIDataTable)) {
+ parent = parent.getParent();
+ }
+
+ if(parent == null){
+ //TODO: anton -> do we need this?
+ throw new AbortProcessingException("UISubTable should be a child of UIDataTable");
+ }
+
+ UIDataTable dataTable = (UIDataTable)parent;
+ String updateId = dataTable.getRelativeClientId(facesContext) + ":" + subTable.getId() +":c";
+ facesContext.getPartialViewContext().getPartialResponseWriter().startUpdate(updateId);
+
+ encodeBeforeRows(writer, facesContext, subTable);
+ encodeTableRows(writer, facesContext, subTable, false);
+ encodeAfterRows(writer, facesContext, subTable);
+
+ facesContext.getPartialViewContext().getPartialResponseWriter().endUpdate();
+
+ }else {
+ super.encodeMetaComponent(facesContext, component, metaComponentId);
+ }
+ }
+
+ @Override
+ public EncodeStrategy getHiddenContainerStrategy() {
+ return new SubTableHiddenEncodeStrategy();
+ }
protected void setupTableStartElement(FacesContext context, UIComponent component) {
put(context, component.getClientId(context), CELL_ELEMENT_KEY, HTML.TD_ELEM);
}
+
}
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SubTableToggleControlRendererBase.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SubTableToggleControlRendererBase.java 2010-06-08 11:18:42 UTC (rev 17574)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SubTableToggleControlRendererBase.java 2010-06-08 12:37:56 UTC (rev 17575)
@@ -43,7 +43,6 @@
*/
@ResourceDependencies({@ResourceDependency(library = "javax.faces", name = "jsf.js"),
@ResourceDependency(name = "richfaces.js"), @ResourceDependency(name = "subtable-toggler.js")})
-
public class SubTableToggleControlRendererBase extends RendererBase {
private static final String DISPLAY_NONE = "display: none;";
@@ -62,10 +61,9 @@
}
protected void encodeControl(FacesContext context, UIComponent component) throws IOException {
-
UISubTableToggleControl toggleControl = (UISubTableToggleControl) component;
-
UISubTable subTable = findComponent(context, toggleControl);
+
if (subTable != null) {
ResponseWriter writer = context.getResponseWriter();
@@ -88,7 +86,6 @@
subTable.addToggleListener(toggleControl);
}
-
}
protected void encodeControl(FacesContext context, ResponseWriter writer, UISubTableToggleControl control,
@@ -108,6 +105,7 @@
writer.writeAttribute(HTML.STYLE_ATTRIBUTE, style, null);
boolean encodeDefault = true;
+
UIComponent controlFacet = control.getFacet(state);
if (controlFacet != null && controlFacet.isRendered()) {
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/html/images/ColumnHeaderGradientImage.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/html/images/ColumnHeaderGradientImage.java 2010-06-08 11:18:42 UTC (rev 17574)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/html/images/ColumnHeaderGradientImage.java 2010-06-08 12:37:56 UTC (rev 17575)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
package org.richfaces.renderkit.html.images;
import org.richfaces.renderkit.html.BaseGradient;
Modified: root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/resources/subtable.js
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/resources/subtable.js 2010-06-08 11:18:42 UTC (rev 17574)
+++ root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/resources/subtable.js 2010-06-08 12:37:56 UTC (rev 17575)
@@ -11,7 +11,7 @@
this.formId = f;
$super.constructor.call(this, id);
- $p.attachToDom.call(this, id);
+ $p.attachToDom.call(this, this.id);
};
$.extend(richfaces.ui.SubTable, {
@@ -29,7 +29,8 @@
$.extend(richfaces.ui.SubTable.prototype, (function () {
var element = function() {
- return $(document.getElementById(this.id));
+ //use parent tbody as parent dom elem
+ return $(document.getElementById(this.id)).parent();
};
var stateInputElem = function() {
14 years, 6 months
JBoss Rich Faces SVN: r17574 - root/core/branches/richfaces-core-4.0.0.Alpha2/impl/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-06-08 07:18:42 -0400 (Tue, 08 Jun 2010)
New Revision: 17574
Modified:
root/core/branches/richfaces-core-4.0.0.Alpha2/impl/src/main/resources/META-INF/resources/richfaces-queue.js
Log:
https://jira.jboss.org/browse/RF-8740
Modified: root/core/branches/richfaces-core-4.0.0.Alpha2/impl/src/main/resources/META-INF/resources/richfaces-queue.js
===================================================================
--- root/core/branches/richfaces-core-4.0.0.Alpha2/impl/src/main/resources/META-INF/resources/richfaces-queue.js 2010-06-08 11:16:20 UTC (rev 17573)
+++ root/core/branches/richfaces-core-4.0.0.Alpha2/impl/src/main/resources/META-INF/resources/richfaces-queue.js 2010-06-08 11:18:42 UTC (rev 17574)
@@ -106,7 +106,8 @@
}
}
- this.event = event;
+ // copy of event should be created otherwise IE will fail
+ this.event = $.extend({}, event);
//requestGroupId is mutable, thus we need special field for it
this.requestGroupId = this.queueOptions.requestGroupId;
@@ -240,11 +241,8 @@
entry = lastRequestedEntry = items.shift();
log.debug("richfaces.queue: will submit request NOW");
var o = lastRequestedEntry.options;
- // copy of event should be created otherwise IE will fail
- var e = $.extend({}, lastRequestedEntry.event);
- //lastRequestedEntry.source.appendParameter("AJAX:EVENTS_COUNT", lastRequestedEntry.eventsCount);
o["AJAX:EVENTS_COUNT"] = lastRequestedEntry.eventsCount;
- richfaces.ajax.jsfRequest(lastRequestedEntry.source, e, o);
+ richfaces.ajax.jsfRequest(lastRequestedEntry.source, lastRequestedEntry.event, o);
// call event handlers
if (o.queueonsubmit) {
14 years, 6 months
JBoss Rich Faces SVN: r17573 - root/core/trunk/impl/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-06-08 07:16:20 -0400 (Tue, 08 Jun 2010)
New Revision: 17573
Modified:
root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-queue.js
Log:
https://jira.jboss.org/browse/RF-8740
Modified: root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-queue.js
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-queue.js 2010-06-08 00:22:44 UTC (rev 17572)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-queue.js 2010-06-08 11:16:20 UTC (rev 17573)
@@ -106,7 +106,8 @@
}
}
- this.event = event;
+ // copy of event should be created otherwise IE will fail
+ this.event = $.extend({}, event);
//requestGroupId is mutable, thus we need special field for it
this.requestGroupId = this.queueOptions.requestGroupId;
@@ -240,11 +241,8 @@
entry = lastRequestedEntry = items.shift();
log.debug("richfaces.queue: will submit request NOW");
var o = lastRequestedEntry.options;
- // copy of event should be created otherwise IE will fail
- var e = $.extend({}, lastRequestedEntry.event);
- //lastRequestedEntry.source.appendParameter("AJAX:EVENTS_COUNT", lastRequestedEntry.eventsCount);
o["AJAX:EVENTS_COUNT"] = lastRequestedEntry.eventsCount;
- richfaces.ajax.jsfRequest(lastRequestedEntry.source, e, o);
+ richfaces.ajax.jsfRequest(lastRequestedEntry.source, lastRequestedEntry.event, o);
// call event handlers
if (o.queueonsubmit) {
14 years, 6 months