• Post Reply Bookmark Topic Watch Topic
  • New Topic

Saving a Session attribute through JSF

 
marcel vieira
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I store in database an user Session attribute along with other informations provided in the same form?


I've already tested with disabled="false", too, but only the Session attribute is saved as NULL, though it appears in the form field. The other fields are saved properly.

Thanks in advance.
 
Tim Holloway
Bartender
Posts: 18408
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The difference between the "$" EL notation and the "#" notation is that the "$" form is read-only, but the "#" is a reference to a read/write property. You have coded a read-only expression in a way and a place that requires a read/write expression.

The term "session attribute" refers to a session-scope object and the stock J2EE session scope object and JSF session scope objects are exactly the same objects except that in JSF the objects will automatically be constructed if they are needed but don't yet exist and they can be injected as managed properties into JSF backing beans.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!