[CLOSED] ConfigItem Listener

  1. #1

    [CLOSED] ConfigItem Listener

    Hello!

    Is it possible to configure listener for a configuration item's change event?

    For example, below is a sample custom configuration for a grid panel. I want to perform a spesific task on filterID value change. Is it possible? If not, can you suggest an alternative way for such a requirement? May be using an ext:hidden object?

    Thanks.
                                                        <CustomConfig>
                                                            <ext:ConfigItem Name="filterID" Mode="Raw" Value="0" Encode="false">                                                            
                                                            </ext:ConfigItem>                                                        
                                                        </CustomConfig>
    Last edited by Daniil; Apr 02, 2013 at 4:08 AM. Reason: [CLOSED]
  2. #2
    Hi @bayoglu,

    You can define the setFilterId function for the GridPanel and change the filterID property only via this method.

    Within the setFilterId function you can do required actions.
  3. #3
    Hi Daniil!

    How exactly can I define a function for grid? You mean defining function as a config item? Could you please post a sample markup?
    Well, I need this functionality to filter grid store from listeners of other objects in the page as a non-blocking thread. I tried to make it clear below:
    Grid1: which I am trying to set filterId configuration.
    Grid2: on row select event, I want to filter Grid1's store.
    What I need to do is, in Grid2's row select handler, I just want to set Grid1's filterId and finish its work. Grid2's store will be filtered in another thread. Is implementing your suggestion suitable for this requirement?

    Note: The overall idea is, If you remember the long time taking event in row select listener causing un-intended "flying(;" of drag text we discussed here: , I am trying to get this long time taking task out of row select handler.

    Thanks.
  4. #4
    Quote Originally Posted by bayoglu View Post
    How exactly can I define a function for grid? You mean defining function as a config item? Could you please post a sample markup?
    Yes, I meant a ConfigItem.
    <CustomConfig>
        <ext:ConfigItem 
            Name="setFilterId" 
            Value="function (filterId) { this.filterId = filterId; /* some staff */ }" 
            Mode="Raw" />
    </CustomConfig>
    Quote Originally Posted by bayoglu View Post
    Well, I need this functionality to filter grid store from listeners of other objects in the page as a non-blocking thread. I tried to make it clear below:
    Grid1: which I am trying to set filterId configuration.
    Grid2: on row select event, I want to filter Grid1's store.
    What I need to do is, in Grid2's row select handler, I just want to set Grid1's filterId and finish its work. Grid2's store will be filtered in another thread. Is implementing your suggestion suitable for this requirement?
    Well, there is no multithreading in JavaScript. Anyway, the actions will be executed on row select. I don't think there is no better way (if any) than setting up a Delay for a Select listener.

    Quote Originally Posted by bayoglu View Post
    Note: The overall idea is, If you remember the long time taking event in row select listener causing un-intended "flying(;" of drag text we discussed here: , I am trying to get this long time taking task out of row select handler.
    There are some posts in the thread which you have not answered.

Similar Threads

  1. Replies: 7
    Last Post: Jun 15, 2011, 7:34 PM
  2. passing configitem value into listener
    By norphos in forum 1.x Help
    Replies: 2
    Last Post: May 10, 2011, 1:47 PM
  3. Add click listener
    By DavidS in forum 1.x Help
    Replies: 0
    Last Post: Nov 15, 2010, 7:16 AM
  4. Listener & Events
    By kumarxlnt in forum 1.x Help
    Replies: 2
    Last Post: Sep 17, 2009, 3:11 AM
  5. Replies: 1
    Last Post: Oct 07, 2008, 2:44 PM

Posting Permissions