Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 51

Thread: Various data store and form extensions.

  1. #21

    Default Live demo - TreeComboBox

    Anyone that wants a live demo for any of the other things in my svn repo, just let me know, I can build those easily now.

    Galdaka: I have put put a live demo of the TreeComboBox at:

    http://splashnetworks.net/demos/treecombo.html

    Attiato: To create a load mask you'll need to do it by hand. You can create a load mask on any data store with the following:

    Code:
    var mask = new Ext.LoadMask( treeCombo.innerList, { store: treeCombo.store });
    I don't really understand your second sentence, but as far as a timeout goes. HttpProxy uses Ext.Ajax so if you could use:

    Code:
    Ext.Ajax.timeout = 10000;
    That is in ms (10000 = 10sec), the default is 30000 (30sec).

    Let me know if that answered your question.

  2. #22

    Join Date
    Aug 2007
    Location
    Romania
    Posts
    41

    Default

    curzonj:

    Can you give me some more code for the loadMask? where to put
    PHP Code:
    var mask = new Ext.LoadMasktreeCombo.innerList, { storetreeCombo.store }); 
    in the tree_combo.js file, other file, or my own, where i declare the store?
    My code has something like this:
    PHP Code:
    var pStore = new Ext.data.JsonStore({
          
    url"../groups",
          
    id'id',
          
    root'rows',
          
    fields: [ 'id''text''parent_id' ]
        });

        
    pStore.on('loadexception', function() {
          
    alert('error'); 
        });

    var 
    parentGroup = new Ext.ux.TreeComboBox({
            
    fieldLabel'Parent Group',
            
    hiddenName'parent_id',
            
    dataIndex'text',
            
    storepStore,
            
    nodes: { textField'text' },
            
    displayField'text',
            
    valueField'id',
            
    allowBlanktrue,
            
    resizabletrue,
            
    rootVisible:true,
            
    name'groupName',
            
    triggerAction:'all',
            
    anchor'70%'  
        
    }); 

  3. #23

    Default

    I looked at the code more closely and it will take more work that what I told you. Be aware, I have not tried this so you may have to work through some issues on your own. Because the innerList is created dynamically on focus, there are no events that fire in between the innerList being created and in being shown. So you'll have to override the initList method. I have modified your code as I think it should be:

    Code:
    var parentGroup = new Ext.ux.TreeComboBox({
            fieldLabel: 'Parent Group',
            hiddenName: 'parent_id',
            dataIndex: 'text',
            store: pStore,
            nodes: { textField: 'text' },
            displayField: 'text',
            valueField: 'id',
            allowBlank: true,
            resizable: true,
            rootVisible:true,
            name: 'groupName',
            triggerAction:'all',
            anchor: '70%',
            initList: function() {
              Ext.ux.TreeComboBox.prototype.call(this);
          this.loadMask = new Ext.LoadMask(
                this.innerList,
                {
                  store: pStore
                }
              );
          /* The reason for this code is that
                 the load mask functions via an on('load', ...)
             event listener and I assume that when
                 the combo box list is being shown, you
             have already called store.load()
              */
          if(this.store.proxy.activeRequest) {
                this.loadMask.show();
              }
            }
        });
    Be aware that I have used the loadMask in similar situations where I had to trigger it manually, but it was a bit unpredictable. There may not be a reliable way to use the loadMask in this situation.

  4. #24
    Touch Premium Member
    Join Date
    Jun 2007
    Posts
    22

    Default

    Will the TreeComboBox support multiple selections in the tree?

  5. #25

    Default

    Quote Originally Posted by mujahid View Post
    Will the TreeComboBox support multiple selections in the tree?
    Not really. Like the combobox it is designed to support many single-selection features that don't work with multiselect.

    DDBulkMultiselect might work for you. It is two trees next to each other. One is the selected items and one is the unselected. Right now it doesn't do nesting of objects (just a list using the tree widget), but that is only because I haven't implemented it yet. You just drag and drop items from one tree to another and then the widget saves a csv of the idField values to a hidden field.

  6. #26
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    NL
    Posts
    608

    Default

    I see that you created a extbugfixes file. Are these fixes still valid or already solved in the Ext trunk svn version?

    Thanks

    Marco

  7. #27

    Default

    Quote Originally Posted by mdissel View Post
    I see that you created a extbugfixes file. Are these fixes still valid or already solved in the Ext trunk svn version?

    Thanks

    Marco
    I don't know. As far as I understand only premium members have access to the svn version. They are valid against the 2.0-final and I haven't reported them to anyone. Originally I had some real bugs in there, but they got fixed in 2.0 final. The remaining items are a bit subjective whether they are bugs or not, so I don't worry about submitting them.

  8. #28

    Question Trouble getting a CrudGridPanel

    Could you post some working examples/demos of the CrudGridPanel? I've been trying (from the examples you've already posted) for a couple of days but still can get it to work. I keep getting errors about the store.

    Thanks in advance

  9. #29

    Default

    The grid panel uses a set of enhancements on the store that are in the SWorks.CrudStore class. It is a subclass of GroupingStore, but it's internal code behaves like JsonStore as far as creating the proxy and reader. I can fix to to allow you to pass in your own reader and/or proxy, I just haven't needed to. You can read the code for both in crud_components.js, it should be pretty straight forward.

    Code:
      var myStore = new SWorks.CrudStore({
        .... (Normal JsonStore stuff), 
        fields: [ 'description', .... ]
      });
      var myGrid = new SWorks.CrudGridPanel({
        title: "Widgets",
        store: myStore,
        columns: [
          {header: 'Description', dataIndex: 'description'}
        ]
      });
    That is obviously the bare minimum and without the CrudEditor config normally passed in on the "editor" property. Maybe the best thing would be for you to post your code and what errors you are getting and I could tell you where to go from there. Unfortunately, my code still has a large number of assumptions that need to get worked out.

  10. #30

    Default

    Thanks for answering so soon.
    In my previous attempts I was using a regular Store, and got a "this.store has no properties" error.
    As you suggested, I tried to get a minimal example to work, but still get "has no properties" related errors. In this particular case:

    "SWorks.CurrentUser has no properties"

    Crud_Components.js Line 154:
    SWorks.CurrentUser.onPermission(this.store.rwPerm, this.checkToolbarButtons, this);

    Code:
    Ext.onReady(function() {
    
      var storex = new SWorks.CrudStore({
          url: 'json.data',
          id: 'name',
          root: 'rows',
          fields: [name]
        });
    
      var myGrid = new SWorks.CrudGridPanel({
        title: "Simplest",
        store: storex,
        columns: [
          {header: 'Name', dataIndex: 'name'}
        ]
      });

Page 3 of 6 FirstFirst 12345 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •