PDA

View Full Version : form.loadrecord populte textfields within a container (form->container->textfield)



tollwood85
23 May 2013, 1:38 AM
Hello,
I am trying to populate a form using a store. Everything works for the direct children of the formpanel. However, for decoration purposes I included further panels and containers.

Is there a way to also fill textfields like txtStrasse?
43946
http://www.sencha.com/forum/image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANYAAAEgCAIAAABHPRrJAAAWMElEQVR4nO2dX2wbx53HB8G93eH62BwK3Ps93YMe+hwDBi5wGtiAQLW6FyNhjfCKgndCjFZALBh112kSBXIk1mHt5BgrVGEkZ7BuAl8c2CZF03LkSLEdWaaBiwPZlJRGsUTrH/9r5x6W5M7u7C6XFLnDXX0/GBg0OTO7kj6e5VLz9Y+QcAUNTWQTfwZoe7y1OOz4HHkpQg4et2ovRcjxOfFfIZozrWUlWjzeSxEpduvS3aXP5pYv31v+/N539Xb53vJnc8uX7i5JsVvkpYj4bw2aM61lJVo83sHjoU+mGzZy8LhmVGieDE6Tkdpf35whg3eqzw/Nk/A3ZGi+8aGrne30sTdhe9oSGZrWfHV7rbWmRLhlBftDDZZcpfWHNKOSW1lK03e+UX5mwW/LlOYj4Qq5IWcLcjCUTee2gg0PndzKNuzW1IRtaaHv4jlKKU0/EK2CqNaaEmFGwWfeLfW89+jX51L19up44tXxxH+dm3z+fW4teWGI2oC8MKQZldzK5irZJ1kSrpDwD/F8JZvLR8LKonWbXFrP5taDyrr15gwZnCaD0+TEN6Ta4Q4ZmiaDd0hyK5vbDA4xr4YrZOQO1187oUGH2oTqY7NXlS9/iQzNkJDR4cLfkE/Ws7n1oLKo88c6oevvxdaaEmHtKvij8MYr524q5tXa5H+cm/rH8Gb7FNyKP9oMhipkZDX9JBdXFExuZXOF/ytQSiktyMHQfPDbSnWKldXawHy6QCmVI8mtbC6XVjqvrJCRCgnNk68K1f4/rJARgwmNOrAT5jUT6l9VltKn8Vw5njQ6XHgnXf27HDE81ko+zX45nmw1JRafbPQNf/yTl9/+yctv9w1/vPhkowkFn3m39K9nM6yC/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AwWBYKAgEAwUBIKBgkAwUBAIBgoCwUBBIBgoCATjBQWRoHM1XlAQCTpX4wkFO5qgK6PuXGfxhIKdTtCh7lwn8YSCjiXouIGoO7d7PKFgRxN0qDvXYTyhYEcTdCqoO9cRPKFgRxN0WlB3ru14QsGOJuhQd67DeELBjiboUHeuw3hCQSTo3IwXFESCztV4QUHgaqAgEAwUBIKBgkAwUBAIBgoCwUBBIBgoCAQDBYFg/h9/yHalX7m+gQAAAABJRU5ErkJggg==
This is the code I am currently using:

var mitarbeiterStore = Ext.data.StoreManager.lookup('MitarbeiterStore');
var data = mitarbeiterStore.getAt(0);
Ext.getCmp('MitarbeiterForm').loadRecord(data);


What would be the best approach to fill all textfields?

evant
23 May 2013, 1:45 AM
The form tracks fields at any depth underneath, so what you've got is fine.