• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Move option between two selectManyListbox using javascript

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Saloon Keeper
Posts: 28123
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 28123
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Every plan is a little cooler if you have a blimp. And a tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic