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 8730763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:05:38+00:00 2026-06-13T09:05:38+00:00

On navigating to a specific URL, a controller method is fired, which loads an

  • 0

On navigating to a specific URL, a controller method is fired, which loads an ItemView into one of my application’s regions. This ItemView itself (the parent) will contain a handful of child ItemViews, rendering them all when it’s rendered itself. Here’s the parent ItemView:

return Backbone.Marionette.ItemView.extend({
    template: Handlebars.compile(template),
    ui: {
        textInput01: "#text-input-01"
    },
    events: {
        // no events yet
    },
    initialize: function() {
        // no init yet
    },
    onRender: function() {
        this.appRoutefinderTextinputItemView = new AppRoutefinderTextinputItemView({parentView: this});

        $(this.ui.textInput01).html(this.appRoutefinderTextinputItemView.render());
    }
});

And here’s the current sole ItemView:

return Backbone.Marionette.ItemView.extend({
    template: Handlebars.compile(template),
    events: {
        // no events yet
    },
    initialize: function() {
        // no init yet
    },
    onRender: function() {
        // no onRender yet
    }
});

For some reason I cannot fathom, though both the initialize and onRender methods on the child are firing, and all necessary data seems to be present, the child is either not being rendered or is being rendered in a “blank” manner, resulting in an unchanged parent view.

As far as I understand, I shouldn’t need to call render() on the child, as it’s implied when instantiating/referencing an ItemView? Even when I drop the render() call, the same result is come to.

I’ve got to assume there’s something about rendering ItemViews from within other ItemViews that I’m just missing, but scouring through the docs didn’t seem to help.

A secondary question would be: am I instantiating the child views in the proper manner, or is there a better way to do so?

*EDIT – So after some experimenting, it appears that the “accepted” solution is simply to make the parent view a Layout, which is an extended ItemView. This does work. However, I’m still left wondering why an ItemView within an ItemView doesn’t work. Am I intended to integrate a hand-written render() method on the ItemView, were I to keep it that way?

  • 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-13T09:05:38+00:00Added an answer on June 13, 2026 at 9:05 am

    The problem with your original code is this line:

    $(this.ui.textInput01).html(this.appRoutefinderTextinputItemView.render());

    The render method of a backbone view does not returned the rendered HTML. This method does the rendering and updates the el of the view. The return value of this method is the view itself. Marionette does not change this behavior.

    You need to change the code to populate the textInput01 with the view’s el. Also note that the this.ui.textInput01 is already a jQuery selected object so you don’t need to wrap that again.

    
    this.appRoutefinderTextinputItemView.render();
    this.ui.textInput01.html(this.appRoutefinderTextinputItemView.el);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I already asked a similar question but this one is a bit different/specific: I'm
I'm having trouble navigating to a different controller view from another controller action. e.g.
I started noticing strange behavior when navigating the main toolbar of my Winforms application,
I have a UIViewController and I'm navigating from my first view controller to second
My app has a navigation controller which push and pop a series of views.
Background information: I've searched stackoverflow for a specific solution and couldn't find one that
How can I determine what 'mode' my site is running under? In this specific
I am loading dynamic page loads with AJAX... Like this... $(document).ready(function(){ $(#xxxxx).click(function(){ document.getElementById(contentAll).innerHTML =
I have some wizard-like pages in my application, its keeping state while navigating between
I'm using Qt framework which has by default non-blocking I/O to develop an application

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.