You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Daniel Murley <dm...@xbiosystems.com> on 2006/06/13 12:53:04 UTC

Dynamically Changing Panel Grid

Hi There,

I have a situation where I want to switch between different panel grids on
the screen using a drop down.  So essentially I have one component bound to
the screen, and in the backing bean I want to change what that component
actually is.

This however is causing me much grief, as it seems JSF only reads the
bindings when it first renders the page.  Is this correct?  No matter what I
can't seem to be able to get it to change to another PanelGrid once its been
rendered.

Does anyone know how to best approach this?  Have I missed something crucial
here?

Thanks,

Daniel


RE: Dynamically Changing Panel Grid

Posted by Daniel Murley <dm...@xbiosystems.com>.
Howdy All,

For anyone interested, turned out that I didn't have a setter for the
panelGrid in the backing bean.

Daniel 

-----Original Message-----
From: Daniel Murley [mailto:dmurley@xbiosystems.com] 
Sent: Tuesday, 13 June 2006 11:33 PM
To: 'MyFaces Discussion'
Subject: RE: Dynamically Changing Panel Grid

Hi,

Thanks for the suggetions.  With the first option, I'm trying to keep it as
generic as possible, so it makes sense to build the components with java as
opposed to markup.  

Number 2 is where I'm really struggling, I can get the components in there
on the first render (ie. When the page loads) however after that anything I
attempt to do to the component seems to have no effect.

Daniel 

-----Original Message-----
From: Julian Ray [mailto:julianjray@yahoo.com]
Sent: Tuesday, 13 June 2006 9:36 PM
To: 'MyFaces Discussion'
Subject: RE: Dynamically Changing Panel Grid

Hi Daniel

Here are a couple of things you could try

[1] Your page includes all the components but you use the rendered=""
attribute on each panel using EL or a backing bean to determine if a
particular panel should be rendered

[2] Dynamically create the contents of the panel using a backing bean and
adding components directly to the panel via a binding. 

-----Original Message-----
From: Daniel Murley [mailto:dmurley@xbiosystems.com]
Sent: Tuesday, June 13, 2006 6:53 AM
To: 'MyFaces Discussion'
Subject: Dynamically Changing Panel Grid

Hi There,

I have a situation where I want to switch between different panel grids on
the screen using a drop down.  So essentially I have one component bound to
the screen, and in the backing bean I want to change what that component
actually is.

This however is causing me much grief, as it seems JSF only reads the
bindings when it first renders the page.  Is this correct?  No matter what I
can't seem to be able to get it to change to another PanelGrid once its been
rendered.

Does anyone know how to best approach this?  Have I missed something crucial
here?

Thanks,

Daniel


RE: Dynamically Changing Panel Grid

Posted by Daniel Murley <dm...@xbiosystems.com>.
Hi,

Thanks for the suggetions.  With the first option, I'm trying to keep it as
generic as possible, so it makes sense to build the components with java as
opposed to markup.  

Number 2 is where I'm really struggling, I can get the components in there
on the first render (ie. When the page loads) however after that anything I
attempt to do to the component seems to have no effect.

Daniel 

-----Original Message-----
From: Julian Ray [mailto:julianjray@yahoo.com] 
Sent: Tuesday, 13 June 2006 9:36 PM
To: 'MyFaces Discussion'
Subject: RE: Dynamically Changing Panel Grid

Hi Daniel

Here are a couple of things you could try

[1] Your page includes all the components but you use the rendered=""
attribute on each panel using EL or a backing bean to determine if a
particular panel should be rendered

[2] Dynamically create the contents of the panel using a backing bean and
adding components directly to the panel via a binding. 

-----Original Message-----
From: Daniel Murley [mailto:dmurley@xbiosystems.com]
Sent: Tuesday, June 13, 2006 6:53 AM
To: 'MyFaces Discussion'
Subject: Dynamically Changing Panel Grid

Hi There,

I have a situation where I want to switch between different panel grids on
the screen using a drop down.  So essentially I have one component bound to
the screen, and in the backing bean I want to change what that component
actually is.

This however is causing me much grief, as it seems JSF only reads the
bindings when it first renders the page.  Is this correct?  No matter what I
can't seem to be able to get it to change to another PanelGrid once its been
rendered.

Does anyone know how to best approach this?  Have I missed something crucial
here?

Thanks,

Daniel


RE: Dynamically Changing Panel Grid

Posted by Julian Ray <ju...@yahoo.com>.
Hi Daniel

Here are a couple of things you could try

[1] Your page includes all the components but you use the rendered=""
attribute on each panel using EL or a backing bean to determine if a
particular panel should be rendered

[2] Dynamically create the contents of the panel using a backing bean and
adding components directly to the panel via a binding. 

-----Original Message-----
From: Daniel Murley [mailto:dmurley@xbiosystems.com] 
Sent: Tuesday, June 13, 2006 6:53 AM
To: 'MyFaces Discussion'
Subject: Dynamically Changing Panel Grid

Hi There,

I have a situation where I want to switch between different panel grids on
the screen using a drop down.  So essentially I have one component bound to
the screen, and in the backing bean I want to change what that component
actually is.

This however is causing me much grief, as it seems JSF only reads the
bindings when it first renders the page.  Is this correct?  No matter what I
can't seem to be able to get it to change to another PanelGrid once its been
rendered.

Does anyone know how to best approach this?  Have I missed something crucial
here?

Thanks,

Daniel