dynamic data reload to struts2 jquery grid on form submit

后端 未结 3 443
一整个雨季
一整个雨季 2021-01-27 02:28

I have a grid which load data on page load. I also have a form that on submit calls an action correctly, but it doesn\'t load new data on my grid.

List is correctly get

3条回答
  •  情书的邮戳
    2021-01-27 03:09

    It doesn't work this way. try do the following things:

    1. make an action retuen a page, not json

      page_with_the_grid.jsp
      
    2. on the page page_with_the_grid.jsp, use s:url tag to map your json result:

      
      
    3. in your sj:grid, use href="%{jsonUrl}" to fill your data to the grid.

    if you directly call the action, which returns JSON, you will sure get a json result, which is your "Strange" output.

提交回复
热议问题