Bonjour tt le monde, svp j'ai un probleme qui me bloque si qlq1 peut m'aider:
je dois remplir un formulaire dans un modalPanel et valider apres un inputText doit etre rafraichit,
Code du modalPanel:
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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
  <a4j:region>
  <rich:modalPanel autosized="true" styleClass="tile" id="panel_codeServices" width="800" height="360" style="background-color:#BAD9EF">
  <h:form>
  <table>
  <rich:panel bodyClass="instance" styleClass="tile" 
style="border:1;border-color:black" header="Service Code Assignments">
  <table width="100%" class="tile" >
  <tr>
  <td >
  <rich:panel styleClass="tile" style="border:1;border-color:white">
     <table class="tile" style="width : 225px; height : 192px;" >
     <h:outputLabel styleClass="instance" value="#{msg.cardProduct_Position1}">  </h:outputLabel>
     <tr style=" height : 192px;">
     <td valign="top">
      <h:selectOneRadio id="p1" value="#{CardProductBackingBean.pos1}" layout="pageDirection" >
      		        <f:selectItem itemLabel="#{msg.gen_international}" itemValue="0"/>  
      		        <f:selectItem itemLabel="#{msg.gen_international} & #{msg.Gen_chipCard}" itemValue="1" /> 
                    <f:selectItem itemLabel="#{msg.Gen_national}" itemValue="2"/>
                    <f:selectItem itemLabel="#{msg.Gen_national} & #{msg.Gen_chipCard}" itemValue="3"/>
            </h:selectOneRadio>
     </td>
       </tr>
 
  </table>
  </rich:panel>
 
       <td >
       <rich:panel styleClass="tile" style="border:1;border-color:white">
     <table class="tile" style="width : 225px; height : 185px;">
     <h:outputLabel styleClass="instance" value="#{msg.cardProduct_Position2}"> </h:outputLabel>
     <tr style=" height : 191px;">
     <td valign="top">
     <h:selectOneRadio layout="pageDirection" value="#{CardProductBackingBean.pos2}" id="p2">
      		        <f:selectItem itemLabel="#{msg.cardProduct_normal}" itemValue="0"/>  
      		        <f:selectItem itemLabel="#{msg.cardProduct_byIssuer}" itemValue="1"/>                 
                    <f:selectItem itemLabel="#{msg.cardProduct_byIssuerUnless}" itemValue="2"/></h:selectOneRadio>
       </td>
       </tr>
 
  </table>
  </rich:panel>
<td>
      <rich:panel styleClass="tile" style="border:1;border-color:white">
     <table class="tile" style="height : 195px; width : 225px;">
     <h:outputLabel styleClass="instance" value="#{msg.cardProduct_Position3}"> </h:outputLabel>
     <tr>
     <td valign="top">
     <h:selectOneRadio  layout="pageDirection" id="p3" value="#{CardProductBackingBean.pos3}">
      		        <f:selectItem itemLabel="#{msg.cardProduct_noRestrictions} & #{msg.cardProduct_pinRequired}" itemValue="0"/>  
      		        <f:selectItem itemLabel="#{msg.cardProduct_noRestrictions}" itemValue="1"/>       		        
      		        <f:selectItem itemLabel="#{msg.cardProduct_goodsAndServices}" itemValue="2"/>                 
                    <f:selectItem itemLabel="#{msg.cardProduct_atmOnly} & #{msg.cardProduct_pinRequired} " itemValue="3"/>  
                    <f:selectItem itemLabel="#{msg.cardProduct_cashOnly}" itemValue="4"/>
                    <f:selectItem itemLabel="#{msg.cardProduct_goodsAndServices} & #{msg.cardProduct_pinRequired}" itemValue="5"/>   
                    <f:selectItem itemLabel="#{msg.cardProduct_noRestrictions} & #{msg.cardProduct_prompt}" itemValue="6"/>
                    <f:selectItem itemLabel="#{msg.cardProduct_goodsAndServices} & #{msg.cardProduct_prompt}" itemValue="7"/>                                       
            </h:selectOneRadio>
       </td>
       </tr>
 
  </table>
  </rich:panel>
 
       </tr>
 
  </table>
  </rich:panel>
  <rich:panel styleClass="tile" style="border:1;border-color:black">
  <table>
  <td width="186"></td>
  <td width="315">
  <a4j:commandButton
onclick="Richfaces.hideModalPanel('panel_codeServices')"
image="/images/button_back.png"/>
  </td>
  <td>
  <a4j:commandButton
 
onclick="Richfaces.hideModalPanel('panel_codeServices')"
image="/images/button_validate.png"
 action="#{CardProductBackingBean.returnServiceCode}" limitToList="true" 
reRender="serviceCode"  >
  </a4j:commandButton>
  </td>
  </table>
     </rich:panel>
 
 
 
 
 
</table>
</h:form>
  </rich:modalPanel>	
  </a4j:region>
Code de l'inputText:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
<h:inputText id="serviceCode" value="#{CardProductBackingBean.serviceCode}" styleClass="inputTextWording" style=" width : 53px;">
et voici le code de l'action:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
public void returnServiceCode() {
 
 
	      this.serviceCode = this.pos1 + this.pos2 + this.pos3;
	    	System.out.println("merci");
	    	System.out.println(serviceCode);
 
 
		}
le Probleme c ke k'on je fai le debogage l'action dans a4j:commandButton s'execute et je trouve le "serviceCode" qui doi etre afficher dans mon inputText mais il ne passe pas par getServiceCode pour faire le rerender et le champ ne se rafraichit pas,
je dois aussi signaler ke mon bean est en request
Merci pour votre aide