webtier@glassfish.java.net

@Managedproperties into jsf2 not work

From: <forums_at_java.net>
Date: Sat, 16 Jul 2011 17:28:03 -0500 (CDT)

hi .

i have a problem

intoa jsf2 application i have 2 managedbeans.

a customerForm with requestscoped

a customerSession whit sessionscoped

into the customerForm i have inject the customerSession with the annotation
@Managedproeprties (values="#{customerSession"}

and the the propertie :

CustomeSession customerSession

public setCustomerSession(CustomerSession customerSession){

this.customerSession=customerSession;

}

----------------------------------

from page insertcustomer.xhtml

i have a form that popule the bean customerForm .

the button have the action="#{customerForm.saveCustomer}"

into the metod saveCustomer() i create a new Customer , and i save it intoa
database.the new customer next it is set at customerSession (it is a
properties of it)

-------------

but if not set the beans into faces-config.xml i get the message that
customerForm it is null.

if i set the beans and its managed properties into faces.config.xml it
work!!!!!!!!

but into jsf2 it not have toconfiguration of beans .it a the annotation.

tank you for your response..........

mauro

 

Cust


--
[Message sent by forum member 'mauro2011']
View Post: http://forums.java.net/node/823174