1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    9
    Vote Rating
    0
    dshupe@comcast.net is on a distinguished road

      0  

    Default Unanswered: How do you subclassAbstractStoreSelectionModel?

    Unanswered: How do you subclassAbstractStoreSelectionModel?


    could some one kindly give me an example of how to subclass AbstractStoreSelectionModel? The selection model in my gridpanel totally does not work, but I've read from the documentation that "DataBound UI widgets such as GridPanel, TreePanel, and ListView should subclass AbstractStoreSelectionModel and provide a way to binding to the component. The abstract methods onSelectChange and onLastFocusChanged should be implemented in these subclasses to update the UI widget."

    Many thanks in advance

    DS

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,592
    Answers
    541
    Vote Rating
    324
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Which framework is this for? I don't see a class called AbstractStoreSelectionModel in ExtJS 4.

  3. #3
    Sencha User
    Join Date
    Apr 2011
    Posts
    9
    Vote Rating
    0
    dshupe@comcast.net is on a distinguished road

      0  

    Default extjs4

    extjs4


    I found it at this link: http://dwim.hu/static/hdws/libraries...on.Model.html# . I just noticed this is for 4.0-beta2. However, almost the same text is in my 4.0.3 extjs4 documentation: @ Ext.Selection.Model :
    "Tracks what records are currently selected in a databound widget.

    This is an abstract class and is not meant to be directly used.
    DataBound UI widgets such as GridPanel, TreePanel, and ListView should subclass AbstractStoreSelectionModel and provide a way to binding to the component.
    The abstract methods onSelectChange and onLastFocusChanged should be implemented in these subclasses to update the UI widget."

  4. #4
    Sencha User
    Join Date
    Apr 2011
    Posts
    9
    Vote Rating
    0
    dshupe@comcast.net is on a distinguished road

      0  

    Default what I really want to know is

    what I really want to know is


    Why doesn't grid.getView(), grid.getSelectionModel(), etc. work in a gridpanel?

  5. #5
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,592
    Answers
    541
    Vote Rating
    324
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Please don't post unrelated questions in the same thread.

    Unless you're trying to do something unusual you don't need to subclass Ext.model.Selection. Generally you'd just use one of the existing subclasses. See the Sub Classes link at the top of the docs:

    http://docs.sencha.com/ext-js/4-0/#!...election.Model

    Why doesn't grid.getView(), grid.getSelectionModel(), etc. work in a gridpanel?
    They work fine, there must be a mistake in your code. It would be easier to help you if you posted a small code example of your problem. Make sure any code you post is surrounded with CODE tags (# button in the editor toolbar).

Thread Participants: 1

Tags for this Thread