Replies: 1 comment
-
Lösungsweg:
Beispiel: <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 2.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml2.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:jsf="http://xmlns.jcp.org/jsf" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://xmlns.jcp.org/jsf/passthrough">
<head jsf:id="head">
...
</head>
<body jsf:id="body">
<h:form id="form">
<kol-input-text _id="form:inputText_kol" _value="#{model.suchString}" _required="true" _type="text">
#{msg.suche_suche_Text}</kol-input-text>
<input type="hidden" jsf:id="inputText_html" jsf:value="#{model.suchString}" />
<button jsf:id="submit_html" jsf:action="#{bean.suche}">
<f:ajax execute="form:inputText_html" render="@form messages" />
#{msg.allg_suchen}
</button>
</h:form>
<script>
const hiddenInput = document.getElementsByName("form:inputText_html")[0];
// setTimeout(() => {
const kolInput = document.querySelector("kol-input-text");
kolInput._on = {
onChange: (event, value) => {
hiddenInput.setAttribute("value", value);
}
}
// });
</script>
</body>
</html> JSF nimmer immer die IDs. Wenn wir unser hidden-Input um ID erweitern, dann könnte es auch out-of-the-box gehen. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Aktuell wird auch die Verwendung im JSF/PrimeFace-Kontext evaluiert.
Lösungsvision:
kol-button
werden einfach in den Templates von JSF verwendetBeta Was this translation helpful? Give feedback.
All reactions