Replies: 2 comments
-
in summary,how could webview create a node and send this node message to here |
Beta Was this translation helpful? Give feedback.
-
Hi,
Only sending data to the local model source will not work, as it would only update the diagram on the client and the server is unaware of this change. Thus, on the next model update from the server, the client state would be overwritten.
The correct way of informing the server about a change is to send an operation. See https://eclipse.dev/glsp/documentation/modeloperations/ for more details. The server should process this operation then by applying it to the source model and regenerate the graph model, which is then sent as an update to the client after each operation. See https://eclipse.dev/glsp/documentation/sourcemodel/ for more details.
Every action (and operation, which is a type of action), for which a handler on the server is registered, will be forwarded to the server when sent by the client. Best wishes, Philip |
Beta Was this translation helpful? Give feedback.
-
with the basic of workflow example,i know how to create custom new node,and exexute save or other action like below
now my front end colleagues
drag a custom node,but just send me node data using sprotty LocalModelSource like below
how to use glsp action to send this node data to backend,i mean which code can i trigger my custom node data to execute related action operation(createNodeAction for example),in other word, how this node data pass to picture1 nodeOperation param
Beta Was this translation helpful? Give feedback.
All reactions