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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:39:46+00:00 2026-05-19T02:39:46+00:00

Greetings, I have a problem in my application I’m building in. To give the

  • 0

Greetings,

I have a problem in my application I’m building in.
To give the scenario I’m in.
I have these two controllers both inherit the same model initialize from a main controller.
All controllers have their on views but I have only one model.

To problem is that. When ever changes happens to that model.
How can I notify the other controller (from the two controllers) that an update occurred?
I’m a going to use Observer/Observable or PropertyChangeEvent? And how, I’m a little bit of confused on implement both on the MVC archictecture.

Your response is highly appreciated on this matter.

Thanks,
Cyril H.

  • 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-19T02:39:47+00:00Added an answer on May 19, 2026 at 2:39 am

    I had a similar case where I used PropertyChangeSupport in order to listen to model’s changes. I believe that the best way is to create an AbstractEntity that contains a private PropertyChangeSupport and two public methods addPropertyListener, removePropertyListener and a protected method firePropertyChange. Those methods will be used as wrappers of the PropertyChangeSupport’s ones. So your controllers should just addPropertyListeners in order to listen to changes of the common model.

    Note:

    • You should use the same instance of model accross all the controlers.
    • The classes that you need are the following:
  2. java.beans.PropertyChangeSupport
  3. java.beans.PropertyChangeListener
  4. Example code for how the
  5. public void setValue(String value){
          String oldValue=getValue();
          this.value=value;
          firePropertyChange("value",oldValue,getValue()); 
    }
    

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

Sidebar

Related Questions

Greetings, I have problem with errorPlacement, I'm trying to place the error message next
Greetings, I have a problem using jqgrid and jquery tab (I am coding in
Greetings, I have to following problem. I have a WCF Service which runs under
Greetings! I inherited a C#.NET application I have been extending and improving for a
Greetings all, I have a question. I have created a WPF application. So, I
I have an application that I am building that needs to modify a configuration
greetings all i have a problem that when sending an email from the server
Greetings, I have a problem to use selected value propriety of CascadingDropDown. I have
Greetings! I have some troubles enabling OAuth authentication for my web application running on
Greetings, I have this annoying problem where my exception window in Visual Studio 2008

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.