Here is the way, how we get request parameters from a JSP page (which is JSF enabled) in a HTTP request object.
import javax.faces.context.FacesContext; //…your code HttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest(); String controlName = request.getParameter("formId:controlId");
Where formName is refer to the id of your form and controlId is referred to the id of your control.
Hi,
and thank you very much!
This works really fine! Just to mention, each control on the form is a container for inside controls; this means:
if you have some checkboxes inside a table column, you’ll have to point to the first Checkbox as:
form1:dataTable1:0:Select
and so forth…
Thanks again!
Dear,
thanks for this nice blog please keep on
actullay i’m anewbie in jsf
i want asample code to datatable which can add,delete,update and edit
could you please send me this one
my mail
eng_essamzizo@hotmail.com
Thanks
Thanks ,
Thumbs up.
You can also try PrettyFaces — bookmarkable pages and also lets you call actions when pages are accessed via GET (http://ocpsoft.com/prettyfaces)
thank you very much!! You saved our school-project =)