1
방금 OpenDolphin으로 놀기 시작했습니다. 나는 Maven Jumpstart 프로젝트를 사용 중이며 서버의 값을 프레젠테이션 모델에 쓰고 싶습니다.opendolphin : 클라이언트에서 텍스트 필드가 업데이트되지 않았습니다.
내가 시도 :이 값보다 클라이언트에 표시되어야합니다
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);