• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

[HELPED] MVC Model/Store ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [HELPED] MVC Model/Store ?

    If you want to do the following in a store, can you still have a default action property in the Model? Or will the following put two actions on the proxy extraParams: ???

    Code:
        
    listeners: {
    		beforeload: function() {
    
    			var searchAction = Ext.ComponentQuery.query('#searchaction')[0];
    			if (searchAction) {
    				Ext.apply(this.getProxy().extraParams, {
    					action: searchAction.getValue()
    				});
    			}

  • #2
    It might work as you have, but I would suggest not including the default action, and always applying the action on your beforeload.

    You could check if that value is empty and apply the default action as needed.

    Comment

    Working...
    X