View Full Version : Ext.getCmp confusion

15 Oct 2010, 4:50 AM

I try to read the content of a textfield and use it within GMap panel as geo location. It seems, I cannot use it within my setCenter method (remains empty) but a simple beforerender listener reads the value properly. Anyone has a hint what's going wrong there?

App.widget.GoogleMapsFieldSet = Ext.extend(Ext.form.FieldSet, {
constructor: function (config) {
var config = Ext.apply(config || {}, {
title: 'Map',
xtype: 'gmappanel',
zoomLevel: 14,
gmapType: 'map',
mapConfOpts: ['enableScrollWheelZoom', 'enableDoubleClickZoom', 'enableDragging'],
mapControls: ['GSmallMapControl', 'GMapTypeControl', 'NonExistantControl'],
setCenter: {
geoCodeAddr: Ext.getCmp('address_field').getValue()
listeners: {
beforerender: function() {
App.widget.GoogleMapsFieldSet.superclass.constructor.call(this, config);