You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by jw...@apache.org on 2014/07/03 19:25:20 UTC
svn commit: r1607699 - in /myfaces/trinidad/trunk/trinidad-api/src/main:
java-templates/org/apache/myfaces/trinidad/component/
java/org/apache/myfaces/trinidad/component/
Author: jwaldman
Date: Thu Jul 3 17:25:19 2014
New Revision: 1607699
URL: http://svn.apache.org/r1607699
Log:
TRINIDAD-2436 We should update Table's selection state during invoke application phase
rolling back changes from svn 1585818 due to regressions.
thanks to Leon Chan for the patch
Modified:
myfaces/trinidad/trunk/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTableTemplate.java
myfaces/trinidad/trunk/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTreeTemplate.java
myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/TableUtils.java
Modified: myfaces/trinidad/trunk/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTableTemplate.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTableTemplate.java?rev=1607699&r1=1607698&r2=1607699&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTableTemplate.java (original)
+++ myfaces/trinidad/trunk/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTableTemplate.java Thu Jul 3 17:25:19 2014
@@ -204,11 +204,6 @@ abstract public class UIXTableTemplate e
}
else if (event instanceof SelectionEvent)
{
- SelectionEvent selectionEvent = (SelectionEvent)event;
- // make the row key change from the SelectionEvent go live on the component.
- // From now on, getSelectedRowKeys() on the component will return the
- // adjusted selection state.
- _updateSelectionState(selectionEvent);
//pu: Implicitly record a Change for 'selectionState' attribute
addAttributeChange("selectedRowKeys",
getSelectedRowKeys());
@@ -218,20 +213,6 @@ abstract public class UIXTableTemplate e
super.broadcast(event);
}
- /**
- * Update component's selection state to be in sync with the selection
- * state.
- * @param event SelectionEvent that contains selection state change information
- */
- private void _updateSelectionState(SelectionEvent event)
- {
- RowKeySet rks = getSelectedRowKeys();
- RowKeySet added = event.getAddedSet();
- RowKeySet removed = event.getRemovedSet();
- rks.removeAll(removed);
- rks.addAll(added);
- return;
- }
/**/ abstract public void setDisclosedRowKeys(RowKeySet state);
/**/ abstract public RowKeySet getDisclosedRowKeys();
Modified: myfaces/trinidad/trunk/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTreeTemplate.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTreeTemplate.java?rev=1607699&r1=1607698&r2=1607699&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTreeTemplate.java (original)
+++ myfaces/trinidad/trunk/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTreeTemplate.java Thu Jul 3 17:25:19 2014
@@ -104,11 +104,6 @@ abstract public class UIXTreeTemplate ex
{
if (event instanceof SelectionEvent)
{
- SelectionEvent selectionEvent = (SelectionEvent)event;
- // make the row key change from the SelectionEvent go live on the component.
- // From now on, getSelectedRowKeys() on the component will return the
- // adjusted selection state.
- _updateSelectionState(selectionEvent);
//pu: Implicitly record a Change for 'selectionState' attribute
//=-=pu: This ain't getting restored. Check with Arj or file a bug.
addAttributeChange("selectedRowKeys",
@@ -123,21 +118,6 @@ abstract public class UIXTreeTemplate ex
super.broadcast(event);
}
- /**
- * Update component's selection state to be in sync with the selection
- * state.
- * @param event SelectionEvent that contains selection state change information
- */
- private void _updateSelectionState(SelectionEvent event)
- {
- RowKeySet rks = getSelectedRowKeys();
- RowKeySet added = event.getAddedSet();
- RowKeySet removed = event.getRemovedSet();
- rks.removeAll(removed);
- rks.addAll(added);
- return;
- }
-
@Override
protected void postCreateCollectionModel(CollectionModel model)
{
Modified: myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/TableUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/TableUtils.java?rev=1607699&r1=1607698&r2=1607699&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/TableUtils.java (original)
+++ myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/TableUtils.java Thu Jul 3 17:25:19 2014
@@ -184,6 +184,8 @@ public final class TableUtils
* This method sets the phaseID of the event
* according to the "immediate" property of this
* component.
+ * If "immediate" is set to true, this calls
+ * {@link FacesContext#renderResponse}
*/
static void __handleQueueEvent(UIComponent comp, FacesEvent event)
{
@@ -194,6 +196,8 @@ public final class TableUtils
if (Boolean.TRUE.equals(isImmediate))
{
event.setPhaseId(PhaseId.ANY_PHASE);
+ FacesContext context = FacesContext.getCurrentInstance();
+ context.renderResponse();
}
else
{