in Education by
I hava a main view, where you have one object and you can change the properties of that object. But then I have a popup window when you click on a button: the advanced properties. But these changes that you do in the pop up window also have to be done in the object of the main view. So I implemented a viewmodel as well for the popup. I can put here some code but this is quite useless, because I don't have anything, just 2 viewmodels with bindings with some textboxes to change the properties of that object. So the 2 viewmodels don't work together on the same object (this is what i should do i think). It is just difficult for the popup to get to the object which you are working on in the mainview. In some way i should must be able to pass the changes which you made in the popup , to the main view (to the same object). Someone who knows how to do this? I am searching for this a long time, but i really don't know to fix or to go around my problem :( .. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
There are several ways of achieving this, depending on your architecture. For example, if you are using a rich domain model, you may be binding directly to a Model property exposed on your view model. In which case, when you invoke the advanced property window, you can pass an instance of your existing model to that view model. Changes in the advanced property window will be bound to the same instance of your business object opened in the original window. Alternatively, if you are using an anemic domain model where you don't expose the model directly to the view, you can still pass the same instance of the model to the new window, but use a mediator pattern (or any other standard inter-view model communication techniques) to notify the original window when the advanced window closes. In this case, the advanced window would be the publisher, and the original window the subscriber. When notified, the original window can invalidate all of its view model bindings so that the UI is updated as appropriate.

Related questions

0 votes
    At first I made an application that downloads a file from the entered link and displays information about ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 19, 2022 in Education by JackTerrance
0 votes
    I am using Android Data Binding framework I have suppose an EditText for login form with username as below ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 18, 2022 in Education by JackTerrance
0 votes
    How can you explain view and view model in MVVM?...
asked Apr 8, 2021 in Education by JackTerrance
0 votes
    I would like to use API Gateway to pass through binary payloads from a local Express.js server that sends ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 22, 2022 in Education by JackTerrance
0 votes
    Is there a way to make a UIView unresponsive AND pass through all touch events? Basically I just want ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    The circles in the Smith chart pass through which point? (a) (0,1) (b) (0,-1) ... theory proposed by,electromagnetic theory engineering physics,electromagnetic theory nptel...
asked Nov 6, 2021 in Education by JackTerrance
0 votes
    How can i apply MVVM pattern in QtQuick applications? Can anybody give me any sample (simple) code? Thanks ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
    What is MVVM architecture in Angular?...
asked Jun 30, 2021 in Technology by JackTerrance
0 votes
    What is the difference between MVP, MVC and MVVM?...
asked Apr 9, 2021 in Education by JackTerrance
0 votes
    Hi I have to pass array as props to a functional component. Show code snippet But it is converted ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    Hi I have to pass array as props to a functional component. Show code snippet But it is converted ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 6, 2022 in Education by JackTerrance
0 votes
    Course Results (${courseResponseList.getCourses().size()}) Want to show above div. jquery script. jQuery. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 6, 2022 in Education by JackTerrance
0 votes
    Hi I have to pass array as props to a functional component. Show code snippet But it is converted ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 3, 2022 in Education by JackTerrance
...