+ Start a Discussion
Venkatramanan LakshmananVenkatramanan Lakshmanan 

<apex:vote> component behaviour in pagination

Hi all

I have a custom VF page to list the Ideas. I have included pagination to display 5 ideas per page. I have used <apex:vote> component to display the promote/demote details.

The issue is, the first time the page is displayed, the vote component is bindied properly. Once we hit the 'Next Page' link, the vote component remains the same as the first page irrespective of the current idea status. I have displayed the associated Idea id to make sure that new ids are bindied and it is.

Is this a Salesforce VF issue or Is there any set up that needs to be done to refresh the VF vote correctly? Can somebody point us in the right direction to resolve this issue?

Gaurav NirwalGaurav Nirwal
if (!empty($this->data['users']['gender'])) {
        $conditions['gender'] = $this->data['users']['gender'];
    if (!empty($this->data['users']['country_id'])) {
        $conditions['city_id'] = 
                    'conditions' => array(
                        'country_id' => $this->data['users']['country_id']), 
                    'fields' => 'City.id'));
    if (!empty($this->data['users']['city_id'])) {
        if($this->data['users']['city_id'] == 'NULL') {
            $conditions['city_id IS ?'] = NULL;
        } else {
            $conditions['city_id'] = $this->data['users']['city_id'];

    $options = array(
        'limit' => 20,
        'order' => 'User.lastname ASC',
        'conditions' => $conditions);
    $this->paginate = $options;
    $users = $this->paginate('User');

As you can see, I use the paginate() function within the controller. I still don't understand why it's working for the gender filter and not the rest
Andrei KuznetsovAndrei Kuznetsov
I'm having exactly the same problem. Have you solved it? If not, myself I'm going to contact SF, since the problem is apex:vote component.