opendolphin: textfield not updated on client

64 Views Asked by At

I just started to play around with OpenDolphin. I'm using the maven jumpstart project and would like to write a value on the server into the presentation model. This value should than be displayed on the client:

I tried:

actionRegistry.register(ApplicationConstants.COMMAND_ID, new CommandHandler<Command>() {
        public void handleCommand(Command command, List<Command> response) {
            System.out.println("Server reached.");
            Object text = getServerDolphin().getAt("input").getAt("text").getValue();
            System.out.println("server text field contains: " + text);
            getServerDolphin().getAt("input").getAt("text").setValue("test");
        }
    });

The value is received but not transfered back to the client.

The textfield is bound like this:

PresentationModel input = clientDolphin.presentationModel("input", new   ClientAttribute("text"));
JFXBinder.bind("text").of(field).to("text").of(input);
1

There are 1 best solutions below

0
On

This question has meanwhile been answered on the mailinglist. In short: you also need to bind in the other direction in order to update the textfield when the attribute value changes and you need to use an OpenDolphin version 0.10 or later.