tags:

views:

126

answers:

1

I just cannot figure this out, it looks really simple but I'm relatively new at jsf.

Here is the old stuff: Plain old html form tag like this:

<form name="someForm" action="somewhere" method="post">
   <input name="param1"/>
   <input name="param2" />
</form

That is sending data by post to a location specified in the action attribute of the form.

The new stuff:

<h:form id="paymentForm">
<h:panelGroup> 
    <h:inputText id="param1" value="#{facesView.param1}" ></h:inputText>
    <h:inputText id="param1" value="#{facesView.param2}" ></h:inputText>
    <h:panelGroup>
    <h:commandLink>Submit</h:commandLink>
</h:panelGroup>
</h:form>

This other new stuff doesn't work.

1.How do I specify to this h:form where to go(like setting action in old html) because I need it to go to a totally new url.

2.how to pass params with POST?

Any help is appreciated. Milos

+1  A: 

If you want to submit a form to a URL where it will be handled by you (or someone else) manually, then you can still use the "old stuff" with JSF and have the form submitted. That way you will lose the ability to bind the values of the inputs to properties of managed bean.

Otherwise you can't choose the URL to submit to and at the same time use the bindings - in order to get the JSF functionality you have to submit to the JSF servlet, which in turn to handle everything.

Bozho
That's exactly what I did to make the thing work(and it's working).But I don't like it because of losing the binding to managed bean and I'm searching for a diferrent solution(if it exists :)). Thanks.