JSF - TreeNode.setID gets IllegalArgument Exception

By: Kadhar Emailed: 1600 times Printed: 2052 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

When you set the id for a TreeNode are you getting an illegal Argument exception.

For example:

String id = "0C00EC8C-E1";
TreeNode node = new TreeNode;
node.setId(id); //

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.


JSF Home | All JSF Tutorials | Latest JSF Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(1)


1. View Comment

i want divide the jsf page to two pages
plez if body now send to me


View Tutorial          By: habib_fci at 2008-06-11 06:05:29

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Kadhar
JSF - TreeNode.setID gets IllegalArgument Exception

More Tutorials in JSF
Struts Vs JSF (A comparison of Struts against JSF)
faces-config.xml to DirectTraffic in the JSF Application
<convertNumber> and <convertDateTime> in JSF
Action listeners in JSF
Calling Multiple Listeners in JSF
Using Javascript in JSF
How to open a new browser window from my JSF page?
Servlet error : java.lang.IndexOutOfBoundsException (JSF RI 1.1_01: IndexOutOfBoundsException)
JSF - TreeNode.setID gets IllegalArgument Exception
Install and Deploy JBoss Application Server
What is JSF (JavaServer Faces)?
Differences between JavaServer Faces technology and Struts
JSF Basics
The Relationship Between JSF and Other Java EE Technologies
JSF Life Cycle

More Latest News
Most Viewed Articles (in JSF )
Install and Deploy JBoss Application Server
How to open a new browser window from my JSF page?
JSF - TreeNode.setID gets IllegalArgument Exception
What is JSF (JavaServer Faces)?
Differences between JavaServer Faces technology and Struts
JSF Basics
The Relationship Between JSF and Other Java EE Technologies
JSF Life Cycle
Installing JSF
Java Bean Scopes in JSF
Controlling Page Navigation in JSF - Static and Dynamic Navigation
Accessing Context Data in Beans using JSF
Using Javascript in JSF
Servlet error : java.lang.IndexOutOfBoundsException (JSF RI 1.1_01: IndexOutOfBoundsException)
faces-config.xml to DirectTraffic in the JSF Application
Most Emailed Articles (in JSF)
What is JSF (JavaServer Faces)?
Accessing Context Data in Beans using JSF
Servlet error : java.lang.IndexOutOfBoundsException (JSF RI 1.1_01: IndexOutOfBoundsException)
Controlling Page Navigation in JSF - Static and Dynamic Navigation
JSF - TreeNode.setID gets IllegalArgument Exception
faces-config.xml to DirectTraffic in the JSF Application
<convertNumber> and <convertDateTime> in JSF
Calling Multiple Listeners in JSF
Struts Vs JSF (A comparison of Struts against JSF)
Install and Deploy JBoss Application Server
Differences between JavaServer Faces technology and Struts
JSF Basics
The Relationship Between JSF and Other Java EE Technologies
JSF Life Cycle
Installing JSF