Hi,

where are you searching for getChildren()?

'public abstract java.util.List getChildren()' is a method of
UIComponent and javax.faces.component.html.HtmlPanelGrid is a subclass
of UIComponent.

regards

  Volker


Sven Haiges wrote:
> hmm, strange. that's what i tried to do. but i could not find a
> getChildren() method... can you be more specific.
> 
> in the meantime i switched to a datatable, but i would consider to
> change it again.
> thanx,
> sven
> Am 01.11.2005 um 15:58 Uhr schrieb Martin Marinschek:
> 
>     Oh right, I didn't even see that.
> 
>     Of course, you need to add the text to the children list of the parent
>     component.
> 
>     regards,
> 
>     Martin
> 
>     On 11/1/05, Volker Weber <[EMAIL PROTECTED]> wrote:
> 
>         Hi,
> 
>         Sven Haiges wrote:
> 
>             thanx! i first wanted to try out the programmatic way. I
>             bound a
>             panelGrid to a managed bean property and once I get the
>             result from the
>             db, I add some outputText elements. the outputText is then
>             added to the
>             parent, I simply call setParent(productPanel) - productPanel
>             is the
>             panelGrid.
> 
>             private HtmlPanelGrid productPanel = new HtmlPanelGrid();
> 
>             ....
> 
>             if (result != null) {
>             log.debug("Rebuilding productPanel...");
>             //this.queryResults = new ListDataModel(result);
>             for (Iterator i = result.iterator(); i.hasNext();){
>             log.debug("Adding outputtext to panelgrid... ");
>             Product product = (Product)i.next();
>             HtmlOutputText text = new HtmlOutputText();
>             text.setValue(product.getOrderNumber());
>             text.setParent(this.productPanel);
>             }
> 
> 
>         you don't need to set the parent of text, but you need to add
>         the text
>         as child to productPanel.
> 
>         replace
>         text.setParent(this.productPanel);
>         with
>         this.productPanel.getChildren().add(text);
> 
>         than it shoud work.
> 
> 
> 
>             I get the log output that some components were created, but
>             nothing is
>             shown when the page is rendered. Somehow the panelGrid is
>             empty.... so
>             is it actually impossible to add elements with a method like
>             panelGrid.addChildComponent(UIComponent...)??
> 
> 
>         regards
>         Volker
>         -- 
>         Don't answer to From: address!
>         Mail to this account are droped if not recieved via mailinglist.
>         To contact me direct create the mail address by
>         concatenating my forename to my senders domain.
> 
> 
> 
> 
>     -- 
> 
>     http://www.irian.at
>     Your JSF powerhouse -
>     JSF Trainings in English and German
> 
> ---
> Sven Haiges
> [EMAIL PROTECTED]
> 
> TEL +49 89 420 958 993
> SIP [EMAIL PROTECTED]
> 

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.

Reply via email to