-
10 Feb 2012 8:37 AM #1
Trigger field - triggerclick is not exposed by API so controllers cant catch it
Trigger field - triggerclick is not exposed by API so controllers cant catch it
Hi.
I finally have some spare time so I can play a little with Designer.
I'm trying to replicate some of my hand-crafted views with Designer but first problem is that I cant use ux's SearchField which I use a lot. I could use trigger field instead (SearchField is based on it after all) but "triggerclick" event isnt exposed (well, doesn't exists at all). So trigger field is, for now, useless.
So, how I should solve this?
BTW, "triggerclick" or "triggerNclick" (trigger1click, trigger2click, etc.) should be exposed in trigger field so we can use such field in MVC applications out of the box.
When we will have custom components support in Designer?
Else, ability to override methods of promoted components to classes? For now we can add event code to the components so I guess the support for overriding / adding new methods is almost there. Something like the ability to add new custom properties. With this feature we could at least extend existing components which is, I guess, what almost everybody needs.
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!
-
10 Feb 2012 9:01 AM #2
It seems that basic funtion can only be added to top level containers.
How difficult could be to allow basic functions on components promoted to classes?
An special build with this?
Lets concern about usability later (ex: "override method wizard" or check correct override structure, etc.)
Please, make my weekend a Designer's weekend!
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!
-
15 Feb 2012 9:19 AM #3
bump.
No body else using trigger fields?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!
-
16 Feb 2012 12:58 PM #4
Did you found answer how to use trigger field in mvc controller?
-
16 Feb 2012 1:34 PM #5
Using triggerfield in controller is easy.
Create your own trigger which exposes triggerclickevent, this is mine:
Just use in your views and controllers. For example:Code:Ext.define("pp.lib.component.TriggerFieldClick", { extend : "Ext.form.field.Trigger", alias : "widget.triggerfieldclick", enableKeyEvents : true, listeners : { keyup : function(f, e) { if (f.hideTrigger) { return; } var key = e.getKey(); if (key == e.ENTER || (key == e.SPACE && !f.editable)) { f.fireEvent("triggerclick", f, e); } } }, afterRender : function() { var me = this, body = me.bodyEl; me.callParent(); me.mon(body, "dblclick", me.onDblClick, me); }, onTriggerClick : function(e) { var me = this; if (!me.hideTrigger) { me.fireEvent("triggerclick", me, e); } }, onDblClick : function(e) { var me = this; if (!me.hideTrigger) { me.fireEvent("triggerclick", me, e); } } });
Problem is that you cant do this with Designer.Code:init : function() { this.control( "empeditar [name=grupoNombre]" : { triggerclick : this.buscarGrupo }, ...
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!
-
16 Feb 2012 3:05 PM #6
The approach you outlined above would work fine in designer. THere is one enhancement that we need to make that will allow you to complete that workflow. That is the ability to type in your own custom event names and not require that the user pick something that is from the targetType.
Aaron Conran
@aconran
Sencha Architect Development Team
-
18 Feb 2012 9:20 AM #7
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!
-
24 Feb 2012 12:28 PM #8
Bump:
- User events
- Inherited methods override including initComponent() .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!
-
24 Feb 2012 1:17 PM #9
We're aware of the need and working on a solution.
Aaron Conran
@aconran
Sencha Architect Development Team
-
24 Feb 2012 2:34 PM #10
I'm aware of that.
I just played with SD and didn't started anything for real because that.
That functionallity is a must because I need my own components which aren't to sophisticated but really usefull. For example, ExtJS haves a DisplayField but there is no way to format shown data so I extended it to show booleans, numeric and date data with formatting. I also use a lotTriggerFieldClick I posted before.
I guess other advanced users are hitting this limitations (may be I'm wrong).
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!


Reply With Quote