Note that there are some explanatory texts on larger screens.

plurals
  1. POJava rmi: Updating GUI based on Model Changes without Serializing Panels and/or Polling
    primarykey
    data
    text
    <p>I am currently on a Problem. I have an RMI Server with a Model and want to update the View on the Client side based on the Changes of the Model, a typical MVC Structure. My Problem now is if I want to call Methods from the Server that update the View on the Client, the Server needs a Reference to the View. If the View is referenced in any Class given to the Server the View gets send to the Server, which I don't want to do and which I can't because the View uses the not Serializable GroupLayout.</p> <p>Is there any Way to update the View based on the Model Changes without the need of polling and/or the need to send the View?</p> <p>Thanks in advance.</p> <p>edit: Seems like there is no one yet able to answer my Question. So here are a little more Details of my Thought Process. Imagine three Classes, one View, one Model and one Controller. The Controller acts as a bridge between Model and View. So the Controller has a Reference to the Model and to the View. The View has a Reference to the Controller. The Controller implements the PropertyChangeListener Interface and registers itself as such on the Model. Everytime a Property is change in the Model it calls the firePropertyChange Method and the controller propagates the Event to the view, which acts accordingly. Sadly since the Controller on the Server has a Reference to the View on the Client, the View will be serialized, which is not possible with a GroupLayout used by Matisse. GroupLayout is not implementing Serializable. Subclassing Grouplayout does not work because GroupLayout has not default Constructor. Hope that makes my Problem clear enough for you all to go out there and try that construct for yourself and give me a possible Solution on that. ;)</p> <p>edit:Seems like there is no Possibility to enable the MVC Architecture with RMI with Visible Components without serializing the View itself. So I have to poll the Model on the Server to check if a Property has changed and change the View on the Client appropriately. This Solution kinda sucks(excuse my Words), because it is the Opposite of Resource saving and the MVC Architecture. Next negative Aspect is that the View is and will never be updated in real Time.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload