File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Move option between two selectManyListbox using javascript

 
earist neko
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two selectManyListbox moving options from Left to Right / Right to Left which i am doing in Javascript and it is working fine.

But when i click submit button error is occured.

error:




JSP Page (Role editor page):




Javascript code :




Bean:






I don't wnat to change my backing bean to session scope.
My jsp page show all rolebean object in containment tree. When click the role, Two SelectManyListbox will be shown on Role editor page.
Listbox on left show all roles that the clicked role can use (call getItemLeft ()) and Listbox on right show all used roles of the clicked role (call getItemRight()).
Options can be moved between two listboxes. When Role editor page is refreshed (by click role in containment tree, refresh page etc.) , the options in listboxes are reverted and call getItemLeft ()/getItemRight () again.

Any idea?
Thank in advance and sorry for my bad english.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17622
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF tends to force you to use session scope in places where you otherwise could get away without it because of its extensive use of postbacks. The problem is so bad, in fact, that JSF2 added the View scope in order to provide a shorter-term storage alternative.

However, the type of UI you are describing is already available pre-debugged and ready to use as a single component in some of the advanced JSF extension tagsets such as RichFaces.
 
earist neko
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now, i'm using ICEfaces 1.8.0
I want to implement UI look like duallist of ICEFaces or picklist of RichFaces.
But i want some items are directly added to both left and right list when page loaded.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17622
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
earist neko wrote:Now, i'm using ICEfaces 1.8.0
I want to implement UI look like duallist of ICEFaces or picklist of RichFaces.
But i want some items are directly added to both left and right list when page loaded.


That actually doesn't make sense, since you explicitly said you wanted to move stuff, and how do you move it if it's already there?

If the normal shuttle control functionality isn't what you want, you're on your own. But if you want to do that using JavaScript, JSF doesn't really factor into the process. JSF doesn't make much difference other than the fact that the ids for the raw HTML controls are a bit different. Your main problems are going to be JavaScript problems, and we have a forum where the JavaScript experts hang out.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic