It was a very odd thing and was easily fixed by changing to selectOptions which is what I needed instead of checkboxes anyway. I am hoping that I had some sort of error in my code that caused the issue, I am sure that others have used selectCheckboxes just fine before.
My guess is that some sort of syntactical error that Eclipse didn't catch is what caused the issue, however since it is gone now I do not plan on digging further into the matter.
3 comments:
I ran into this problem and found your post. Here's what I found:
1) apex:selectCheckboxes returns a *list* of strings, which no database field (like multi-select) will accept in its raw form. If this component is assigning a value to an object field, it will throw an error.
2) By using the apex:selectCheckboxes component, the on-screen error you usually get with apex:inputField is not included. So you have to add an apex:message component to reveal and confirm the problem.
The solution is to use a custom variable in the controller that accepts List and then (if needed) translate that value to an appropriate format during the submit.
That is great information, thank-you for sharing. I will have to try that out the next time I am working in SalesForce.
Post a Comment