2

In my Spring web flow, I have a variable in FlowScope named "action", and I want to check this variable in validation method;

\\\\\\
    if(action=="copy"){
    doCopy;
    }else{
    doOther;
    } 
\\\\\\\

But I don't know how to call "action" variable. Please help me.

1 Answer 1

5

Can't you access it like this:

RequestContext rc = RequestContextHolder.getRequestContext();
String action = (String) rc.getFlowScope().get("action");

Or, without the typecast if you know the type:

String action = rc.getFlowScope().getString("action");
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.