2

I am having a visualforce page where i display a multi select picklist field. It's a InputField so the user can change the value of the field and then save it. The problem is that when i choosing nothing in the multi select picklist field and save it still gives me one value at the "Chosen" side. Any ideas why? by the way, with standard pick-list field i don't have this problem...

i have checked the "save" class in my controller and it seems that the problem is with the: pageRef.setRedirect(true) i use but without it i the page is not refreshing automatically after the saving... this is the full "save" class which i use:

public PageReference save() {
    update Pos;
    PageReference pageRef = new PageReference(ApexPages.currentPage().getUrl());
    pageRef.setRedirect(true);
    return pageRef;
}

Thx in advanced

1
  • I think we need to see more code to understand what's happening. However, first thing is that I would expect you to return a null PageReference from the save() method. Also, do you have a <apex:pagemessages /> tag that is being rerendered on your page? Commented Aug 30, 2014 at 7:31

1 Answer 1

1

Have you defined your Mult-Select picklist field with a default value?

enter image description here

Have you also tried returning 'null' from your action method?

1
  • No, i dont have a default value. As i wrote, the problem is with the "setRedirect" function which i need to for the page refresh. so, acctualy, my question is 1. why this function making this problem(non-null option in multyselect field)? it just seem to have no connection between the two.. 2. do i have other option for refreshing the vf page after saving? thx!
    – noam
    Commented Dec 3, 2013 at 20:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .