j'ai quand meme un petit souci;
je recupere avec un outputText sur la meme page l'attribut "ord" qui est dans la première Table:
1 2
| <h:outputText value="#{selectedItem_ordstate.ord}" binding="#{bkOrdState.out_ord}"
id="out_ord"/> |
selectedItem_ordstate est le backign bean de mon fichier .java qui construit la première table.
Or dans la deuxième table je dois utiliser ce "ord" pour faire la requete SQL et
je fais dans la methode de construction de la deuxième table:
1 2 3 4
| String tmpOut_ord = out_ord.getValue().toString();
Long out_ord = strToLong2(tmpOut_ord)
// recuperation de l'attribut
.....fin de la requete : t.id_cc="+id_cc_stare+" and t.ord="+out_ord+"" |
or quand je charge la page pour la première fois cet attribut n'existe pas car je n'ai appuyé sur aucune ligne de la table 1...
j'ai alors:
javax.faces.FacesException: javax.servlet.ServletException: javax.faces.el.EvaluationException: Exception getting value of property list_state of base of type : appprj.backing.OrdState.......
et le code début de la deuxième table:
1 2 3 4 5 6 7 8 9
| <t:dataTable id="data_state"
rowOnMouseOver="this.style.backgroundColor=\'#A5CBFF\'"
rowOnMouseOut="this.style.backgroundColor=\'#52c6ff\'"
rowOnClick="this.style.backgroundColor=\'#FFE0E0\'"
rowOnDblClick="this.style.backgroundColor=\'#E0E0E0\'"
rows="10" styleClass="text" value="#{bkOrdState.list_state}"
var="item2" cellspacing="0" cellpadding="2" width="30%"
rendered="#{!bkOrdState.listEmpty}"
> |
Partager