Results 1 to 3 of 3

Thread: Insert component inside HTML

  1. #1
    Sencha User
    Join Date
    Nov 2013
    Posts
    32
    Answers
    2

    Default Answered: Insert component inside HTML

    Hi,

    I have a screen, that I could determine which type of view will be perfect for it.. It looks like uitableview in iOS

    I though using list, but again the problem is one of the rows in the list / table has a toggle switch. So I came up with this

    Code:
    Ext.define('MyDesireSencha.view.Settings', {
        extend: 'Ext.navigation.View',
        alias: 'widget.settingsWindow',
        config: {
            items: [
                {
                    xtype: 'container',
                    itemId: 'settingsListItems',
                    cls: 'settings-view',
                    html: [
                        '<div class="settings-table">',
                        '<a href="#" onclick="return false" class="closure">Profile</a>',
                        '<a href="#" onclick="return false">Online</a>',
                        '<a href="#" onclick="return false" class="closure">Reset Password</a>',
                        '</div>'
                    ].join('')
                }
            ]
        }
    });
    Now, if you can see, there are three <A> tags. I want to insert a toggle switch inside that. What is the best way to achieve this?

    Kind Regards
    Rakesh

  2. Never mind..

    I did not thought that it would work if I put the ID of an html element to the renderTo config of an elmenet Was so easy.. I was thinking it more complex way unnecessarily.

    Rakesh

  3. #2
    Sencha User
    Join Date
    Nov 2013
    Posts
    32
    Answers
    2

    Default Solved

    Never mind..

    I did not thought that it would work if I put the ID of an html element to the renderTo config of an elmenet Was so easy.. I was thinking it more complex way unnecessarily.

    Rakesh

  4. #3
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108
    Answers
    342

    Default

    Thanks for sharing your solution.
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

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

    Need to include a test case use:
    The official Sencha Fiddle

Posting Permissions

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