Community

Initializing a Managed Bean's Property

created by John Bailo in JBoss Tools - View the full discussion

I have a managed bean that calls a server via a URL.

 

Since this will rarely change, I thought I'd add it to the faces-config.xml so that it would be a default value.

 

I added the property to my bean via Eclipse and it created the get/set accessors (not sure if these are needed, since they were optional).

 

I added the value to my managed bean's property.

 

I see that a global String was added to the bean class with the name of the new property.

 

 

However, when I call the bean, via a method I use to create a List and populate a dataTable in a JSF page, I find that the server URL variable is not initialized.

 

What do I have to do to get the bean to read its default managed property?

Reply to this message by going to Community

Start a new discussion in JBoss Tools at Community