• 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

Front Man - redirectToCommand with parameters

 
Ranch Hand
Posts: 86
2
VI Editor Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
VI Editor Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
VI Editor Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic