A
anonym
Hallo,
mein Problem ist folgendes:
Ich versuche in meine xhtml datei ein kleines script zu coden, allerdings wird das script egal was ich mache nie mit in den quellcode eingebunden
XHTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich" prefix="rich">
<ui:composition template="/templates/common.xhtml">
<h:inputHidden id="timer" value="#{bean.aValue}" />
<script type="text/javascript">
/*<![CDATA[ */
function refresh() {
var limit = document.getElementsByID("timer").value;
if (limit > 0) {
setTimeout("javascript:location.reload(true)", limit);
}
/* ]]>*/
</script>
<ui:define name="body">
<h:messages class="error" />
<h:form>
<h:selectBooleanCheckbox id="autoRefreshTimer"
value="#{bean.aBooleanValue}" onchange="submit();" />
<h
utputText value="Auto-Refresh:" />
<h:inputText size="5" disabled="#{!bean.aBooleanValue}"
value="#{bean.aValue}" />
<h:commandButton onclick="javascript:refresh();" value="Accept" />
<br />
<br />
#{bean.HTML}
</h:form>
</ui:define>
</ui:composition>
</html>
mein Problem ist folgendes:
Ich versuche in meine xhtml datei ein kleines script zu coden, allerdings wird das script egal was ich mache nie mit in den quellcode eingebunden

XHTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich" prefix="rich">
<ui:composition template="/templates/common.xhtml">
<h:inputHidden id="timer" value="#{bean.aValue}" />
<script type="text/javascript">
/*<![CDATA[ */
function refresh() {
var limit = document.getElementsByID("timer").value;
if (limit > 0) {
setTimeout("javascript:location.reload(true)", limit);
}
/* ]]>*/
</script>
<ui:define name="body">
<h:messages class="error" />
<h:form>
<h:selectBooleanCheckbox id="autoRefreshTimer"
value="#{bean.aBooleanValue}" onchange="submit();" />
<h

<h:inputText size="5" disabled="#{!bean.aBooleanValue}"
value="#{bean.aValue}" />
<h:commandButton onclick="javascript:refresh();" value="Accept" />
<br />
<br />
#{bean.HTML}
</h:form>
</ui:define>
</ui:composition>
</html>