我刚开始玩OpenDolphin。我正在使用maven jumpstart项目,并希望在服务器上将值写入演示模型。该值应显示在客户端上:
我试过了:
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");
}
});
收到的值但未转移回客户端。
文本字段的绑定方式如下:
PresentationModel input = clientDolphin.presentationModel("input", new ClientAttribute("text"));
JFXBinder.bind("text").of(field).to("text").of(input);
答案 0 :(得分:1)
此问题已在邮件列表中得到解答。 简而言之:您还需要在另一个方向绑定,以便在属性值更改时更新文本字段,并且您需要使用OpenDolphin版本0.10或更高版本。