Skip to content

Commit

Permalink
Fixed the html and input for JsonArray
Browse files Browse the repository at this point in the history
  • Loading branch information
computate committed Dec 13, 2023
1 parent 6b112db commit e6ec1f3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/main/java/org/computate/frFR/java/EcrirePageClasse.java
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,8 @@ else if("Boolean".equals(entiteNomSimple)) {
tl(11, "<div class=\"w3-cell-row w3-padding \">");
tl(13, "<div class=\"w3-cell \">");
}
tl(14, "{{#each ", uncapitalizeClasseNomSimple, "_.", entiteVar, "}}<td>{{.}}</td>{{/each}}");
// tl(14, "{{#each ", uncapitalizeClasseNomSimple, "_.", entiteVar, "}}<td>{{.}}</td>{{/each}}");
tl(14, "{{> \"input", entiteVarCapitalise, "\" ", langueConfig.getString(ConfigCles.var_rolePourEcrire), "=", langueConfig.getString(ConfigCles.var_rolePourEcrire), " ", langueConfig.getString(ConfigCles.var_rolePourLire), "=", langueConfig.getString(ConfigCles.var_rolePourLire), "}}");
if(entiteHtmLigneVerticaleActuel) {
tl(10, "</tr>");
} else {
Expand Down Expand Up @@ -1316,13 +1317,13 @@ public void pageCodeClasseJava(String langueNom, YAMLConfiguration langueConfig)
rechercheListe = rechercheReponse.getResults();
}

wWebsocket.tl(1, "var pk = ", langueConfig.getString(ConfigCles.var_requeteApi), "['pk'];");
wWebsocket.tl(1, "var pks = ", langueConfig.getString(ConfigCles.var_requeteApi), "['pks'];");
wWebsocket.tl(1, "var ", classeVarClePrimaire == null ? classeVarCleUnique : classeVarClePrimaire, " = ", langueConfig.getString(ConfigCles.var_requeteApi), "['", classeVarClePrimaire == null ? classeVarCleUnique : classeVarClePrimaire, "'];");
wWebsocket.tl(1, "var ", classeVarClePrimaire == null ? classeVarCleUnique : classeVarClePrimaire, "s = ", langueConfig.getString(ConfigCles.var_requeteApi), "['", classeVarClePrimaire == null ? classeVarCleUnique : classeVarClePrimaire, "s'];");
wWebsocket.tl(1, "var classes = ", langueConfig.getString(ConfigCles.var_requeteApi), "['classes'];");
wWebsocket.tl(1, "var vars = ", langueConfig.getString(ConfigCles.var_requeteApi), "['vars'];");
wWebsocket.tl(1, "var empty = ", langueConfig.getString(ConfigCles.var_requeteApi), "['empty'];");
wWebsocket.l();
wWebsocket.tl(1, "if(pk != null && vars.length > 0) {");
wWebsocket.tl(1, "if(", classeVarClePrimaire == null ? classeVarCleUnique : classeVarClePrimaire, " != null && vars.length > 0) {");
wWebsocket.tl(2, "var queryParams = \"?\" + $(\".pageSearchVal\").get().filter(elem => elem.innerText.length > 0).map(elem => elem.innerText).join(\"&\");");
wWebsocket.tl(2, "var uri = location.pathname + queryParams;");
wWebsocket.tl(2, "$.get(uri, {}, function(data) {");
Expand All @@ -1333,7 +1334,7 @@ public void pageCodeClasseJava(String langueNom, YAMLConfiguration langueConfig)
wWebsocket.s(wWebsocketInput1);
wWebsocket.l();
wWebsocket.s(wWebsocketInput2);
wWebsocket.tl(4, langueConfig.getString(ConfigCles.var_jsWebsocket), classeNomSimple, "(", classeVarClePrimaire, ", vars, $response);");
wWebsocket.tl(4, langueConfig.getString(ConfigCles.var_jsWebsocket), classeNomSimple, "(", classeVarClePrimaire == null ? classeVarCleUnique : classeVarClePrimaire, ", vars, $response);");
wWebsocket.l();
wWebsocket.tl(4, "window.", StringUtils.uncapitalize(classeNomSimple), " = JSON.parse($response.find('.", langueConfig.getString(ConfigCles.var_page), langueConfig.getString(ConfigCles.var_Formulaire), " .", StringUtils.uncapitalize(classeNomSimple), "').val());");
wWebsocket.l();
Expand Down Expand Up @@ -3177,7 +3178,7 @@ else if(entiteAttribuer) {
tl(0, "{{#block \"websocket\"}}{{/block}}");
tl(3, "});");
l();
tl(3, "function ", langueConfig.getString(ConfigCles.var_jsWebsocket), classeNomSimple, "(", classeVarClePrimaire, ", vars, $response) {");
tl(3, "function ", langueConfig.getString(ConfigCles.var_jsWebsocket), classeNomSimple, "(", classeVarClePrimaire == null ? classeVarCleUnique : classeVarClePrimaire, ", vars, $response) {");
tl(0, "{{#block \"", langueConfig.getString(ConfigCles.var_jsWebsocket), "\"}}{{/block}}");
tl(3, "}");
l();
Expand Down

0 comments on commit e6ec1f3

Please sign in to comment.