日期:2014-05-16 浏览次数:20704 次
<af:document> <af:resource type="javascript" source="/customJsCode.js"/> … </af:document>
<af:document>
<af:resource type="javascript">
function customJsFunction(){
…
}
</af:resource>
…
</af:document>
<af:clientListener method="onDoubleClick" type="dblClick"/>
function onDoubleClick (event) {
var docComponment = AdfPage.PAGE.findComponentByAbsoluteId("d2");
AdfCustomEvent.queue(docComponment,
" sayHello ",
{} ,
true);
}
<af:serverListener type="sayHello" method="#{helloManagedBean.sayhello}"/>
public void sayHello(ClientEvent clientEvent){
DCIteratorBinding helloIterator = ADFUtils.findIterator("helloIterator");
Row row = helloIterator.getCurrentRow();
....
}
private void skip(String page){
ExtendedRenderKitService erks =Service.getRenderKitService(FacesContext.getCurrentInstance(),
ExtendedRenderKitService.class);
String script = "window.location.replace(\"" + page+ "\")";
erks.addScript(FacesContext.getCurrentInstance(), script);
}