Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8562411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:43:28+00:00 2026-06-11T16:43:28+00:00

On the surface, a bit of a strange question! but I am creating a

  • 0

On the surface, a bit of a strange question! but I am creating a web app that uses both webflow and traditional Spring MVC controllers.

From one of the webflow views, a http request (ajax) is made from the client to a spring controller. When this was originally coded it didnt have much of a logical connection to the webflow, but now things have moved on and the controller could really do with knowing what screen (view-state) the request has come from.

My controller method signature looks like this:

@RequestMapping(value="/AjaxStuff", method=RequestMethod.POST)
public String ajaxStuff(@ModelAttribute("quote") QB2MotorQuote p_quote, BindingResult p_bindingResult, 
        HttpServletRequest p_req, Model p_model, DefaultMessageContext p_messages) {

I know from some of my webflow action classes that I can get the current state from the RequestContext object:

public Event checkDeclines(RequestContext p_ctx) throws Exception {
    // get the current state
    StateDefinition state = p_ctx.getCurrentState();

I’ve never really understood the ‘voodoo’ 🙂 that Spring does where it can automagically inject parameters just by specifying them on the method signature (surely it can only inject things it knows about ??). I’ve tried simply changing the method signature of my controller method to inject in the RequestContext (in the vain hope that it will get injected), but it doesn’t. It complains that RequestContext is an interface.

So, does anyone know how I can make my controller know about the current webflow state – either through injecting something into the controller method signature, or perhaps I can get it from the http request somehow (or session, which I can get from the request).

Any help with this very much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:43:29+00:00Added an answer on June 11, 2026 at 4:43 pm

    inside your webflow view, you should have access to a variable ${flowRequestContext} that you can use in your ajax call.

    you can just get the piece of information ${flowRequestContext.currentState} you want from it and add it as a parameter.

    you cannot have the requestContext directly injected as your are not in a webflow environment. If you were, you could directly use RequestContext.getRequestContext(). Try calling it from your MVC controller and you will get null. Try from within a flow and you will get it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some working code that uses IImgCtx to load images, but I can't
I'm having troubles with creating a rectangular surface that has a cone-like spotlight pointing
Imagine that HTML page is a game surface (see picture). User can have n
Real-life case (helps understand the question) I am building a device that can freely
I'm trying to represent several surface plots* for which the scale differs a bit.
I need to incorporate a flowchart design surface into an app we're developing to
I have a small python VTK function that calculates the volume and surface area
I have a 3D data set of a surface that is not a function
In my previous question I got an excellent answer that helped me detect where
This may be a bit silly, but all the applications I've built have always

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.