Cougar84
17 Apr 2012, 1:04 AM
Hi,
I've a question about how to refresh Labels text of an entire form with one instruction ...
For example, this is my panel:
Ext.create("Ext.panel.Panel", {
items: [{
name: 'lblMessaggio',
xtype: 'label',
margins: '5 0 15 0',
text: IA.Labels.login.msg.standard,
cls: 'labelGray',
style: 'text-align: center;'
},{
xtype: 'combobox',
name : 'cboSoc',
stateId: 'cboSoc',
fieldLabel: IA.Labels.login.societa,
store: 'Societa',
valueField: 'CodSoc',
displayField: 'DesSoc',
queryMode: 'local',
allowBlank: true,
editable: false,
submitValue: true
},{
xtype: 'textfield',
name : 'txtUser',
stateId: 'txtUser',
fieldLabel: IA.Labels.login.user,
maxLength: 30,
enforceMaxLength: true,
allowBlank: false
}, {
xtype: 'textfield',
name : 'txtPassword',
stateId: 'txtPassword',
fieldLabel: IA.Labels.login.password,
maxLength: 30,
enforceMaxLength: true,
inputType: 'password',
allowBlank: true
}
],
bbar: [
{
name: 'cmdAssistenza',
iconCls: 'assistenza_Icon',
scale: 'large',
text: IA.Labels.login.buttons.assistenza
},{
name: 'cmdRecuperaPassword',
iconCls: 'chiave_Icon',
scale: 'large',
text: IA.Labels.login.buttons.recupera
}
]
}
After loading this form the IA.Labels is loaded with Italian text ...
I made a language change ( ex. Franch ) with the panel always open.
The IA.Labels is reloaded with a Ext.Ajax.request and an eval and the correct Franch text are loaded.
But in the panel the labels doesn't change ( of course ) ...
But how can I refresh all the labels with a single shot?
Thanks to all,
Marco
I've a question about how to refresh Labels text of an entire form with one instruction ...
For example, this is my panel:
Ext.create("Ext.panel.Panel", {
items: [{
name: 'lblMessaggio',
xtype: 'label',
margins: '5 0 15 0',
text: IA.Labels.login.msg.standard,
cls: 'labelGray',
style: 'text-align: center;'
},{
xtype: 'combobox',
name : 'cboSoc',
stateId: 'cboSoc',
fieldLabel: IA.Labels.login.societa,
store: 'Societa',
valueField: 'CodSoc',
displayField: 'DesSoc',
queryMode: 'local',
allowBlank: true,
editable: false,
submitValue: true
},{
xtype: 'textfield',
name : 'txtUser',
stateId: 'txtUser',
fieldLabel: IA.Labels.login.user,
maxLength: 30,
enforceMaxLength: true,
allowBlank: false
}, {
xtype: 'textfield',
name : 'txtPassword',
stateId: 'txtPassword',
fieldLabel: IA.Labels.login.password,
maxLength: 30,
enforceMaxLength: true,
inputType: 'password',
allowBlank: true
}
],
bbar: [
{
name: 'cmdAssistenza',
iconCls: 'assistenza_Icon',
scale: 'large',
text: IA.Labels.login.buttons.assistenza
},{
name: 'cmdRecuperaPassword',
iconCls: 'chiave_Icon',
scale: 'large',
text: IA.Labels.login.buttons.recupera
}
]
}
After loading this form the IA.Labels is loaded with Italian text ...
I made a language change ( ex. Franch ) with the panel always open.
The IA.Labels is reloaded with a Ext.Ajax.request and an eval and the correct Franch text are loaded.
But in the panel the labels doesn't change ( of course ) ...
But how can I refresh all the labels with a single shot?
Thanks to all,
Marco