-
25 Jul 2012 5:12 AM #1
Action Property for elements in Achitect?
Action Property for elements in Achitect?
Hi @all,
I just started with the new Achitect and love the MVC structure which is introduced with 4.1.
In your examples (MVC in depth) you use an action property and use this property in the controllers controlQuery. This property is perfect for defining special groups of elements for my controllers.
Is there a way i can use this concept with the Achitect? Is there an "free" property i can use for such a purpose?
(And i think this propertys are not listed in the doc right now).
Kind regards,
Christian
-
25 Jul 2012 5:42 AM #2
Actions?
Actions?
Is this the kind of thing you are asking about?
If it is I think in general, the best practice on this is to have the button event listened to out on your view, and then fire a more general command, then listen for that command in your controller. In this code example above there were 3 places I was wanting to hook up the 'deleteCommentCommand'. Is this what you are getting at?Code:this.control({ 'button[action=deleteComment]': { click: this.deleteComment } });
-
25 Jul 2012 6:10 AM #3
Yes, it is the right direction. My question is, where can i define [action=deleteComment] at the button in the Architect?
In my code editor i would use something like this:
But i can't do this in the Architect directly or can i? If not, is there some other way to achive the same result without dismissing the Architect completely?Code:xtype:'button', text: 'Send', action: 'deleteComment'
-
25 Jul 2012 8:05 AM #4
Action
Action
Go to the button in Architect. Go to the top of the Config explorer window. Type in action - click add. Add your action. Action isn't on the button cinfig but you can add it.
-
25 Jul 2012 1:23 PM #5
Thank you very much; it is exactly what i need. I didn't know i can add properties. Perfect
Thanks for the fast reply’s


Reply With Quote