Results 1 to 2 of 2

Thread: MVC question

  1. #1
    Tom_ is offline Member
    Join Date
    Aug 2010
    Rep Power

    Default MVC question

    Hi I've been reading up on MVC recently, and it makes sense to me. Until I start to get more than one MVC triad.

    After reading this: How to use Model-View-Controller (MVC)

    I understand the idea of subviews and the hierarchy but in practice I'm getting confused.

    Let's take a simple scenario, I have a subview (e.g. a progress bar) which is showing the progress of a file download. Obviously all the processing is being done in the related model.

    Using the observer pattern, the view can be notified of updates.

    This is all fine, makes perfect sense and works well.

    My problem, then, is how do I put the progress % into the parent view's window title.

    The window is it's own MVC triad. How does this:

    Firstly, access the information of its subview (it seems that it should be reading from the model of the subview rather than the view itself). Should its own model have access to the subview's model? Should the subview have access to its parent and tell that to update when it's updated itself?

    Secondly, know when to update?

    I think I understand the general concept behind MVC but once I have two (or more) triads which need to share information I get confused.

    Thanks for any help!

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power

Similar Threads

  1. Question mark colon operator question
    By orchid in forum Advanced Java
    Replies: 9
    Last Post: 12-19-2010, 09:49 AM
  2. JDO Question...
    By Kam in forum JDBC
    Replies: 0
    Last Post: 01-07-2010, 07:11 PM
  3. Question
    By Java_Fanatic in forum New To Java
    Replies: 10
    Last Post: 10-14-2009, 12:18 AM
  4. ur help on my question
    By jameela in forum New To Java
    Replies: 4
    Last Post: 10-13-2008, 01:38 PM
  5. JNI question
    By javaplus in forum New To Java
    Replies: 0
    Last Post: 12-24-2007, 11:18 AM

Posting Permissions

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