Announcement Announcement Module
Collapse
No announcement yet.
JSP requestScope work, spring bind input donīt Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JSP requestScope work, spring bind input donīt

    Hi im implementing a Controller with the associated view. Into jsp view i want bind field of my bean using spring form tags...

    <spring:bind commandName="globalModel">
    <springform:input path="viewAction" />
    </spring:bind>

    but the input remind with previous post value(setted on in other jsp view)
    If i use ${requestScope.globalModel.viewAction}, i get the actual viewAction value.
    Why is wrong in my code?

    My logic flow is......

    View 1('welcome.jsp').
    ---------------------------
    set viewAction = 'list_view'
    form submit

    |
    V

    Controller
    ------------------------------
    globalModel = {logic}
    globalModel.setViewAction('This is a test')
    return ModelAndView('listView', 'globalModel', globalModel)

    |
    V

    View2('listView.jsp')
    -----------------------------
    ${requestScope.globalModel.viewAction} //This is a test

    <spring:bind commandName="globalModel">
    <springform:input path="viewAction" /> //input value == 'list_view'
    </spring:bind>


    Thank for advanced
Working...
X