Should I expect that the results of UIComponent#getClientId()
could change across a user session? I'd like to save the full clientId reference to a UIComponent
and use it later.
When user adds a dynamic component:
myBean.setClientId(composite.getClientId());
Much later in the session when the user "Saves":
String clientId = myBean.getClientId();
UIComponent composite = view.findComponent(clientId);
- Maybe different JSF implementations don't guarantee the same clientId across the session?
- Maybe dynamically adding and removing
UIComponents
(or whim) will cause one of the containers in the path to change an index across requests?
I saw this great Q&A and I'm not sure if it fully answers the question of saving a clientId and using it several requests later in a session or in a dynamic form: when-and-how-is-clientid-generated-in-jsf
Thanks