Hi all, I am developing an JSF application but I encoutered a strange behavior while binding one selectonemenu.
I have one request bean "foobean" and this JSF code: <h:panelGroup rendered="#{mycond}"> <h:outputText value="Hi 1" /> <h:selectOneMenu value="otherfoobean.property" binding="#{foobean.foobind}" >.... </h:selectOneMenu> </h:panelGroup> <h:panelGroup rendered="#{mycond2}"> <h:outputText value="Hi 2" /> <h:selectOneMenu value="otherfoobean2.property" binding="#{foobean.foobind}" >.... </h:selectOneMenu> </h:panelGroup> when mycond is true and mycond2 is false the selectonemenu disappear because (I think) also if mycond2 is false the binding in the second selectOneMenu is anyway done ( I debbuged get/set methods and I saw that in the second binding operation is called get method). If I remove the second binding attribute, it works. I need, to avoid duplication of request bean, to bind the same bean to different components ( in my code is impossible two conditions are true in the same time so at least I bind one componet at time). Why? I don't undestand if the rendered condition is false, why the code is anyway processed? I am using Myfaces 2.1.0 -- Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it: http://www.email.it/f Sponsor: Hotel Milano Marittima 4 stelle, direttamente sul mare con accesso diretto alla spiaggia, offre ai propri clienti cortesia, servizio, comfort e professionalita'. Tutti gli ambienti sono climatizzati. Gratis III e IV letto per tutta l'estate Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=11768&d=20110830 -- Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f Sponsor: Centinaia di Idee Regalo a partire da 1 euro! Su MisterCupido.com alta qualita' a prezzi imbattibili... e spedizioni in 2/3 giorni! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=11452&d=30-8