0

I tried to add @Produces to my variables in my backingbean like this:

@Produces   
@Named  
String selectedCustomerFirstname;  

and removed the getters and setters. In my xhtml page I show the value like this:

<p:inputText value="#{selectedCustomerFirstname}" ></p:inputText>  

The problem now is that the value gets displayed correctly, but if I change it and submit the form, the backingbean always receives the old value... Does ayone have a solution to this problem?

user3172567
  • 461
  • 1
  • 7
  • 19
  • 1
    `@Produces` only outjects the value, you can't manipulate an immutable entity (like String) in this way, AFAIK. – mabi Jan 22 '14 at 10:55
  • 2
    Why don't you use a @Named bean of some scope with a simple field for that? BTW, getter/setters are a good thing here ) – Yuri Jan 22 '14 at 11:40

0 Answers0