You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Robert D. Morse" <rm...@mdesignz.com> on 2006/06/08 01:36:40 UTC

Dynamically adding components

I'm trying to programmatically add Tobago components to a form at run  
time.   I'm attempting to reproduce what's in the tabControl.jsp  
(found in the Tobago examples), but do it with a minimal jsp and  
creating the controls programmatically.   The reason for this is an  
application that is essentially a questionnaire.   The information  
gathered in the forms and displayed on the various tabs is determined  
by what information the user has already entered.   Any pointers to  
this type of problem and suggested solutions would be greatly  
appreciated.    Thanks!



Re: Dynamically adding components

Posted by Phan Le <pl...@xbiosystem.com>.
Robert,

Well there are references on the net of how to do it.
	http://technology.amis.nl/blog/?p=1187

In summary, what it actually does is to bind a <h:panelGrid> with  
some HtmlPanelGrid instance in your backing bean, and build  
components for that HtmlPanelGrid programmatically.

Take some extra care when you adding components dynamically into the  
HtmlPanelGrid instance as you may experience duplicate component ID  
within the view.


Have a look at
On 08/06/2006, at 9:36 AM, Robert D. Morse wrote:

> I'm trying to programmatically add Tobago components to a form at  
> run time.   I'm attempting to reproduce what's in the  
> tabControl.jsp (found in the Tobago examples), but do it with a  
> minimal jsp and creating the controls programmatically.   The  
> reason for this is an application that is essentially a  
> questionnaire.   The information gathered in the forms and  
> displayed on the various tabs is determined by what information the  
> user has already entered.   Any pointers to this type of problem  
> and suggested solutions would be greatly appreciated.    Thanks!
>
>


Re: Dynamically adding components

Posted by Phan Le <pl...@xbiosystems.com>.
Robert,

Well there are references on the net of how to do it.
	http://technology.amis.nl/blog/?p=1187

In summary, what it actually does is to bind a <h:panelGrid> with  
some HtmlPanelGrid instance in your backing bean, and build  
components for that HtmlPanelGrid programmatically.

Take some extra care when you adding components dynamically into the  
HtmlPanelGrid instance as you may experience duplicate component IDs  
within the view.

On 08/06/2006, at 9:36 AM, Robert D. Morse wrote:

> I'm trying to programmatically add Tobago components to a form at  
> run time.   I'm attempting to reproduce what's in the  
> tabControl.jsp (found in the Tobago examples), but do it with a  
> minimal jsp and creating the controls programmatically.   The  
> reason for this is an application that is essentially a  
> questionnaire.   The information gathered in the forms and  
> displayed on the various tabs is determined by what information the  
> user has already entered.   Any pointers to this type of problem  
> and suggested solutions would be greatly appreciated.    Thanks!
>
>