Ok Nick, thanks a lot!!!

Regards,

JV

 


De: Hagen, Nicholas [mailto:[EMAIL PROTECTED]
Enviado el: miércoles, 30 de agosto de 2006 17:17
Para: MyFaces Discussion
Asunto: RE: Facet Object creation...

 

Facets are just UIComponents that are stored on the parent in the facet map.  To add a facet to a component just do something such as:

 

// Create Facet Component

UIPanel panelComponent = (UIPanel) … // create HtmlPanelGroup or whatever is the main child component of the facet

 

// Add Facet to Parent

parentComponent.getFacets().put(“searchableLibrariesFolder”, panelComponent);

 

Nick


From: Jorge Vásquez [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 30, 2006 4:56 PM
To: 'MyFaces Discussion'
Subject: RE: Facet Object creation...

 

One more thing,

In case it helps I am referrint to the f:facet tag and I want to generate it from java:

 

Ex.

                  <f:facet name="searchableLibrariesFolder">

                        <h:panelGroup>

                             <t:graphicImage value="#{node.iconOpen}"

                                   rendered="#{t.nodeExpanded}" style="border:0px" />

                             <t:graphicImage value="#{node.icon}"

                                   rendered="#{!t.nodeExpanded}" style="border:0px" />

                             <h:outputText value="#{node.description}" styleClass="nodeFolder" />

                        </h:panelGroup>

                  </f:facet>

Regards,

JV


De: Jorge Vásquez [mailto:[EMAIL PROTECTED]
Enviado el: miércoles, 30 de agosto de 2006 16:43
Para: [email protected]
Asunto: Facet Object creation...

 

Hi,

I´ve been searching for a class that extends from UIComponent, that is the one that implements the facelet element, since I have no idea on how to create a facet from java.

 

For example to create an HtmlOuputText the procedure is the following :

 

HtmlOutputText outputText = (HtmlOutputText) FacesContext.getCurrentInstance().getApplication(HtmlOutputText.COMPONENT_TYPE);

 

And then you add it to the parent with the getChildren().add and so on…(I am using the approach of generating some GUI objects on java code in combination with the binding attribute)

 

I have no idea on how to create facet objects in a similar manner, any ideas?

 

Regards to all,

JV

 

 

 

 

Reply via email to