Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.1
-
Component/s: ICE-Components
-
Labels:None
-
Environment:win xp
-
ICEsoft Forum Reference:
-
Workaround Exists:Yes
-
Workaround Description:use a tabChangeListener to update the selectedIndex bean setter manually.
Description
The PanelTabSet doesn't synchronize tabChange events with the selectedIndex valueBinding if there is one.
suggested fix:
Index: D:/Documents and Settings/pbreau/workspace/ICEfaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSet.java
===================================================================
--- D:/Documents and Settings/pbreau/workspace/ICEfaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSet.java (revision 14824)
+++ D:/Documents and Settings/pbreau/workspace/ICEfaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSet.java (working copy)
@@ -279,6 +279,10 @@
TabChangeEvent tabChangeEvent = (TabChangeEvent) event;
if (tabChangeEvent.getComponent() == this) {
setSelectedIndex(tabChangeEvent.getNewTabIndex());
+ if( getValueBinding("selectedIndex") != null ){
+ getValueBinding("selectedIndex").setValue(this.getFacesContext(), Integer.valueOf(tabChangeEvent.getNewTabIndex()));
+ }
+
//getFacesContext().renderResponse();
}
}
suggested fix:
Index: D:/Documents and Settings/pbreau/workspace/ICEfaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSet.java
===================================================================
--- D:/Documents and Settings/pbreau/workspace/ICEfaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSet.java (revision 14824)
+++ D:/Documents and Settings/pbreau/workspace/ICEfaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSet.java (working copy)
@@ -279,6 +279,10 @@
TabChangeEvent tabChangeEvent = (TabChangeEvent) event;
if (tabChangeEvent.getComponent() == this) {
setSelectedIndex(tabChangeEvent.getNewTabIndex());
+ if( getValueBinding("selectedIndex") != null ){
+ getValueBinding("selectedIndex").setValue(this.getFacesContext(), Integer.valueOf(tabChangeEvent.getNewTabIndex()));
+ }
+
//getFacesContext().renderResponse();
}
}
Issue Links
- is duplicated by
-
ICE-2187
panelSeries/dataTable bug - tab selection in one row automatically selects the same tab in other rows
-
- Closed
-
Activity
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | 1.6.2 [ 10111 ] | |
| Assignee Priority | P3 | |
| Assignee | Mark Collette [ mark.collette ] |
| ICEfaces Forum Reference | http://www.icefaces.org/JForum/posts/list/0/5515.page#26102 |
| Fix Version/s | 1.7DR#3 [ 10112 ] |
| Repository | Revision | Date | User | Message |
| ICEsoft Public SVN Repository | #15045 | Mon Oct 29 19:39:12 MDT 2007 | mark.collette | |
| Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSetRenderer.java
MODIFY
/icefaces/trunk/icefaces/component/src/com/icesoft/faces/resources/messages.properties
MODIFY
/icefaces/trunk/icefaces/component/src/com/icesoft/faces/resources/messages_fr.properties
MODIFY
/icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSet.java
MODIFY
/icefaces/trunk/icefaces/component/src/com/icesoft/faces/utils/MessageUtils.java
ADD
/icefaces/trunk/icefaces/component/src/com/icesoft/faces/utils/UpdatableProperty.java
|
| Repository | Revision | Date | User | Message |
| ICEsoft Public SVN Repository | #15046 | Mon Oct 29 19:52:07 MDT 2007 | mark.collette | |
| Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/samples/component-showcase/web/inc/layoutPanels/panelTabSet.jspx
MODIFY
/icefaces/trunk/icefaces/samples/component-showcase/src/com/icesoft/icefaces/samples/showcase/layoutPanels/tabSetPanel/StaticTabSetBean.java
MODIFY
/icefaces/trunk/icefaces/samples/component-showcase/src/com/icesoft/icefaces/samples/showcase/layoutPanels/tabSetPanel/DynamicTabSetBean.java
|
| Repository | Revision | Date | User | Message |
| ICEsoft Public SVN Repository | #15047 | Mon Oct 29 20:08:25 MDT 2007 | mark.collette | Backport to 1.6.2 : |
| Files Changed | ||||
MODIFY
/icefaces/branches/icefaces-1.6/icefaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSetRenderer.java
ADD
/icefaces/branches/icefaces-1.6/icefaces/component/src/com/icesoft/faces/utils/UpdatableProperty.java
MODIFY
/icefaces/branches/icefaces-1.6/icefaces/component/src/com/icesoft/faces/utils/MessageUtils.java
MODIFY
/icefaces/branches/icefaces-1.6/icefaces/component/src/com/icesoft/faces/resources/messages.properties
MODIFY
/icefaces/branches/icefaces-1.6/icefaces/component/src/com/icesoft/faces/resources/messages_fr.properties
MODIFY
/icefaces/branches/icefaces-1.6/icefaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSet.java
|
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
| Resolution | Fixed [ 1 ] | |
| Status | Resolved [ 5 ] | Reopened [ 4 ] |
| Assignee Priority | P3 | P1 |
| Repository | Revision | Date | User | Message |
| ICEsoft Public SVN Repository | #15085 | Fri Nov 02 11:51:47 MDT 2007 | mark.collette | |
| Files Changed | ||||
MODIFY
/icefaces/branches/icefaces-1.6/icefaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSetRenderer.java
REPLACE
/icefaces/branches/icefaces-1.6/icefaces/component/src/com/icesoft/faces/utils/UpdatableProperty.java
MODIFY
/icefaces/branches/icefaces-1.6/icefaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSet.java
|
| Repository | Revision | Date | User | Message |
| ICEsoft Public SVN Repository | #15090 | Fri Nov 02 17:41:20 MDT 2007 | mark.collette | |
| Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSetRenderer.java
MODIFY
/icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSet.java
MODIFY
/icefaces/trunk/icefaces/component/src/com/icesoft/faces/utils/UpdatableProperty.java
|
| Status | Reopened [ 4 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
| Fix Version/s | 1.7 [ 10080 ] |
| Status | Resolved [ 5 ] | Closed [ 6 ] |
| Assignee Priority | P1 | |
| Assignee | Mark Collette [ mark.collette ] |

Seam has problem with component-binding unless the bean is session-scoped. (not practical). So to use value binding, the selectedIndex has to have value binding available to selectedIndex property.
would be nice to have the option to use valueBinding for this property for ease of use with seam (as well as MVC)
Mark's adhoc fixes worked great and simplified the Bean & xhtml page immensely when he modified the getters and setters of com.icesoft.faces.component.paneltabset as follows:-
/**
*/
void setSelectedIndex(Integer selectedIndex) { System.out.println("PanelTabSet.setSelectedIndex(I="+selectedIndex+")"); if(selectedIndex == null) _selectedIndex = selectedIndex; else setSelectedIndex(selectedIndex.intValue()); }
/**
*/
public void setSelectedIndex(int selectedIndex) {
System.out.println("PanelTabSet.setSelectedIndex(i="selectedIndex")");
ValueBinding vb = getValueBinding("selectedIndex");
boolean worked = false;
if(vb != null)
if(!worked)
{ _selectedIndex = new Integer(selectedIndex); System.out.println("PanelTabSet.setSelectedIndex() field set"); }}
/**
*/
public int getSelectedIndex()