• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

why i can not use f:param inside an html form? what is the solution for it?

 
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Thank you for reading my post
what is wrong with the following code ?
[code]

<form action="https://www.3rdpartyWeb.com/CardServices/controller"
method="GET" enctype="multipart/form-data"
name="submissionform">
<f:param value="#{Session.MID}" name="MID" id="MID"/>
<f:param value="#{ButtonsActionListener.reservationNumber}"
name="ResNum" id="ResNum"/>
<f:param value="#{Session.redirectURL}" name="RedirectURL"
id="RedirectURL"/>
<f:param value="#{ButtonsActionListener.total_price}" name="Amount"
id="Amount"/>

</form>
<SCRIPT type="text/javascript">
document.forms["submissionform"].submit();
</SCRIPT>

[code]

while both ButtonsActionListener , Session are managed beans ,
my question is , does the above form will post correctly to the named
url along with parameters ?
if not , how i can make this possible , i should say that i submit the
form using javascript and no user interaction should be involved.

do i used a correct design for this ?
I should say that : i used some java script to show a progress bar in
this page until the page submit to 3rd party web site.

what is a correct design for this kind of requirements ?
thanks
 
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

what is wrong with the following code ?


i cannot say whats wrong, if you dont tell me whats happening when the code runs. does it work as intended (or) does it give you errors?
 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in this code , the form submit as i used javascript , but none of parameters are included in form submission.
I looked at the html code that is generated and i find that none of those param stuff included in the form tag.

thanks
 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
use the jsf form component(not a web form) and apply the action to the Submit button the jsf button has the ability to pass parameters
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is working for me if I use param inside commandLink


This is completely jsf base jsp so it may not work for you.
[ October 05, 2006: Message edited by: Sajan Patel ]
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
f:param is not intented for this use. Use f:attribute within an UICommand element instead.
Also see http://balusc.xs4all.nl/srv/dev-jep-com.html
[ October 09, 2006: Message edited by: B L Scholtz ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic