function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Yoshinori MoriYoshinori Mori 

selectlist(multiselect) on the visual force page

I want to get same component of selectlist(multiselext) on visual force page.

Like selecting multiple items in the left box and press add button and they move to box on the right.

I know it is possible to get it by changing data type of object from text to select list(multiselect) and by writing inputfield in Vusual force and some additional code in Cotroller as well.

But I don't want to change data type of existing object.

I appreciate if you could provide some sample code for Controller and VF.

 

I already got check boxes section  on the page above.

I need to select items from there and need to show the items in the left box below.

Then I want what I described above.

 

Thanks

Mori

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

There's a really nice example of a VF multi-select picklist in the Visualforce Developer's Guide - take a look at the Advanced Example in the Dynamic Bindings section on page 131.  The image on page 134 looks very much like what you have described.  It will need some tweaking, but the principle should be sound.

 

All Answers

Afzal MohammadAfzal Mohammad

You may add an extra field and make it a multiselect picklist and use it on your vf page. And while saving, copy its selected values to your existing field. This way you will avoid lot of custom code and will save lot of time.

 

Hope that helps.

 

Afzal

bob_buzzardbob_buzzard

There's a really nice example of a VF multi-select picklist in the Visualforce Developer's Guide - take a look at the Advanced Example in the Dynamic Bindings section on page 131.  The image on page 134 looks very much like what you have described.  It will need some tweaking, but the principle should be sound.

 

This was selected as the best answer
Yoshinori MoriYoshinori Mori

Dear bob_buzzard

 

Thanks a million!

I referenced to the document.

It works.

 

Mori