简体   繁体   中英

How to insert xhtml-facelets in UIComponent (e.g. PanelGroup) programmatically

I have a panelGroup with a binding

<h:panelGroup binding="#{myBean.content}"/>

The bean MyBean has a method getContent which returns an HtmlPanelGroup.

Now I would like to load the content of an xhtml-facelet into this HtmlPanelGroup object. Is this possible? Perhaps with a method like

return htmlPanelGroup.add(JSFUtils.load("my/div/content.xhtml"));

Regards, Rokko

This doesn't make sense. Just use <ui:include> to include Facelets.

<ui:include src="#{myBean.content}" />

return "/my/div/content.xhtml";

See also:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM