Migrating data from one select box to other.

2008-04-15 Thread Arpan Debroy
I have two select box. Suppose the initial values of the select boxes are as
follow  :-

s:select name = select1 list=#{'Mandatory':'Mandatory',
'Optional':'Optional', 'Critical':'Critical'} size=3/

s:select name = select2 list=#{'Mandatory':'Mandatory'} size=3/

There will be two button Add and Remove. So when user select  one
element of select1 and click Add button, the element should migrate to
the select2 box.
And the remove button will do the opposite.

Can anyone please tell me how to do that in struts2 or how to write the
javascript for that.

-- 
Thanks  Regards
Arpan Debroy


Re: Migrating data from one select box to other.

2008-04-15 Thread Arpan Debroy
Hi Ryan,
Thats lovely.. :)
But I don't want so many buttons.
I need only two button as Add and Remove.
How to do that?

On Tue, Apr 15, 2008 at 12:31 PM, Ryan [EMAIL PROTECTED] wrote:

 I believe these will help you out a bit:

 http://struts.apache.org/2.0.11/docs/optiontransferselect.html

 http://www.roseindia.net/struts/struts2/struts2uitags/optiontransferselect-tag.shtml

 Cheers!
 Ryan


 On Tue, Apr 15, 2008 at 1:54 AM, Arpan Debroy [EMAIL PROTECTED]
 wrote:

  I have two select box. Suppose the initial values of the select boxes
 are
  as
  follow  :-
 
  s:select name = select1 list=#{'Mandatory':'Mandatory',
  'Optional':'Optional', 'Critical':'Critical'} size=3/
 
  s:select name = select2 list=#{'Mandatory':'Mandatory'} size=3/
 
  There will be two button Add and Remove. So when user select  one
  element of select1 and click Add button, the element should migrate
 to
  the select2 box.
  And the remove button will do the opposite.
 
  Can anyone please tell me how to do that in struts2 or how to write the
  javascript for that.
 
  --
  Thanks  Regards
  Arpan Debroy
 




-- 
Thanks  Regards
Arpan Debroy


Re: Migrating data from one select box to other.

2008-04-15 Thread Ryan
I believe these will help you out a bit:

http://struts.apache.org/2.0.11/docs/optiontransferselect.html
http://www.roseindia.net/struts/struts2/struts2uitags/optiontransferselect-tag.shtml

Cheers!
Ryan


On Tue, Apr 15, 2008 at 1:54 AM, Arpan Debroy [EMAIL PROTECTED]
wrote:

 I have two select box. Suppose the initial values of the select boxes are
 as
 follow  :-

 s:select name = select1 list=#{'Mandatory':'Mandatory',
 'Optional':'Optional', 'Critical':'Critical'} size=3/

 s:select name = select2 list=#{'Mandatory':'Mandatory'} size=3/

 There will be two button Add and Remove. So when user select  one
 element of select1 and click Add button, the element should migrate to
 the select2 box.
 And the remove button will do the opposite.

 Can anyone please tell me how to do that in struts2 or how to write the
 javascript for that.

 --
 Thanks  Regards
 Arpan Debroy



Re: Migrating data from one select box to other.

2008-04-15 Thread Arpan Debroy
Thanks Ryan,

My purpose is done. There are lot of options to change the label of the
buttons and to remove them from the page also.

On Tue, Apr 15, 2008 at 12:55 PM, Arpan Debroy [EMAIL PROTECTED]
wrote:

 Hi Ryan,
 Thats lovely.. :)
 But I don't want so many buttons.
 I need only two button as Add and Remove.
 How to do that?


 On Tue, Apr 15, 2008 at 12:31 PM, Ryan [EMAIL PROTECTED] wrote:

  I believe these will help you out a bit:
 
  http://struts.apache.org/2.0.11/docs/optiontransferselect.html
 
  http://www.roseindia.net/struts/struts2/struts2uitags/optiontransferselect-tag.shtml
 
  Cheers!
  Ryan
 
 
  On Tue, Apr 15, 2008 at 1:54 AM, Arpan Debroy [EMAIL PROTECTED]
  wrote:
 
   I have two select box. Suppose the initial values of the select boxes
  are
   as
   follow  :-
  
   s:select name = select1 list=#{'Mandatory':'Mandatory',
   'Optional':'Optional', 'Critical':'Critical'} size=3/
  
   s:select name = select2 list=#{'Mandatory':'Mandatory'}
  size=3/
  
   There will be two button Add and Remove. So when user select  one
   element of select1 and click Add button, the element should
  migrate to
   the select2 box.
   And the remove button will do the opposite.
  
   Can anyone please tell me how to do that in struts2 or how to write
  the
   javascript for that.
  
   --
   Thanks  Regards
   Arpan Debroy
  
 



 --
 Thanks  Regards
 Arpan Debroy




-- 
Thanks  Regards
Arpan Debroy