Sencha Touch 2 Field Focus - extjs4

Does anyone know the Sencha Touch 2 equivalent of ExtJS4's:
form.getForm().findField("myfield");
Thanks.

use form.getValues(); assuming you can get the form element... if you needs to do that use refs... on my mobile rigjt now, i can post more sample code later if necessary

I use that way:
var field = vorm.down("textfield[name=username]");
Example:
form.down("selectfield[name=username]").setLabel('User');
form.down("selectfield[name=username]").setValue('email#te');
form.down("selectfield[name=username]").setPlaceHolder('email#test.com');

Related

Make Text Field item as Read Only in APEX 5.0

I have some text field page items on my APEX 5.0 page and I want to make the textboxes as read only/non-editable. During the page load I want to use these text boxes for only the data display on the page and should be non-editable.
Can somebody advice on how to do that? What attributes need to set for this?
This answer is a bit late to the party, but I found myself confronted to this problem and I wanted to share the solution I came up with.
In fact you just need to create your item as a text area, let say P1_Text_Area and you give it a readonly attribute using JavaScript. Write thoses 2 lines in the "Function and Global Variable Declaration" of your page:
var disItem = document.getElementById('P1_Text_Area');
disItem.readOnly = true;
Hope this helps someone in need.
in item properties find the
Read Only group
and set Read Only Condition Type as Always
or the option that suits to you
You can use disabled + save session state ==> read only

How to replace getColumnModel() function - EXTJS 4

I'm new to EXTJS. I didn't find getColumnModel() in EXTJS4.
Here is my code snippet:
grid.getColumnModel().on('hiddenchange', this.verifyLayout, this, {delay:1});
How can I replace the same in EXTJS 4?
Can anyone help me in this?
Thanks in advance!
Rahul.
In Ext JS 4 Ext.grid.Panel have columnhide and columnshow events which you can use instead of Ext JS 3 Ext.grid.ColumnModel hiddenchange event.
So you can rewrite your code like this:
grid.on('columnhide', this.verifyLayout, this, {delay:1});
grid.on('columnshow', this.verifyLayout, this, {delay:1});
Also if your verifyLayout method process event parameters you will have to modify it.

How to get the id of the current view in dojo mobile?

I would like to know if there is a way to get the id of the current view in dojo mobile ?
Thanks for your help.
If you have handle on one of the view, visible or not you can do:
var visibleView = anyViewSibling.getShowingView();
If you do not have handle on one of the view you should be able to get one by id:
var anyViewSibling = dijitRegisty.byId("theIdOfOneOfTheViewSibling");

How can I select a state of a Button(as2)?

One more time i need your help.
I´m working in a project which have many buttons, with textfield inside of them. I need to change the text of those textfields. How can I do it using as2?
Regards
TextFieldNameHere.text = "test";
or
TextFieldNameHere.text = StringVariableNameHere

removing field in form dynamically sencha 2

i am using sencha touch 2.0 and want to create a button '+' and '-',to add and remove a field dynamically,i have figured out the add part using
this.getForm().insert({...});
but remove part does not hide the field.
this.getForm().remove('...');
You have to set an id for your field and then try
this.getForm().remove('your_field_id_here')
Hope this helps.