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 46
|
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="/WEB-INF/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="/WEB-INF/tags/struts-html" prefix="html"%>
<%@ taglib uri="/WEB-INF/tags/struts-bean" prefix="bean"%>
<html>
<head>
<script src='http://localhost:8080/ThinClient/dwr/interface/Tranche.js'></script>
<script src='http://localhost:8080/ThinClient/dwr/engine.js'></script>
<script src='http://localhost:8080/ThinClient/dwr/util.js'></script>
<script type="text/javascript">
function updateTranches() {
var site = dwr.util.getValue("site");
Tranche.tranches(site, function(data) {
dwr.util.setValue("resultat", data);
});
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<html:form action="choix.do">
<html:select property="site" onchange="updateTranches()">
<html:options collection="sites" property="id" labelName="Site Id" />
</html:select>
<!-- Construire dynamiquement la liste des tranches grace à la collection retournée... -->
<html:select property="tranche">
<html:options name="resultat" collection="????ici je dois mettre la collection retourné par DWR mais comment faire ????" property="id"
labelName="Tranche Id" />
</html:select>
<html:submit value="Send"></html:submit>
</html:form>
</body>
</html> |
Partager