[CLOSED] Callout bodyWidget not showing

  1. #1

    [CLOSED] Callout bodyWidget not showing

    I need to create a Callout by javascript, but the bodyWidget i not showing up:

    @{ var x = Html.X(); }
    @(
     x.Panel()
        .Height(100)
        .Width(100)
        .Listeners(l => l.Render.Handler = @"
            var c = Ext.create('Ext.net.Callout', { 
                title: 'Callout',
                target: item,
                closeOnOutsideClick:true,
                bodyWidget: Ext.create('Ext.panel.Panel', {
                    title: 'Panel',
                    width: 100,
                    height: 100,
                    layout: 'fit',
                    html:'<p>Content</p>', 
                })
            });
            c.show();
        ") 
    )
    Last edited by fabricio.murta; Apr 07, 2016 at 9:07 PM.
  2. #2
    Hello @sveins12!

    Try defining it like this:
    @{ var x = Html.X(); }
    @(
     x.Panel()
        .Height(300)
        .Width(100)
        .Listeners(l => l.Render.Handler = @"
            var c = Ext.create('Ext.net.Callout', {
                title: 'Callout',
                target: item,
                closeOnOutsideClick:true,
                bodyWidget: { 
                    xtype: 'panel',
                    title: 'Panel',
                    width: 100,
                    height: 100,
                    layout: 'fit',
                    html: '<p>Content</p>'
                }
            });
            c.show();
        ")
    )
    It should work as intended, then.
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Nice, thank you!

Similar Threads

  1. Replies: 3
    Last Post: Oct 12, 2020, 6:23 PM
  2. Callout Problem
    By hakandonmez in forum 3.x Help
    Replies: 0
    Last Post: Mar 01, 2015, 10:02 AM
  3. Replies: 3
    Last Post: Feb 16, 2015, 9:25 PM
  4. [CLOSED] Need help with MVC bodywidget
    By jpadgett in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 21, 2014, 7:19 PM
  5. [CLOSED] Bug on the callout component
    By Akpenob in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 06, 2014, 8:00 AM

Posting Permissions