People,
I'm with the following problem:
<h:form>
<h:commandButton action="#{bean.myAction}" data="#{bean.myValue}" oncomplete="alert(data.erro)">
</h:form>I would like to know is: How can I serialize bean.myValue?
I try it like String with this syntax:
myValue = "{\"erro\": \"true\" }"I try to use a JSONObject:
JSONObject aux = new JSONObject();
aux.put("erro", "true");
myValue = aux.toString();But none of them works, always return undefined on js alert!!
Someone please????