Skip to main content

JSF2: dynamically added components loose custom ids in restoreView

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
kurtz_mr
Offline
Joined: 2011-02-03

I have noticed components added dynamically loose their original ids when they are restored.
As a consequence dynamically added nested components won't restore properly if their parent had custom id: parentClientId won't match new clientId of the parent. An example: I add a form with id myForm and a UIInput inside. The UIInput's ComponentStruct will have parentClientId "myForm" and clientId "myForm:j_idt1". Restored form will have id like j_idt5. The code tries to find parent looking it up by id "myForm" which fails. Therefore UIInput won't be restored because there is no parent to add it to.
Is this intended or should I report it as a bug?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kurtz_mr
Offline
Joined: 2011-02-03

Never mind, this would make no sense anyway.