Hi,
we just had a problem at customer/user-site: a stack trace on server side was coming up, telling:
Code:
java.lang.IllegalStateException: Duplicate component ID...
The problem was "caused" by the dynamic creation of JSF components and by explicitly assigning the id via setId(). When opening one and the same page first as normal page and afterwards as popup then the error showed up.
Do not call "BaseComponent.setId(...)" if not explicitly required. (The only component which currently requires this is the popup-menu component.)
Just leave out the setId("") - a unique id is created automatically when calling BaseComponentTag.createBaseComponent().
Code:
CORRECT:
LABELComponentTag lct = new LABELComponentTag();
lct.setText("...");
lct.setWidth("...");
BaseComponent lc = lct.createBaseComponent();
NOT CORRECT:
LABELComponentTag lct = new LABELComponentTag();
lct.setId("id_hello");
lct.setText("...");
lct.setWidth("...");
BaseComponent lc = lct.createBaseComponent();
Björn