Skip to content

Commit

Permalink
Fixed converting JsonObject and JsonArray to String on websocket update
Browse files Browse the repository at this point in the history
  • Loading branch information
computate committed Mar 8, 2023
1 parent 2364d25 commit 87e7e86
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/main/java/org/computate/frFR/java/EcrirePageClasse.java
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,19 @@ else if("LocalTime".equals(entiteNomSimple)) {
}
wWebsocketInput.tl(4, "$('.input", classeNomSimple, "' + pk + '", entiteVarCapitalise, "').each(function() {");
wWebsocketInput.tl(5, "if(val !== $(this).val())");
wWebsocketInput.tl(6, "$(this).val(val);");
if(entiteNomSimple.startsWith("Json")) {
wWebsocketInput.tl(6, "$(this).val(JSON.stringify(val));");
} else {
wWebsocketInput.tl(6, "$(this).val(val);");
}
wWebsocketInput.tl(4, "});");
wWebsocketInput.tl(4, "$('.var", classeNomSimple, "' + pk + '", entiteVarCapitalise, "').each(function() {");
wWebsocketInput.tl(5, "if(val !== $(this).text())");
wWebsocketInput.tl(6, "$(this).text(val);");
if(entiteNomSimple.startsWith("Json")) {
wWebsocketInput.tl(6, "$(this).val(JSON.stringify(val));");
} else {
wWebsocketInput.tl(6, "$(this).val(val);");
}
wWebsocketInput.tl(4, "});");
wWebsocketInput.tl(4, langueConfig.getString(ConfigCles.var_ajouterLueur), "($('.input", classeNomSimple, "' + pk + '", entiteVarCapitalise, "'));");
wWebsocketInput.tl(3, "}");
Expand Down

0 comments on commit 87e7e86

Please sign in to comment.