Bonjour,

Dans mon application JSF je possède une applet invisible qui permet de créer les backing bean. Par exemple, cette applet créer un objet user qui sert à afficher les données de l'utilisateur dans une table RichFaces. L'objet est envoyé par requête http à la servlet réceptrice.
Le problème est que l'applet se charge de façon asynchrone par rapport au HTML, du coup quand la table RF veut afficher les données, celles-ci n'ont pas encore été envoyé par l'applet qui n'est pas chargée complètement. J'obtiens alors une erreur 500.
org.apache.jasper.JasperException: javax.servlet.ServletException: /xhtml/welcome.xhtml @25,109 value="#{user.keysList}": Error reading 'keysList' on type com.***.***.user.User
Voici mon xhtml épuré:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="fr" 
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">
<head>
  <title>***</title>
</head>
<body>	
	<applet width="0" height="0" archive="com/***/***/applet/appletClasses.jar" code="com.***.***.applet.DataApplet" codebase="http://localhost:8090/PID_CKR/resources/applet" id="applet"></applet>
	
	<ui:debug hotkey="M" />
	
  	<f:view>
  		<rich:panel header="Status" style="width:302px; margin-bottom:20px">
  			<h:graphicImage value="./resources/img/bigCheck.png" style="margin-right:50px"/>
  			<h:outputText value="** is connected" style="font-weight:bold; font-size:14px;margin-left:50px "/>
  		</rich:panel>
  		<rich:tabPanel switchType="ajax" style="margin-top:20px">
  			<rich:tab label="Check user certificate">
  				<rich:dataTable value="#{user.keysList}" var="key" style="float:left; width:250px;margin-right:230px">
  					<f:facet name="header">
  						<h:outputText value="User data"/>
					</f:facet>
					<rich:column style="width:82px">
						<f:facet name="header">Title</f:facet>
						<h:outputText value="#{key}"/>
					</rich:column>
					<rich:column>
						<f:facet name="header">Data</f:facet>
						<h:outputText value="#{user.userDataList[key]}"/>				
					</rich:column>
  				</rich:dataTable>
  				
  			</rich:tab>
  			<rich:tab label="Check user keys certificates">
  			</rich:tab>
  		</rich:tabPanel>	 
  	</f:view>
</body>
</html>
Au moment où le navigateur affiche la page la keylist vaut nul car l'applet n'a pas encore envoyé les données.

Avez-vous une idée pour faire en sorte que l'applet se charge avant le html?