Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Invalid
-
Affects Version/s: 1.5.3, 1.5.4, 1.6DR#1
-
Fix Version/s: None
-
Component/s: ICE-Components
-
Labels:None
-
Environment:Exists for sure in the current 1.5.3 release but is likely also on the 1.5 branch and the trunk (1.6).
-
ICEsoft Forum Reference:
-
Workaround Exists:Yes
-
Workaround Description:Ensure that children of each panelTab have a unique ID relative to the enclosing panelTabGroup.
Description
Components within panelTabs of a panelTabGroup cannot have the same ID or the following exception is thrown:
javax.servlet.jsp.JspException: Duplicate component id
The problem can be shown using the following code snippet.
<ice:form id="formID">
<ice:panelTabSet id="setID">
<ice:panelTab id="tab01">
<ice:inputText id="inputID" value="Red"/>
</ice:panelTab>
<ice:panelTab id="tab02">
<ice:inputText id="inputID" value="Blue"/>
</ice:panelTab>
</ice:panelTabSet>
</ice:form>
The IDs for the input text fields ends up being:
For the "Red" input text: formID:setID:inputID
For the "Blue" input text: formID:setID:inputID
The problem is that the panelTab ID is missing. Investigating the code, it appears that the panelTab component does not implement the NamingContainer interface and therefore does not override the getClientID method which should get injected into the final client ID.
javax.servlet.jsp.JspException: Duplicate component id
The problem can be shown using the following code snippet.
<ice:form id="formID">
<ice:panelTabSet id="setID">
<ice:panelTab id="tab01">
<ice:inputText id="inputID" value="Red"/>
</ice:panelTab>
<ice:panelTab id="tab02">
<ice:inputText id="inputID" value="Blue"/>
</ice:panelTab>
</ice:panelTabSet>
</ice:form>
The IDs for the input text fields ends up being:
For the "Red" input text: formID:setID:inputID
For the "Blue" input text: formID:setID:inputID
The problem is that the panelTab ID is missing. Investigating the code, it appears that the panelTab component does not implement the NamingContainer interface and therefore does not override the getClientID method which should get injected into the final client ID.
Marking as Closed / Invalid as part of legacy ICEfaces ICE / Compat component JIRA cleanup.
Note: This issue may be resolved in a newer ICEfaces release, available here: http://www.icesoft.org/java/downloads/icefaces-downloads.jsf
If the issue persists with the current ICEfaces release, please create a new JIRA for it.