This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

@Responsebody for HTTP msg and a View to show the HTTP response msg

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How exactly can I trigger display of a model and view from another model and view’s controller?

HTTP Request View --> HttpRequestController POST -> new HttpResponse POJO and a string of the POJO in XML for the Http Response msg to be sent back to the Requestor --> <what should I return from the POST handler?>

I have HttpRequestController() to handle a POST message with data from an input Form and populated an HttpRequest POJO with it. An HttpResponse POJO is composed and persisted along with the HttpRequest to a Db.

The HttResponse is made into an XML string as the @Responsebody to be sent back (as an actual HTTP Response message with header and body) and I want to present this HttpResponse POJO in a View.

I tried different things, none worked and I could not find a similar example anywhere.

HttpRequestController, HttpRequest and HttpResponse POJOs:
I have an HttpResponse View (jspx) for ‘show’ and an unused HttpResponseController():

What should I return from the HttpRequestController().POST to trigger an HTTP Response message to be sent back and the data-sent-back to be shown on in an HTTP Response View?

I desperately need help. I’d be quite grateful for any pointers, any info or any suggestions. Please kindly help.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic