myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angel Miralles Arevalo <anmiral...@yahoo.es>
Subject Re: Render attribute
Date Fri, 06 Jul 2007 10:31:50 GMT
You are right, my managed bean has request scope. 

It doesn't work, inputHidden is before panelGrid in view -> "booleanProperty" = true when
I make a debug but "property" is still null. 

I don't undestand it very well... all components have rendered attribute but you can't use
it because you won't have request parameters, so it seems to be useless. 

Thanks anyway, I'll have to show the detail at first although it will be empty.


----- Mensaje original ----
De: David Delbecq <delbd+jakarta@oma.be>
Para: MyFaces Discussion <users@myfaces.apache.org>
Enviado: viernes, 6 de julio, 2007 12:00:49
Asunto: Re: Render attribute


If your #{bean} is request scoped, that can indeed be a problem (value
reset to false at begin of request). Try to set
<h:inputHidden value="#{bean.booleanProperty}" immediate="true">
This will normally validate and transfert the value of field to backing
bean during it's apply request value phase.
Ensure inputHidden is before panelGrid in view so that, during the grid
apply request value phase, value is correctly set.

Or store datas about hidden / visible state of panels in a session
scoped bean.
En l'instant précis du 06/07/07 11:36, Angel Miralles Arevalo
s'exprimait en ces termes:
> And how can I set "rendered" attribute true at these phases
> (validation and apply request)?
>  
> I have a <h:inputHidden value="#{bean.booleanProperty}"> outside
> panelGrid. I think it solve the second question (apply request phase). 
>  
> Thank you for your answer.
>
> ----- Mensaje original ----
> De: David Delbecq <delbd+jakarta@oma.be>
> Para: MyFaces Discussion <users@myfaces.apache.org>
> Enviado: viernes, 6 de julio, 2007 11:17:30
> Asunto: Re: Render attribute
>
> Hi,
>
> upon submit, during validation phase (the phase that transmit from
> component internal state to backing bean) the 'rendered' attribute of
> panelGrid is evaluated. If at that time it's 'rendered' attribute is
> false, none of it's child participate in the validation phase. The value
> of rendered must be true at validation phase for it's submitted value to
> be transmitted from inputtext to backingbean.
> The same rule applies to the "apply request value" phase, where browser
> submitted value are transfered from http request to component internal
> state.
>
> En l'instant précis du 06/07/07 10:55, Angel Miralles Arevalo
> s'exprimait en ces termes:
> > Hi everybody, I have the following code:
> >  
> > <h:panelGrid rendered="#{bean.booleanProperty}">
> >     <h:inputText value="#{bean.property}"/>
> > </h:panelGrid>
> >  
> > I can't send "property" by request. Alway is null because of the
> > panelGrid rendered attribute Anybody can explain me why is this
> > happening and how can I solve this?
> >  
> > I'm using this scenario in order to show/hide a list's detail.
> >  
> > Thank you very much.
> >
> > ------------------------------------------------------------------------
> >
> > Sé un Mejor Amante del Cine
> > ¿Quieres saber cómo? ¡Deja que otras personas te ayuden!
> >
> <http://us.rd.yahoo.com/mail/es/tagline/beabetter/*http://advision.webevents.yahoo.com/reto/entretenimiento.html>.
>
>
> ------------------------------------------------------------------------
>
> Sé un Mejor Amante del Cine
> ¿Quieres saber cómo? ¡Deja que otras personas te ayuden!
> <http://us.rd.yahoo.com/mail/es/tagline/beabetter/*http://advision.webevents.yahoo.com/reto/entretenimiento.html>.


	
	
		
______________________________________________ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com
Mime
View raw message