PDA

View Full Version : [CLOSED] Get Field of EventWindow



osef
Dec 03, 2013, 9:36 PM
Hi, How Can I do to get the elements(objects ext.net) of a EventWindow in the next image:

7322

- First TextField I want to set the property setEditable(false).
- First DateField I want to set the property setVisible(false).
- First ComboBox I want set the property setDisabled(true).
- Label "to" rename to "a".
- Second DateField I want to set the property setVisible(false).
- Second ComboBox I want set the property setDisabled(true).
- CheckBox (All day) I want to set the property setVisible(false).

I have the code to get other elements as:



var titleItem = eventWindow.formPanel.getComponent('title');
var dateRangeItem = eventWindow.formPanel.getComponent('date-range');
var fbar = eventWindow.getDockedComponent(0);
fbar.items.get(0).text = '<a href="#" id="tblink"></a>';
fbar.items.get(2).setVisible(false); //"Guardar";
fbar.items.get(3).text = "Borrar";
fbar.items.get(4).setVisible(false); // = "Cancelar";


This code is to configure those elements, but the getComponent(name) where "name" is other that the inspector in Firefox.

Thank you

Baidaly
Dec 03, 2013, 10:13 PM
Hello!

Probably, I misunderstand your question but it seems you need the following:


// First TextField I want to set the property setEditable(false).
titleItem.setReadOnly(true)

// First DateField I want to set the property setVisible(false).
dateRangeItem.items.items[0].hide()

// First ComboBox I want set the property setDisabled(true).
dateRangeItem.items.items[1].disable()

// Label "to" rename to "a".
dateRangeItem.items.items[2].setText('a')

// Second DateField I want to set the property setVisible(false).
dateRangeItem.items.items[4].hide()

// Second ComboBox I want set the property setDisabled(true).
dateRangeItem.items.items[3].disable()

// CheckBox (All day) I want to set the property setVisible(false).
dateRangeItem.items.items[5].hide()

osef
Dec 03, 2013, 10:39 PM
Hello!

Probably, I misunderstand your question but it seems you need the following:


// First TextField I want to set the property setEditable(false).
titleItem.setReadOnly(true)

// First DateField I want to set the property setVisible(false).
dateRangeItem.items.items[0].hide()

// First ComboBox I want set the property setDisabled(true).
dateRangeItem.items.items[1].disable()

// Label "to" rename to "a".
dateRangeItem.items.items[2].setText('a')

// Second DateField I want to set the property setVisible(false).
dateRangeItem.items.items[4].hide()

// Second ComboBox I want set the property setDisabled(true).
dateRangeItem.items.items[3].disable()

// CheckBox (All day) I want to set the property setVisible(false).
dateRangeItem.items.items[5].hide()

Thank you Baidaly, this is working.