-
15 Mar 2013 7:57 AM #1
Need Help With Better Way to do "Convert to Action"
Need Help With Better Way to do "Convert to Action"
The scenario I think I've been doing poorly is for adding things like click events to controllers. My scenario is this: I put a panel on a viewport, on that panel I put a toolbar, on the toolbar I put a button, on that button I put a click event.
Now, if I don't put an id with the click event and try to "Convert to Action" I get an error because the component query seems not to be full formed.
What is the recommended way to do this and get a correct component query that is best practice for production?
sa1.jpg
-
15 Mar 2013 1:14 PM #2
We can't reliably predict a controlQuery that will work in all situations.
In the event that you set an id or itemId, we will use that for the controlQuery.
In terms of best practices I would say use an itemId and ensure that they are unique across the container. You can also add an additional property like action: 'Save'
and then use a controlQuery like 'button[action=Save]'Aaron Conran
@aconran
Sencha Architect Development Team


Reply With Quote