View Full Version : Help needed using display field inside form panel

7 Dec 2012, 6:41 AM
Hello everybody,
I have added a display field in form panel , and value in display field is fetched from server , the issue is that if a large quantity of data is sent from back end the data is displayed messy/not properly formatted in display field i tried logging the data just before attaching it to value filed of display filed and the data is properly formatted/readable and no issues .

Eg: If data has 3 lines like :
'Hi my name is kabab
I live in India
I love food '
Then if we look it in display field it will be:

Hi my name is kababI live in India
I love food
I want the data to be displayed in same format as it was earlier.

function showCurrentConfiguration() {
Ext.create('Ext.form.Panel', {
width: 175,
height: 120,
bodyPadding: 10,
title: 'Current Configuration',
items: [{
xtype: 'displayfield',
fieldLabel: 'Current Configuration',
name: 'current_configuration',
value: ''
var formPanel= Ext.getCmp('ShowConfigPanel');
var options = new Array();
options['eventId'] = 'nativemethodcall';
options['url'] = ' /mainui/ctrl/client-webWeb/CMPServlet?action=net.kabab.landingPage.action.GetConfiguration';
options['method'] = 'getDeviceConfigDetails';
options['data'] = 'abc';

options['failure'] = function() {
// showError("Could not Process Request");


options['success'] = function(data) {
console.log("......Config result " + data);

Jx.JxAction.doAction(this, "nativemethodcall", options);

Please help.Thanks in advance

9 Dec 2012, 8:10 AM
Have you inspected the DOM?