Edited Question ...
Hello,
I would like to download the .xhtml file of my composite component from a bean backup and add it to the page dynamically. The name of the .xhtml file is in the form of a variable.
Example:.
public MyBean (){ String componentFile = "myCompositeComponent.xhtml" public String addComponentToPage(){ //how do that?... return null; } }
Thank!
. . JSF, . @FacesComponent , UIComponent, @FacesRenderer. , , , , .
@FacesComponent
UIComponent
@FacesRenderer
- rendered.
rendered
<my:component1 rendered="#{bean.myComponentType == 'component1'}" /> <my:component2 rendered="#{bean.myComponentType == 'component2'}" /> <my:component3 rendered="#{bean.myComponentType == 'component3'}" /> ...
, , Facelets, .
, bean. , , AJAX reRender.
, :
<h:panelGroup id="composite" rendered="#{myBean.renderComponent}"> <my:compositecomponent/> </h:panelGroup>
renderComponent boolean. reRender composite , , Richfaces <a4j:commandLink>.
renderComponent
boolean
composite
<a4j:commandLink>
, ,
Source: https://habr.com/ru/post/1772532/More articles:Mercurial: Merging between branches ... Forward? - version-controlHudson SVN Checkout errors often occur on VMWare virtual machines - svnWhy is margin-top applied to the contained element here? - htmlJQuery click () function in for loop shows unexpected behavior - javascriptRemoving alphabets from a string - c #HttpWebRequest with POST and GET at the same time - redirectDelete line from CSV file - phpQApplication in unicode - c ++Google Maps - Pre-Geocoding Many Addresses? - google-mapsUnable to figure out how to determine if SimpleXML node is empty - xmlAll Articles