Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8452733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:34:38+00:00 2026-06-10T11:34:38+00:00

A widgets can or not be on a controller view, and some of widget

  • 0

A widgets can or not be on a controller view, and some of widget affecting listView.

I have stalled on a afterAjaxUpdate JS event in CListView. The widget – is a product filter, which updating the list view. My problem is when I want to update my filters after update list view.
Of course I can configure update code in List View, but I think is wrong, because this behaviors belongs to filter widget.

I tried this in widget

$("#' . $this->listViewId . '").yiiListView.settings.afterAjaxUpdate = function(id, data) {
    console.log(id, data);
};

But ListView js going below and obviously it’s a bad solution.

I thinking about some public widget events, so I can address to listview widget through filter widget and put event there.

Maybe someone has faced with related problems or have better ideas?
Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:34:40+00:00Added an answer on June 10, 2026 at 11:34 am

    Try this way to add afterAjaxUpdate method for your CListView.

    <?php 
    Yii::app()->clientScript->registerScript('handle_ajax_function', "
    function addLoadingClass(id,result)
    {
        $('.list-view-loading').show();
        $('li.previous').addClass('disable');
        $('li.next').addClass('disable');   
    }
    function removeLoadingClass(id,result)
    {   
        $('li.previous').removeClass('disable');
        $('li.next').removeClass('disable');    
        try{
            $('.list-view-loading').hide(); 
        }catch(e){
            alert(e);
        }
    }
    ");
    ?>
    
    <?php
    $this->widget('zii.widgets.CListView', array(
                'id'=>'handle',
                //'ajaxUpdate'=>false,
                'dataProvider'=>$data,
                'beforeAjaxUpdate'=>'addLoadingClass',
                'afterAjaxUpdate'=>'removeLoadingClass',
                'itemView'=>'myview',           
        )); 
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I keep getting an error saying that @android:style/Widget.Holo.Light.Button.Borderless is not public and so can't
I have two widgets that can be checked, and a numeric entry field that
As you can see in the Form Widgets section, I don't have a EditText
I store user editable articles in a database. Users can insert some simple widgets
I have a side panel like widget in my app that can be swiped
Dojo custom widgets can be internationalized via the _templated mixin following the steps outlined
Possible Duplicate: How can I add resizable widgets in Qt Creator? I am using
Why can't I do this? from django import forms from django.forms import widgets class
As the titles state, I can't drag widgets onto the screen. Attempting to do
I am working on a home screen widget. I hope this widget can support

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.