我刚刚开始玩弄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);发布于 2014-06-26 04:04:05
同时,这个问题已经在邮件列表上得到了回答。简而言之:您还需要在另一个方向进行绑定,以便在属性值更改时更新文本字段,并且需要使用OpenDolphin版本0.10或更高版本。
https://stackoverflow.com/questions/24068532
复制相似问题