javascript - unable to get parent reference in sencha touch when calling function is in html attribute -


I need to create a common method in the controller of the power touch so that other similar modules in the application can get those pieces . But now I'm stuck because I'm not seeing my solution (even after trying 100 times on Google) the thing is that the calling function is in the 'html' attribute, and now we have its original context In order to refer to all other siblings, take a look at the code below:

  & lt; Ext.form.IFieldSet & gt; {// This only shows if the existing data is under "Other Income": 'Field', Title: 'Other Income', Item ID: 'Other IncomeFest', // Instruction: '& lt; HR class = "different" /> ', Items: [& lt; Ext.field.ISelect & gt; {Xtype: 'selectfield', name: 'BorrowerPositionFirstSet', label: 'Borrower Position', Store: 'BorrowerPositionSelectorStore', // UsePicker: incorrect, disabled: true,}, & lt; Ext.field.ISelect & gt; {Xtype: 'selectfield', name: 'I type typeist', label: 'type of income', store: 'iTiveActiveStoreStore', // usagePicker: wrong, disabled: true,}, {xtype: 'textfield', name: 'DescriptionFirstset' label: 'monthly amount', disabled: true,}, & lt; Ext.form.ifild & gt; {Xtype: 'description', disabled: true,}, {xtype: 'numberfield', name: 'monthly statement floorSat', label: 'field', label: '', // This is the HTML feature of which I talk about I am ... html: '& lt; A href = "#" onclick = "event.preventDefault (); App.app.getController (\ 'Lead.leadsListController'). OnClickDelete (this)" class = "ta-textlink deleteLink" & gt; Remove & lt; / A & gt; & Lt; A href = "#" onclick = "event.prevent default (); App.app.getController (\ 'Lead.leadsListController \') onClickEdit (this)" class = "ta-textlink editLink" & gt; Edit & lt; / A & gt; '}]   

As you can see that the calling functions are inside HTML and I do not want to use' Parent node '(which is pure JavaScript) because I had to do something This:

  var parentRef = (ref.parentNode.parentNode.parentNode .....);   

And you can see that this is just nonsense! Please help Sencha developers to get the solution for this. How can I get reference Item ID: 'Other InInfoFirstSet' through my children?

Why do not you use a button (or two) for it? Sounds like a little CSS and the button will be trick. Apart from this you can actually use it inside your controller. Fieldsets do not mean that you can not use buttons.

Hint: Never try to call an administrator out from the outside.

If you actually use field and one click event, use the following code (Do not forget, this is not my priority, because it can be well written in ST with two buttons!) :

  & lt; Ext.form IField & gt; {Xtype: 'field', label: '', // This is the html attribute I'm talking about ... html: '& lt; A href = "#" onclick = "event.preventDefault (); ' + 'Extension' ('form') fireEvent ('Delete') '+ //   

and inside the controller

  config: {refs: {myView: '.myView', // the original view that you have created: ' .myview .form '}, Control: {form: {delete:' onDelete ', // & lt; & Lt; & Lt; & Lt; Here you edit the event: 'onEdit'}}}, onDelete: function () {}, onEdit: function () {}    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -