Hi, I've got a problem with ajax4jsf component commandButton.
I have one component (let's call it MyComponent. It represents just a XHTML page which is included on the page by specific tag) and one XHTML page.
The component contains an inputText (jsf component) and the commandButton(a4j component) which execute a method from the Bean.
The page contains the component MyComponent and a dataTable (RichFaces component).
When the commandButton is pressed (from MyComponent, executing the method) I need to re-render the dataTable(using attribute reRender). To do that, I need to transmit an id of the dataTable to the attribute reRender of the commandButton.
So the question is how can I do it, if the commandButton is situated in the component MyComponent(In other words: in another xhtml page) and the dataTable is situated on the page MyPage.xhtml ?
CodeSnippet:
1) MyComponent.xhtml:
="1.0"="utf-8"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.com/products/seam/taglib"
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:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<ui:composition>
......
<a4j:commandButton value="Click"
action="#{bean[method]}"
id="search"
reRender="#{reRenderTable}" />
</ui:composition>
2) MyPage.xhtml
<html>
...
xmlns:myTags=http:
xmlns:rich=http:
.....
<!-- MyComponent -->
<mytags:mycomponent xmlns:mytags="#unknown">
...
reRenderTable="table" <!-- how here to transfer the id of the dataTable -->
</mytags:mycomponent>
....
<rich:datatable id="table" xmlns:rich="#unknown">
</rich:datatable>