-
28 Mar 2012 8:07 AM #1
Sencha Touch 2 Controller control
Sencha Touch 2 Controller control
Hi,
I'm tryin the new Designer to generate a Sencha Touch 2 app ...
So I've created a controller in Designer and also added a ref. But now I want to add a "control" , but I don't know where to do it in Designer ... So want this generated (the control part):
any help?Code:config: { refs: { sliderRange: '#mysliderfield' } }, control : { sliderRange : { change : "onSliderChange" } }
-
28 Mar 2012 8:12 AM #2
Thats isn't the SD's way.
Use controller action component.
Regards.UI: Sencha Architect 2.x / ExtJS 4 MVC
Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
Application Server: Glassfish 3.1.x
Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5
If you like my answer please vote!
-
28 Mar 2012 8:39 AM #3
uhm .. okey?
So I click on the controller in SD , I try to add an Action (clicked the plus icon) , then a selectbox appears with a text "Please choose an eventname by name" , but this is empty?
-
28 Mar 2012 9:14 AM #4
Nope.
(1) D&D a "Controller Action" from toolbox then (2) fill targetType (I'm guessing is a Ext.field.Slider because the itemId you give in "refs"), (3) name (select "change"), (4) controlQuery ("#mysliderfield"), (5) give to the function whatever name you want (by default SD will set "onSliderfieldChange") then finally (6) wrote the code:
x1.jpgUI: Sencha Architect 2.x / ExtJS 4 MVC
Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
Application Server: Glassfish 3.1.x
Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5
If you like my answer please vote!
-
28 Mar 2012 9:20 AM #5
Thanks for the help ssamayoa.
This is the correct workflow. Note that this will be drastically improving (much more intuitive) in the coming builds.Aaron Conran
@aconran
Sencha Architect Development Team
-
28 Mar 2012 2:00 PM #6


Reply With Quote