Search code examples
jspjsp-tagsjmesa

Jmesa table page navigation


I am new to Jmesa and am trying to use it on my jsp page. I use exactly same JSP and controller code as the example on http://code.google.com/p/jmesa/wiki/JSPTagExample .

The table shows up and looks fine. The problem is non of the buttons on the toolbar are working. E.g. page navigation arrows, etc.

What might be wrong with my code( As I said it is exactly same as the example). Should I add extra code for page navigation?

Thanks, Sara.

Update: I found out what the problem is, after I enter toolbar buttons it routes to

"localhost:8080/portal/projectTag.run?maxRows=4&projectTag_tr_=true&projectTag_p_=1&projectTag_mr_=4"

"Instead of "localhost:8080/portal/page/projects/projectTag.run?maxRows=4&projectTag_tr_=true&projectTag_p_=1&projectTag_mr_=4"

So it doesn't include the "/page/projects" in the url. How can I add that?


Solution

  • As I mentioned the problem was with the url routing.

    I just added /page/projects/ to the the script on the jsp page.

    "location.href = '${pageContext.request.contextPath}/page/projects/tag.run?' + parameterString;"

    I just realized that it wasn't the only problem the js imports in your jsp page should follow a certain flow. Don't forget that.

    It now works perfectly fine.

    Thanks, Sara.