Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8083795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:35:20+00:00 2026-06-05T17:35:20+00:00

In my MVC application in Controller i have following function to add and focus

  • 0

In my MVC application in Controller i have following function to add and focus new tab to TabPanel with DataView inside:

    show_gallery: function(view, record, item, index, e, opts) {
    var tabb = Ext.ComponentQuery.query('.gallery_panel');

    var gallery_view = Ext.widget('gallery_view');

    var ImageStore = Ext.create('Gallery.store.Images');
    ImageStore.load({url: 'myphoto/index.php/api/feed/json/' + record.data.uuid});

    Ext.apply(gallery_view, {
        title: record.data.name,
        id: record.data.uuid,
        closable:true,
        store: ImageStore
    });

     if (tabb[0].down('#' + record.data.uuid)) {
        console.log('Entered IF');
        //tabb[0].setActiveTab(tabb[0].down('#' + record.data.uuid));
        tabb[0].setActiveTab(record.data.uuid);
     }else{
        console.log('Entered ELSE');
        tabb[0].add(gallery_view);
        if (Ext.getCmp(record.data.uuid)) {
            console.log('THERE IS SUCH UUID');
        }
        //tabb[0].setActiveTab(gallery_view);
     }
},

And the problem is in the last line. When i uncomment tabb[0].setActiveTab(gallery_view) the new tab is focused but empty and if i leave the line commented the new tab with dataView is populated with data but not focused. I really dont have any idea why setActiveTab() causes DataView not to display at all. The gallery_view widget is Ext.view.View extension.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T17:35:22+00:00Added an answer on June 5, 2026 at 5:35 pm

    I’m not sure how come you get the data view if there’s no setActiveTab, but there seem to be some issue with this code:

    var gallery_view = Ext.widget('gallery_view');
    
    var ImageStore = Ext.create('Gallery.store.Images');
    ImageStore.load({url: 'myphoto/index.php/api/feed/json/' + record.data.uuid});
    
    Ext.apply(gallery_view, {
        title: record.data.name,
        id: record.data.uuid,
        closable:true,
        store: ImageStore
    });
    

    First you create a new widget with Ext.widget() and then you override some config options with Ext.apply(). To my understanding, the latter is fine for primitives but not for objects/arrays.

    Generally speaking, the configs are there for the purpose of telling the constructor how to initialise a specific instance of the class. A change to an object’s title through Ext.apply() could work if the object is not rendered yet, but not a change to a store config (upon construction the component might start listening to various store events, this won’t happen by a simple Ext.apply() which only copies configs from one object to another – you’ve already missed the train for a component that was created as far as listening to store events goes).

    Please try this instead:

    var ImageStore = Ext.create('Gallery.store.Images');
    ImageStore.load({url: 'myphoto/index.php/api/feed/json/' + record.data.uuid});
    
    var gallery_view = Ext.widget('gallery_view', {
        title: record.data.name,
        id: record.data.uuid,
        closable:true,
        store: ImageStore
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my MVC application I have the following mapping: routes.MapRoute(testRoute, services/service.js, new {controller =
MVC 3. VB.NET I have the following controller action in my application to send
I have an MVC application with the following block inside in Web.config: <authentication mode=Forms>
I have implemented custom errors in my asp.net mvc application by following this article
I have a spring MVC application using JSP as my view technologies with Jquery
I have the following issue: I have a MVC application, in some action of
I have a controller in an ASP.NET MVC application. The page has several filters
I'm trying to add unit testing to an ASP.NET MVC application I have built.
In my MVC application I have the following paths; /content/images/full /content/images/thumbs How would I,
I have this following mvc application The problem is when Im trying to assign

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.