Jsf. How To Post Backbean Object From Jsf Form To Javascript
I am using Primefaces/JSF in combination with pure javascript tools in order to implement an image viewer & annotator. Image viewer is built upon the OpenLayers framework. When
Solution 1:
Even I can't give all answers, for me the filling of your hiddenInput
should be managed as following:
@ManagedBean(name="imageAnnotations")
publicclassImageAnnotations {
privateString jsonString;
publicvoidanyMethodFillingOrInitializingTheJSONString() {
this.jsonString = resultOfYourWork();
}
publicStringgetJsonString(){
returnthis.jsonString();
}
publicvoidsetJsonString(String item) {
this.jsonString = item;
}
}
When you reload this hidden input field, just be sure to trigger a javascript parsing the String and updating your client-side Model. This can be done via the on* - events you can connect with Primefaces buttons.
Guys, can anybody help with the other parts?
Post a Comment for "Jsf. How To Post Backbean Object From Jsf Form To Javascript"