View Full Version : listener on combox not responding initially

20 Jul 2010, 4:58 AM
Here is my scenario: When I click on Company Directory from the navigation pane, my company directory tab comes up. It "shows" only the north panel with a combo box to select a plant (even though the entire viewport is already rendered, though hidden). Once you select a plant from the combo box, it "modifies" the already rendered components based on that selection. The first line of my code (see below) works on the initial selection, but not subsequent selections, hence the second line of code, which works on subsequent selections, but not the initial selection! This "method" worked for the "html" property of the formpanel textfield, but not for the "value" property.
I used Ext.getCmp('textfieldID').setValue('test'), but that does not work for my form textfields on the FIRST selection, but it does work for all subsequent selections. How can I modify the "value" property on the initial selection? I think my problems stem from the state of my components (already rendered, just hidden), but not sure how to deal with the issue and why it works on a subsequent selection. Any suggestions?

Ext.getCmp('plantPic').html = '<img src="/vvresources/' + this.getRawValue() + 'Plant.jpg" width="100%" height="100%"></img>';
Ext.getCmp('plantPic').body.update('<img src="/vvresources/' + this.getRawValue() + 'Plant.jpg" width="100%" height="100%"></img>');