Results 1 to 4 of 4

Thread: reference data

  1. #1

    Default reference data

    Hello All,
    I am just starting to use the reference data method in cancellableformcontroller to populate some data on my jsp page.

    The method I have so far is simple:

    protected Map referenceData(HttpServletRequest request)
    {
    Map referenceDataModel = new HashMap();
    referenceDataModel.put("testData", "This is my data");
    logger.debug ("Were getting here" + referenceDataModel.toString());
    return referenceDataModel;
    }

    How do I access this 'testData' on my JSP page? I tried using:
    THIS IS THE VALUE: <c:out value="${model.testData}"/>!

    but no success. I thought that this 'testData' field would just get merged into the model that is returned to the form view.

    Any ideas or links you can point me to?

    Thanks!

    Yogesh

  2. #2
    Join Date
    Aug 2004
    Posts
    1,905

    Default

    Quote Originally Posted by ychawla
    I thought that this 'testData' field would just get merged into the model that is returned to the form view.
    You are exactly right, it does

    Quote Originally Posted by ychawla
    THIS IS THE VALUE: <c:out value="${model.testData}"/>!
    Do you reference anything else with "model."? Answer: no

    Quote Originally Posted by ychawla
    THIS IS THE VALUE: <c:out value="${testData}"/>!
    HTH

  3. #3
    Join Date
    May 2005
    Location
    California, US
    Posts
    735

    Default

    Code:
    <c:out value="${testData}"/>

  4. #4

    Red face

    Thanks Lumpynose and Yatesco,
    I think I was having a deployment problem. I redeployed and all data passed through as expected.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •