Affichage popup avant bean initialisé
Bonjour,
je me bat depuis une semaine pour trouver une solution a mon probleme mais rien a y faire.
Je dipose d'une page xhtml contenant une dataTable. Pour chaque ligne de cette dataTable, j'inclus un lien pour afficher un popup qui récapitule les certaines informations :
table.xhtml
Code:
1 2 3 4 5 6 7
| <rich:column>
<a4j:commandLink onclick="if(! isNotDblClick(this.id)) {return false;}"
onmouseover="window.latestClick = null">
<rich:componentControl for="popup" event="oncomplete" operation="show" />
<f:setPropertyActionListener value="#{commission}" target="#{selectedEvent.event}"/>
</a4j:commandLink>
</rich:column> |
cela ouvre donc mon popup qui celui ci contient 4 include :
popup.xhtml
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| <?xml version="1.0" encoding="iso-8859-1" ?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:sco="http://com.groupama/secoia/components"
xmlns:sfu="http://com.groupama/secoia/functions">
<f:view>
<h:form>
<ui:composition>
<h:panelGrid width="820px" columns="2">
<ui:include src="zone1.xhtml" />
<ui:include src="zone2.xhtml" />
<ui:include src="zone3.xhtml" />
<ui:include src="zone4.xhtml" />
</h:panelGrid>
</ui:composition>
</h:form>
</f:view>
</html> |
Dans zone1.xhtml j'affiche les valeurs de mon bean
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| <?xml version="1.0" encoding="iso-8859-1" ?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:sco="http://com.groupama/secoia/components"
xmlns:sfu="http://com.groupama/secoia/functions">
<f:view>
<h:form>
<ui:composition>
<h:panelGrid columns="1" width="400px">
<h:panelGrid width="100%">
<h:panelGrid columns="2">
<h:outputText value="#{com.eventDetails.info1}"/>
<h:outputText value="#{com.eventDetails.info2}"/>
</h:panelGrid>
</h:panelGrid>
</ui:composition>
</h:form>
</f:view>
</html> |
quand je test mon application j'ai un nullPointerException qui apparait sur info2 alors que celui ci est remplis correctement !!
J'ai donc l'impression que mon bean n'a pas eu le temps d'etre construit alors que l'affichage a déjà été fait. Y a-t-il un moyen pour demander l'affichage une fois que le bean a été construit?
Après quelques recherches sur internet, j'ai pu constater que le composant rich:componentControl pouvait poser probleme. J'ai tenté des parades avec affichTiming="onload"/"onavailable" mais rien y fait.
Si quelqu'un a une idée de comment résoudre le probleme...