How to skip child component during ajax rendering of parent component?

I am using RichFaces. When I ajax-render a <rich:panel> , I do not want to display the <h:inputText> this panel. For instance:

 <rich:panel id="A"> <h:inputText id="B" value="B" ></h:inputText> <h:inputText id="C" value="C" ></h:inputText> <h:inputText id="D" value="D" ></h:inputText> ... <a4j:commandButton id="button" value="click me" render="A" /> </rich:panel> 

When I click the button, I intend to display the panel with id = "A", but I do not want to display the input text with id = "B". How can I display this entire region except the input text with id = "B"?

+4
source share
1 answer

INMO

You have to add a wrapper to C and D and make it like this

 <h:panelGroup id="CD"> <h:inputText id="C" value="C" ></h:inputText> <h:inputText id="D" value="D" ></h:inputText> </h:panelGroup> <a4j:commandButton id="button" value="click me" render="CD" /> 

Or just specify your identifiers directly in the render attribute, e.g.

 <a4j:commandButton id="button" value="click me" render="CD" /> 
+1
source

Source: https://habr.com/ru/post/1436099/


All Articles