Announcement Announcement Module
Collapse
No announcement yet.
BindAndValidate Issue Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • BindAndValidate Issue

    I have to do validations based on 2 domain objects.i m using the following method to get 1 object
    public void validate(Object target, Errors err)
    {
    Person p = ( Person ) obj;
    }
    i just need to access one attribute from the second domain object which is in the flow , however seems like i cannot do that.Is there a way i can access result of a flowscope variable in bindandvalidate ?

  • #2
    You should be able to access it through the requestContext. You can get this through the requestContextHolder:

    Code:
    RequestContext context = RequestContextHolder.getRequestContext();
    Object myObject = context.getFlowScope().get("attributeName");

    Comment


    • #3
      thanks a lot !!

      Comment

      Working...
      X