21 May 2014 4:56 AM #1
Trying out my first aux - Form Field Mask
Because Architect crash hard the canvas by ignoring Resources, I'm trying to convert my Field Masking plugin into a Architect User Extension.
(Canvas issue and plugin usage here: http://www.sencha.com/forum/showthre...se-of-a-plugin)
The problem right now is that the blog post "Building a User Extension part 2" and the Docs, just say about aux carring view components, it say nothing about ExtJs plugins.
So, it is a plugin. It needs to be called within a form field in the plugin config option.
How do I do that?
The aux I have till now is attached here (renamed to zip so it can be attached).
But it shows itself inside Architect as a component to be added to a view and not a plugin to be added to a component. It's probably just some stuff in the package.json or Definition.js, but I don't know what.
I hope this aux will be very useful for other people when the package is working right, cuz there is nothing similar in the sencha marketplace.
Thank you for any help.LAMPE (Linux / Apache / MySQL / PHP / ExtJs)
21 May 2014 4:24 PM #2
I have a similar plugin, is designed for fields, not for Panels, the docs from Architect says (see this link) for definition file:
Array of valid parent types (use strings corresponding to xtype) for this object; if any types are listed here, this component will only be allowed to be dropped onto components matching one of the types in this list
Array of valid child types for this object; if any components are listed here, they are the only types of components that can be children to this component
So I set validParentTypes to "textfield", but still can't attach to this kind of component.
Maybe is some limitation with Architect, folks from Sencha: any advice?
22 May 2014 9:49 AM #3
sorry it took some time to respond here, ethraza -- it appears what you need to do is update your component to extend Ext.AbstractPlugin and then it works in Architect and doesn't crash anything. If you need the functionality of Ext.util.Observable - you can always include that as a mixin.Steve Sobel
Sencha Architect Development Team
22 May 2014 9:51 AM #4
22 May 2014 1:43 PM #5
For now we are just setting textfield using xtype, here the sample:
"helpText": "<b>Ext.ux.form.field.ClearButton</b><br>Plugin for text components that shows a clear button over the text field. When the button is clicked the text field is set empty. Works with Ext.form.field.Text, Ext.form.field.TextArea, Ext.form.field.ComboBox and Ext.form.field.Date.",
"name": "Clear Button Plugin",
"category": "Form Fields",
This plugin is base on extension Ext.ux.form.field.ClearButton by Fortis IT Services GmbH
Here's the complete zip file for the plugin, just unzip this on your extensions directory (configure on Architect) to test.
23 May 2014 4:01 AM #6
Ext.AbstractPlugin didn't work to my aux as well.LAMPE (Linux / Apache / MySQL / PHP / ExtJs)