probleme h:commandButton et h:form
j'une une page jsf qui contient 2 <h:form>
Code:
1 2 3 4 5 6 7 8 9 10 11 12
|
<h:form>
<rich:tree switchType="client" value="#{library.data}" var="item"
nodeFace="#{item.type}">
...
<h:commandButton value="hh" action="#{mBeanInfoFactory.hello}"/>
...
</rich:tree>
</h:form>
le 2eme form contient aussi le meme commandbutton <h:commandButton value="hh" action="#{mBeanInfoFactory.hello}"/> |
mon probleme est que le bouton du 1er form execute la methode hello du bean mBeanInfoFactory alors que le second bouton ne fait rien.
ou est le probleme?
voici le code de la page jsf
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 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/CSS/styles.css">
<title></title>
</head>
<body>
<f:view>
<div id="entete">entete</div>
<div id="menu"><h:form>
<rich:tree switchType="client" value="#{library.data}" var="item"
nodeFace="#{item.type}">
<rich:treeNode type="dd" iconLeaf="/images/domain.gif"
icon="/images/singer.gif">
<h:outputText value="#{item.nomDomain}" />
</rich:treeNode>
<rich:treeNode type="mmm" iconLeaf="/images/mbean.gif"
nodeSelectListener="#{mBeanInfoFactory.processSelection}"
ajaxSubmitSelection="true"
icon="/images/singer.gif">
<!--<h:outputText value="#{item.nomMBean}" />-->
<h:commandLink action="#{mBeanInfoFactory.mBeanInfo}" value="#{item.nomBean}" />
<h:commandButton value="hh" action="#{mBeanInfoFactory.hello}"/>
</rich:treeNode>
</rich:tree>
</h:form></div>
<div id="contenu">
<h:form>
<rich:tabPanel switchType="client" style=" width : 1px; height : 131px;">
<rich:tab label="tab1">
<h:form>
<h:dataTable value="#{mBeanInfoFactory.listOperations}"
var="monManagedBean1" border="1">
<h:column>
<f:facet name="header">
<f:verbatim>retour</f:verbatim>
</f:facet>
<h:outputText value="#{monManagedBean1.returnType}" />
</h:column>
<h:column>
<f:facet name="header">
<f:verbatim>nomOperation</f:verbatim>
</f:facet>
<h:commandButton value="#{monManagedBean1.name}" action="#{mBeanInfoFactory.hello}"/>
</h:column>
<h:column>
<f:facet name="header">
<f:verbatim>parametres</f:verbatim>
</f:facet>
<h:dataTable value="#{mBeanInfoFactory.listOperations}" var="mBeanParameterInfo" >
<h:column><h:outputText value="#{mBeanParameterInfo.name}"/>
<h:inputText value="" />
</h:column>
</h:dataTable>
</h:column>
</h:dataTable>
</h:form>
</rich:tab>
<rich:tab label="tab2">
</rich:tab>
<rich:tab label="Info">
Info
</rich:tab>
</rich:tabPanel></h:form></div>
<div id="pied_page"><h:outputText /> </div>
</f:view>
</body>
</html> |
le code en gras dans le premier form est executé alors que dans le second il ne l'est pas