tags:

views:

19

answers:

3

Is there a way to submit a form and have the URL include the parameters, that is submit as a GET request.. rather than POST?

form.jsf/?firstName=John&lastName=Doe

I thought would work (instead of the normal , however it doesn't seem to grab the form data.. any ideas?

A: 

You can change the action of the form to be get instead of post. This will add the form values to the qs instead of posting them.

Mike
A: 

yes you can with preRenderViewEvent you can have something like this in view

 <f:metadata>
    <f:viewParam name="team" value="#{teamEditView.team}"/>
 </f:metadata>
 <f:event type="preRenderView" listener="#{teamEditView.setupEditPage}"/> 

where you can pas view params and invoke the listener and fetch data acording to params in that listener method.

A: 

Replace <h:form> by <form> and use either @ManagedProperty in the model side or <f:viewParam> in the view side to set those parameters as bean properties.

BalusC