You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ar...@apache.org on 2009/03/25 02:15:35 UTC
svn commit: r758113 - in /myfaces/trinidad/branches/1.2.11.2-branch: ./
trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/
trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox...
Author: arobinson74
Date: Wed Mar 25 01:15:35 2009
New Revision: 758113
URL: http://svn.apache.org/viewvc?rev=758113&view=rev
Log:
TRINIDAD-1435
Ensure that the row selection state is updated for single selection if the selection state has more than one row
Modified:
myfaces/trinidad/branches/1.2.11.2-branch/ (props changed)
myfaces/trinidad/branches/1.2.11.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRenderer.java
myfaces/trinidad/branches/1.2.11.2-branch/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component/ (props changed)
myfaces/trinidad/branches/1.2.11.2-branch/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event/ (props changed)
Propchange: myfaces/trinidad/branches/1.2.11.2-branch/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Mar 25 01:15:35 2009
@@ -1,3 +1,3 @@
/myfaces/trinidad/branches/1.2.9.1-branch:697924,699406,699496
/myfaces/trinidad/branches/TRINIDAD-1402:745675
-/myfaces/trinidad/trunk:745151,755794
+/myfaces/trinidad/trunk:745151,755794,758112
Modified: myfaces/trinidad/branches/1.2.11.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRenderer.java?rev=758113&r1=758112&r2=758113&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRenderer.java (original)
+++ myfaces/trinidad/branches/1.2.11.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRenderer.java Wed Mar 25 01:15:35 2009
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -28,16 +28,14 @@
import javax.faces.context.ResponseWriter;
import javax.faces.event.FacesEvent;
-import org.apache.myfaces.trinidad.logging.TrinidadLogger;
import org.apache.myfaces.trinidad.bean.FacesBean;
import org.apache.myfaces.trinidad.component.UIXCollection;
import org.apache.myfaces.trinidad.component.UIXTable;
import org.apache.myfaces.trinidad.component.UIXTree;
-import org.apache.myfaces.trinidad.component.core.data.CoreTable;
+import org.apache.myfaces.trinidad.context.RenderingContext;
import org.apache.myfaces.trinidad.event.SelectionEvent;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
import org.apache.myfaces.trinidad.model.RowKeySet;
-
-import org.apache.myfaces.trinidad.context.RenderingContext;
import org.apache.myfaces.trinidad.render.CoreRenderer;
import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectBooleanCheckboxRenderer;
import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlConstants;
@@ -76,9 +74,9 @@
String selectionParam = __getSelectionParameterName(context, table);
- Map<String, String> parameters =
+ Map<String, String> parameters =
context.getExternalContext().getRequestParameterMap();
-
+
_LOG.finest("Params:{0}", parameters);
String selection = parameters.get(selectionParam);
@@ -92,7 +90,10 @@
state = ((UIXTree) table).getSelectedRowKeys();
table.setClientRowKey(selection);
- if (!state.isContained())
+ // If the key is not already selected, or the state is more than one
+ // (someone changed the table selection from multiple to single),
+ // update the keys
+ if (!state.isContained() || state.size() > 1)
{
RowKeySet unselected = state.clone();
// TODO : do not mutate the selectedRowKeys here.
Propchange: myfaces/trinidad/branches/1.2.11.2-branch/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Mar 25 01:15:35 2009
@@ -1,3 +1,3 @@
/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component:699406,699496
/myfaces/trinidad/branches/TRINIDAD-1402/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component:745675
-/myfaces/trinidad/trunk/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component:745151,755794
+/myfaces/trinidad/trunk/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component:745151,755794,758112
Propchange: myfaces/trinidad/branches/1.2.11.2-branch/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Mar 25 01:15:35 2009
@@ -1,3 +1,3 @@
/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event:699406,699496
/myfaces/trinidad/branches/TRINIDAD-1402/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event:745675
-/myfaces/trinidad/trunk/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event:745151,755794
+/myfaces/trinidad/trunk/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event:745151,755794,758112