I want to use jQuery sortable widget on the list.The problem is it will only work for the first list item, since the others are loaded dinamically.
How would I make it work for all of them? This is the sortable widget http://jqueryui.com/sortable/
This would be the code snippet for the widget.Somehow I need to call it after the whole list has completed loading.
Can it be done? Any jQuery gurus around here? Any ideea will be highly apreciated.Thanks!
Stamin Adrian wrote:The problem is it will only work for the first list item, since the others are loaded dinamically.
Please read this article to understand how JSP operates.
The actual problem is that your HTML is invalid. To see the HTML that jQuery is dealing with, you can do a View Source in the browser, or open up the debugger in the browser.
If you do, you will see that you have multiple elements with the same id value. That is not valid. Any id value in an HTML page must be unique to one, and only one, element.
Stamin Adrian wrote:I will learn jsf after this
Who said anything about JSF? you should be using JSTL and EL in your JSP pages. JSF is a completely different framework (and not one of which I am a fan).
Stamin Adrian wrote:Do you know any sources from where I can learn modern jsp or jsf for that matter?
Ignore JSF until much much later (if at all). For JSP, the Head First Servlets and JSP book is popular.