• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Front Man - redirectToCommand with parameters  RSS feed

 
Ranch Hand
Posts: 86
2
Java Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm using Front Man 1.6.2. Is there a way to use redirectToCommand of CommandContext, so that the parameters are sent using POST method? Or is this a bad idea by nature and I should accomplish my needs other way.

To describe what I want: I have an application for creation of purchasing requisitions. So far I have these commands - createRequest to create new requisition, showRequest to show details of requisition and viewRequests to show a list of requisitions created by logged requester. CreateRequest forwards to view newRequest, where form is shown to enter header and item details of new requisition. The form is posted to the same command i.e. createRequest and in case there is an error creating the requisition, it forwards back to view newRequest (otherwise to showRequest). So that the user can just fix the errors, the form fields reuse posted data using ${param} and ${paramValues}. Now I'd like to implement an option to copy existing requisition to a new one (i.e. take it as a template). My idea is to reuse as much as I can - create new command copyRequest that takes requisition number as an parameter, reads the data, stores them as parameters and simply redirects to command createRequest. (Where it shows the filled form for the first time as there was no submit yet.)

Thanks.

Regards,
Tomas
 
Marshal
Posts: 24468
55
Eclipse IDE Firefox Browser MySQL Database
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you do an HTTP redirect, it always uses the GET method. So there's no way for any software to modify that and use POST.
 
Tomas Linhart
Ranch Hand
Posts: 86
2
Java Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for answer, I guess I'd have to solve it another way then. What you think would be the "cleanest" solution for my requirement? One that I can think of is not to create new command copyRequest, but use the createRequest command with a templateNumber=1234567890 parameter, which would read the requisition data and prefill the form.
 
Sheriff
Posts: 67259
170
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why can't you just pass the parameters on the request? And failing that, why not use the session?
 
Tomas Linhart
Ranch Hand
Posts: 86
2
Java Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you be more specific please? What parameters and what request (i.e. to what command) are you talking about? Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!