By: Kadhar Emailed: 1700 times Printed: 2200 times
When you set the id for a TreeNode are you getting an illegal Argument exception.
String id = "0C00EC8C-E1";
TreeNode node = new TreeNode;
This code may throw an IllegalArgument exception. To solve this problem you need to u need to adhere to the contract of UIComponent.setId():
- Must not be a zero-length String.
- First character must be a letter or an underscore ('_').
- Subsequent characters must be a letter, a digit, an underscore ('_'), or a dash ('-').
- Component identifiers must also obey the following semantic restrictions (note that this restriction is NOT enforced by the setId() implementation):
- The specified identifier must be unique among all the components (including facets) that are descendents of the nearest ancestor UIComponent that is a NamingContainer, or within the scope of the entire component tree if there is no such ancestor that is a NamingContainer.
This should solve your problem.
View Tutorial By: habib_fci at 2008-06-11 06:05:29
Most Viewed Articles (in JSF )
Most Emailed Articles (in JSF)