Dynamic Variable Available in EL?
oguzyalcin.oguzhanyalcin.gazi.edu.tr Mar 23, 2009 4:39 PMHi,
I have a component(facelet) fro buttons viewed on a page. This components renders the buttons on a page according to the permissions. On every module this components displays buttons like Save,Edit,Delete...
The buttons.xhtml is below:
<f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:richfaces="http://richfaces.ajax4jsf.org/rich" xmlns:ajax="https://ajax4jsf.dev.java.net/ajax" xmlns:a4j="http://richfaces.org/a4j" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:c="http://java.sun.com/jstl/core" xmlns:rich="http://richfaces.org/rich"> <rich:panel> <div id="MainContainer"> <div id="LeftContainer"> <s:button id="BackButton" action="#{HomeEntity.update}" value="Back" /> </div> <div id="CenterContainer"> <s:button id="UpdateButton" action="#{HomeEntity.update}" value="Update" rendered="#{HomeEntity.managed}" disabled="#{!HomeEntity.wired}"/> <s:button id="SaveButton" action="#{HomeEntity.persist}" value="Save" rendered="#{!HomeEntity.managed}" disabled="#{!HomeEntity.wired}" /> <s:button id="AddButton" action="#{HomeEntity.update}" value="New" /> <s:button id="ViewButton" action="#{HomeEntity.update}" value="View" /> <s:button id="EditButton" action="#{HomeEntity.update}" value="Edit" /> <s:button id="DeleteButton" action="#{#{HomeEntity}.update}" value="Delete" /> <s:button id="PrintButton" action="#{HomeEntity.update}" value="Print" /> </div> <div id="RightContainer"> <s:button id="ForwardButton" action="#{HomeEntity.update}" value="Forward" /> </div> <br clear="both" /> </div> </rich:panel> </f:view>
I call the component from other components like:
<ui:include src="/UC/common/Buttons.xhtml" > <ui:param name="HomeEntity" value="#{registryHome}" /> </ui:include>
If the form uses healthHome class I want to pass healtHome class and use it on the component with the name HomeEntity. for example I pass registryHome to HomeEntity variable as displayed above . registryHome has several methods. I want to call registryHome.persist by simply typing HomeEntity.persist to h:commandbuttons action property as shown in the buttons.xhtml. Is stg like #{#{EntityHome}.persist} available with EL?
Thanks