The jsf page below produces the error as follows. Does that mean that the ajax tag must be in the same form as the render target? Is there anyway to workaround this limitation?
SEVERE: Error Rendering View[/ajax.xhtml]
javax.faces.FacesException: contains an unknown id ‘sum’ – cannot locate it in the context of the component x
<h:body>
<h:form>
x:
<h:inputText id="x" value="#{ajax.x}">
<f:ajax event="keyup" render="sum mul"/>
</h:inputText>
<br/>
y:
<h:inputText id="y" value="#{ajax.y}">
<f:ajax event="keyup" render="sum mul"/>
</h:inputText>
<br/>
</h:form>
Sum: <h:outputText id="sum" value="#{ajax.sum}"/><br/>
Multiply: <h:outputText id="mul" value="#{ajax.multiply}"/><br/>
</h:body>
Just prefix the id with a colon
eg.
<f:ajax event="keyup" render=":sum :mul"/>See this blog post