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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:14:39+00:00 2026-05-30T04:14:39+00:00

Is it a good idea to make parent views decorate children view with UI

  • 0

Is it a good idea to make parent views decorate children view with UI elements, and what is the backbone way to do this?

For example, I have a PhotoView instance which represents a JPEG as well as a few action buttons which appear on hover. This PhotoView is wrapped in a PhotoDetailsView, which adds a Goolge Maps map and a few other things to that.

I want to add an edit action to the photo. The problem is: if I put it on the PhotoView, then the edit function callback should simply fire an event, because it is really the PhotoDetailsView, which has to deal with the edit action. On the other hand, if I make the parent view add this UI button to the child view, it is also not an option, becuase the parent view will have to know the exact UI structure of the child view. In any case, there seems to be a nasty dependency between them, which I want to get rid of.

How do I resolve this dilemma?

  • 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-05-30T04:14:41+00:00Added an answer on May 30, 2026 at 4:14 am

    If your PhotoView element is a child of your PhotoDetailsView, it seems to me that you should have your edit button as a part of PhotoView, but have the action on your PhotoDetailsView. With a <button class="edit">Edit</button> somewhere in your PhotoView template, this should be in your PhotoDetailsView:

    events: {
      "click .edit": "editPhoto"
    },
    editPhoto: function(event) {
      // Something something
    }
    

    This way, all your parent view needs to know about the child view is that it has something clickable of class edit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it a good or bad idea to make setters in java return this?
I've heard that it's not a good idea to make elements global in JavaScript.
Im new to php, I dont have good idea how to make things between
First i was wondering if this is a good idea, essentially i have user
Suggest me, is it a good idea to make changes in default Joomla code
I have a good idea about Agile development process but I have no ieda
I have a pretty good idea how to implement fulltext search with MySQL. I
Is it good idea to have application engine written in c++ and user interface
I'm building a Qt application that have about 30 different views (QWidgets). My idea
I'm just wondering if it is a good idea to make a data structure

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.