I need to post form to external url.
I can use regular html form code with form action set to external url, but I want to use skinned p:commandButton or p:button.
How to do that?
Thanks
how to post form to external url
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
With ajax or without ajax?
Without ajax, like I would do it with regular html form tag
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
You can set ajax to false on commandbutton.
I need to submit a form to external URL. In html it should look like something like:
I believe I could use <p:button> instead of html <button> somehow, but not sure how.
Code: Select all
<form method="post" action="http://some_external_web_site.com/submit">
<input type="hidden" name="var_name" value="var_value"/>
<button type="submit">Proceed to ACS Page</button>
</form>
-
- Posts: 6
- Joined: 02 Mar 2010, 13:30
i think you can use this
Code: Select all
<h:outputLink value="example.com" target="_new">
<p:graphicImage value="/images/16/zoom_selection.png" title="#{lbl.go}" style="border: 0px" />
<f:param name="param1" value="#{yourBean.obj.id}" />
<f:param name="param2" value="#{yourBean.obj.name}" />
</h:outputLink>
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
If you'd like post to an external url, best practice is not to do it
Use h:link, h:button or p:button to do a get request with f:param tags.
Use h:link, h:button or p:button to do a get request with f:param tags.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 47 guests