<f:ajax>
tag.classpath=jviews-jsf2-facelets-support.jar; jviews-xxx-all.jar
ajaxInteractor
to
allow you to trigger the partial page rendering (PPR) feature of JSF 2 without using the <f:ajax>
tag.ajaxInteractor
allows
you to trigger PPR actions to other JSF 2 components that you
specify. When the user clicks a view that has an ajaxInteractor
attached
to it, a jsf.ajax.request()
query is sent
and JSF 2 components with specified IDs are re-rendered without the
need to refresh the entire page.Name |
Required |
Type |
Description |
---|---|---|---|
id |
true |
java.lang.String |
The ID of this component. |
render |
true |
java.lang.String |
The IDs of the components to be rendered by
the ajaxInteractor . This component sends
a jsf.ajax.request() query to enable the
JSF 2 to re-render the specified components.Separate
multiple IDs to be rendered with a space. |
ajaxInteractor
,
you must ensure that the JSF 2 Ajax JavaScript library
has been imported on your page.<h:outputScript name="jsf.js" library="javax.faces" target="head" />
ajaxInteractor
can be
combined with any other interactor by using the interactorGroup
. ajaxInteractor
can
be combined with other interactors: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jvf="http://www.ilog.com/jviews/tlds/jviews-framework-faces.tld" xmlns:jv="http://www.ilog.com/jviews/tlds/jviews-faces.tld" > <h:body> <h:form prependId="false" id="helloForm"> <h:outputScript name="jsf.js" library="javax.faces" target="head" /> <h:outputText id="out1" value="#{count1.number}" /> <h:outputText id="out2" value="#{count1.number}" /> <jvf:objectSelectInteractor id="select" valueChangeListener="#{frameworkBean.selectObject}" invocationContext="IMAGE_SERVLET_CONTEXT" /> <jv:ajaxInteractor id="ajax" render="out1 out2" /> <jv:interactorGroup id="interactorGroup" interactors="select ajax" /> <jvf:view id="view" style="width:500px;height:300px" view="#{frameworkBean.view}" interactorId="interactorGroup" /> </h:form> </h:body>
h:panelGrid
and
render the id
of this panelGrid
.<h:commandButton id="button1" value="diagrammer" onclick="jsf.ajax.request(this,event,{render:'diagrammer_panelgrid'});return false;" /> <h:panelGrid id="diagrammer_panelgrid"> <jvdf:diagrammerView id="diagrammer" style="width:500px;height:300px" data="/data/molecule.idpr"/> </h:panelGrid>