This page (revision-55) was last changed on 11-Mar-2016 22:39 by Dieter Käppel

This page was created on 12-Nov-2010 09:09 by Dieter Käppel

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
55 11-Mar-2016 22:39 23 KB Dieter Käppel to previous
54 11-Mar-2016 22:39 23 KB Dieter Käppel to previous | to last
53 09-Jan-2014 11:04 23 KB Dieter Käppel to previous | to last
52 27-Jul-2013 13:25 23 KB Dieter Käppel to previous | to last
51 24-Jul-2013 19:50 23 KB Dieter Käppel to previous | to last
50 23-Jul-2013 08:35 23 KB Dieter Käppel to previous | to last
49 08-Jul-2013 19:14 21 KB Dieter Käppel to previous | to last
48 11-Jun-2013 12:50 20 KB Dieter Käppel to previous | to last
47 26-Apr-2013 11:13 19 KB Dieter Käppel to previous | to last
46 26-Apr-2013 11:11 18 KB Dieter Käppel to previous | to last
45 26-Apr-2013 07:42 16 KB Dieter Käppel to previous | to last
44 26-Feb-2013 13:12 16 KB Dieter Käppel to previous | to last
43 18-Dec-2012 12:30 16 KB Dieter Käppel to previous | to last
42 16-Dec-2012 21:18 16 KB Dieter Käppel to previous | to last
41 16-Dec-2012 14:25 15 KB Dieter Käppel to previous | to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 22 added 74 lines
!AJAX Status
Die Component zeit den AJAX-Status an.
{{{
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:composite="http://java.sun.com/jsf/composite"
>
<composite:interface>
<composite:attribute name="onbegin"/>
<composite:attribute name="oncomplete"/>
<composite:attribute name="onsuccess"/>
<composite:attribute name="onerror"/>
</composite:interface>
<composite:implementation>
<script type="text/javascript">
function updateBusyStatus(data) {
<c:if test="#{cc.facets.begin != null}">
document.getElementById('#{cc.clientId}:begin').style.visibility =
data.status == 'begin' ? 'visible' : 'hidden';
</c:if>
<c:if test="#{cc.facets.complete != null}">
document.getElementById('#{cc.clientId}:complete').style.visibility =
data.status == 'complete' ? 'visible' : 'hidden';
</c:if>
<c:if test="#{cc.facets.success != null}">
document.getElementById('#{cc.clientId}:success').style.visibility =
data.status == 'success' ? 'visible' : 'hidden';
</c:if>
<c:if test="#{cc.facets.error != null}">
document.getElementById('#{cc.clientId}:error').style.visibility =
data.status == 'error' ? 'visible' : 'hidden';
</c:if>
}
jsf.ajax.addOnEvent(updateBusyStatus);
</script>
<c:if test="#{cc.facets.begin != null}">
<div id="#{cc.clientId}:begin" style="visibility: hidden;">
<composite:renderFacet name="begin"/>
</div>
</c:if>
<c:if test="#{cc.facets.complete != null}">
<div id="#{cc.clientId}:complete" style="visibility: hidden;">
<composite:renderFacet name="complete"/>
</div>
</c:if>
<c:if test="#{cc.facets.success != null}">
<div id="#{cc.clientId}:success" style="visibility: hidden;">
<composite:renderFacet name="success"/>
</div>
</c:if>
<c:if test="#{cc.facets.error != null}">
<div id="#{cc.clientId}:error" style="visibility: hidden;">
<composite:renderFacet name="error"/>
</div>
</c:if>
</composite:implementation>
</html>
}}}
Verwendung zum Beispiel wie folgt:
{{{
<test:ajaxStatus>
<f:facet name="begin">
<h:graphicImage id="busyStatus" value="/images/wait30trans.gif"/>
</f:facet>
</test:ajaxStatus>
}}}