Hi Frank, Daniel,

On 02/19/09 18:15, Frank Schönheit - Sun Microsystems Germany wrote:
Is there a quick way to exchange or replace the contents of a Model with
that of another model?

As I understand the framework design, the intention was "one document - one model". Thus there is no "quick" way to do it. The model is just not intended to be used so.

Creation of a new model and loading it will always be more quick or at least take the same time, as the tricky methods that let the same model get data from other documents. At least in case of general API. It could be that a document specific API allows something like this.


Try using XLoadable::load a second time. If your Model_B really exists
as model only (and not as file), then store it to a temporary location
beforehand.

In my understanding, XLoadable::load should be reusable, though I of
course do not know whether its implemented this way everywhere :)

According to the idl-specification the methods must throw exception in case of double initialization. So it is actually not allowed to let it be reusable.

As Frank has already mentioned for the case of controller, the document would have to reinitialize itself completely, thus it would be just the same as closing the document and opening the new one. In those circumstances the decision to let model represent one document sounds for me logic and consistent.

From other side the possibility to reuse the model object for another document only to let the same controller be used sounds as a quite strange requirement for me.

Best regards,
Mikhail.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to