Ways of Passing Data from the UI to the Server
- Pass as the value of an HTTP request parameter:
- In the page: use the f:param tag
(Example)
- In the bean: use the ExternalContext.getRequestParameterMap
method
(ChangeLocaleBean)
- Pass as the value of a JSF tag attribute:
- In the page: use the f:attribute tag
(Example)
- In the bean: use the UIComponent.getAttributes
method
(ChangeLocaleBean)
- Have an action listener directly set a bean property:
- In the page: use the f:setPropertyActionListener tag
(Example)
- In the bean: simply provide a settable property.
(ChangeLocaleBean)