Results 1 to 2 of 2

Thread: Help needed using display field inside form panel

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Nov 2012
    Vote Rating

    Default Unanswered: Help needed using display field inside form panel

    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

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    Have you inspected the DOM?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2

    Think my support is good? Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts