You need to sign in to do that
Don't have an account?
JBirk
Vote Standard Label Error
When using the vote component on a VF page, I'm getting an error that $StandardLabel.voteButton.promote is not defined. Anyone know why this wouldn't be defined, since it's a StandardLabel and how to fix it?
We did figure out, sorry for not posting the solution earlier.
The label error is a red herring. Figured it out by comparing the apex debug logs to the native Idea pages, which worked fine, and the VF ones, which threw the error.
The problem is that if you don't set a rerender on the vote component, it will resubmit to your main controller. On our pages, we list out recent and popular ideas, and so the idea being voted on was being promoted/demoted at the same time the list was being generated. While I never got a real error message, my guess is that the idea was being updated at the same time the lists were being accessed.
Add an output panel around your vote component, slap an ID on it and set the rerender to that - and you should be fine.
All Answers
Me too! Hoping someone can help with this issue soon. I tried driving votes through a custom controller with no lock and found the same issue when resorting to the standard <apex:vote .../> component. Apparently Starbucks found a way to do this since they have a completely custom idea layout and permit voting on them as well.
Good luck!
Adam
We did figure out, sorry for not posting the solution earlier.
The label error is a red herring. Figured it out by comparing the apex debug logs to the native Idea pages, which worked fine, and the VF ones, which threw the error.
The problem is that if you don't set a rerender on the vote component, it will resubmit to your main controller. On our pages, we list out recent and popular ideas, and so the idea being voted on was being promoted/demoted at the same time the list was being generated. While I never got a real error message, my guess is that the idea was being updated at the same time the lists were being accessed.
Add an output panel around your vote component, slap an ID on it and set the rerender to that - and you should be fine.