The following is the example of jsp page that show the filtering select in the page:
The piece of code is placed at a jsp file called "menu.jsp" and as you can see from the above code, there is a parameter called "id" and that is what it is gonna use to assign all your data that will retrieve from the database. Don't forget to import the javascript to the main jsp file. For example, I will call my javascripts as the filteringSelectLoad.js and this is how I import to the main jsp page:
The following is the javascripts that did the job or passing and getting data from the back end.
Well, as you can see from the code for MenuManager.getMenu(menu, populateMenu), the MenuManager is where you got to declare @ the dwr.xml. Once you got retrieve the data with dwr and pass back to the front end. Basically, that is all did the job of retrieving and display data in the filtering select. If you wish to know how to retrive data with dwr, you may want to check out :http://tinyurl.com/n9ezrb
Hope this help!
-Kay Nny-
No comments:
Post a Comment