1

I have used the below component and please guide me how to create the onchange event attribute.

Code gets from : https://developer.salesforce.com/blogs/developer-relations/2012/06/a-multiselect-picklist-visualforce-component.html

1
  • I'm a bit confused, the code you've posted doesn't seem to show what you've attempted to do to try and implement this feature as per your previous post I responded in which I ultiimately recommended you repost with your full code for further review. Part of this needs to be done in the controller and your code doesn't reflect that. Alex, you need to show the effort you've made to solve this yourself so others can give you further guidance.
    – crmprogdev
    Apr 1, 2015 at 13:44

2 Answers 2

1

Get the parent id for component and assign the blank value for each component.

e.g :

 if( listBox.options.length > 1 & listBox.options[0].value == '--NONE--'){
          listBox.options.remove(0);
          //listBox.options.add(0);
        }
1

update the following line of code... (37). you need to check with size of the list and also add the same panel in this line(75)

<apex:outputPanel rendered="{!IF(leftOptions.size == 0, true, false)}">
               <option value="" disabled="true" id="rightNone">--NONE--</option>
              </apex:outputPanel>

I hope this will help you...

1
  • I saw it along with that you'd received the answer above to your question. I don't know that I have anything helpful to add at the moment. Will review it again and comment if I see something worth noting. Issue appears to be that you want it to be dynamic when you refresh. There are others here who are much better at coding VF than I am.
    – crmprogdev
    Mar 31, 2015 at 18:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.