List Info

Thread: Ajax4Jsf reRender attribute reRender entire form




Ajax4Jsf reRender attribute reRender entire form
user name
2007-10-16 18:04:14

I have a situation where reRender attribute reRenders the whole form. Here is the snippet
<a4j:outputPanel>
  ; &nbsp;<h:inputText ; id="description" size="75" value="#{manageAddrBlkBean.addressBlock.description}" >
 &nbsp; &nbsp; &lt;a4j:support event="onfocus" reRender="usrGrpList"/>
 ; &nbsp; <;/h:inputText>
</a4j:outputPanel>
The moment inputText component gets the Focus the JSF form hangs for a while then i observed from the Log file its reRendering the whole form
The reRender happens on closing of pop-up window as shown in the following snippet
&lt;a4j:region>
 ;   <h:panelGrid columns="4" styleClass="detail" columnClasses="label"> &nbsp;  &nbsp;
 &nbsp;<h:outputText value="Users/User Group" /> ;
 &nbsp; &nbsp;  &nbsp;
 &nbsp;<h:selectOneMenu id="usrGrpList" value="#{manageAddrBlkBean.selectedUserGroup}"  >   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;
 &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; <f:selectItem itemLabel="" itemValue="" />
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  <f:selectItems value="#{manageAddrBlkBean.userGroupList}" />  &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; 
 &nbsp; &nbsp; </h:selectOneMenu&gt; &nbsp;
 &nbsp; &nbsp;  &nbsp; 
 &nbsp; &nbsp; <h:commandButton id="findUserAndGroup" value="Manage User/UserGroup" immediate="true"
&nbsp; &nbsp;  &nbsp;  &nbsp; &nbsp; &nbsp;onmousedown="createPopUp('userAndGroupLookup','find')"
 &nbsp;     &nbsp; &nbsp; &nbsp; &nbsp; onclick="return false">  ;     &nbsp; &nbsp; &nbsp; &nbsp;  
 &nbsp;</h:commandButton>
 ; &nbsp;  <h:message for="usrGrpList" />
&nbsp; &nbsp; &nbsp; &nbsp;   
 &nbsp;  </h:panelGrid>&nbsp;   ; &nbsp;
 &nbsp; &nbsp; </a4j:region>&nbsp;
Any pointers/suggestions&nbsp; to avoid reRendering of whole form using a4j reRender attribute will be highly appreciated


Building a website is a piece of cake.
Yahoo! Small Business gives you all the tools to get online.
Re: Ajax4Jsf reRender attribute reRender entire form
user name
2007-10-16 23:46:59
try adding:

* selfRendered="false" renderRegionOnly=&quot;false&quot; in a4j:region
* ajaxSingle="true" in a4j:support


<a4j:region selfRendered="false" renderRegionOnly=&quot;false&quot;>
&nbsp;  ...
   <a4j:support ajaxSingle="true" .../>
&lt;/a4j:region>


On 10/17/07, Bansilal Haudakari < mail2bansiyahoo.com"> mail2bansiyahoo.com> wrote:

I have a situation where reRender attribute reRenders the whole form. Here is the snippet
<a4j:outputPanel>;
 &nbsp; &nbsp;<h:inputText&nbsp; id="description&quot; size=";75" value=&quot;#{manageAddrBlkBean.addressBlock.description}" >
 &nbsp; &nbsp; &lt;a4j:support event=&quot;onfocus&quot; reRender=&quot;usrGrpList"/>
&nbsp; &nbsp; &lt;/h:inputText>
<;/a4j:outputPanel>
The moment inputText component gets the Focus the JSF form hangs for a while then i observed from the Log file its reRendering the whole form
The reRender happens on closing of pop-up window as shown in the following snippet
&lt;a4j:region>
 ;   <h:panelGrid columns=&quot;4" styleClass="detail" columnClasses="label"&gt; &nbsp;  &nbsp;
  <h:outputText value=&quot;Users/User Group"; /> ;
 &nbsp; &nbsp;  &nbsp;
 &nbsp;<h:selectOneMenu id="usrGrpList&quot; value=&quot;#{manageAddrBlkBean.selectedUserGroup}&quot;  >   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;
 &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; <f:selectItem itemLabel=""; itemValue=""; />
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  <f:selectItems value=&quot;#{manageAddrBlkBean.userGroupList }" />  &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; 
 &nbsp; &nbsp; </h:selectOneMenu&gt; &nbsp;
 &nbsp; &nbsp;  &nbsp; 
 &nbsp; &nbsp; <h:commandButton id="findUserAndGroup" value=&quot;Manage User/UserGroup" immediate="true&quot;
&nbsp; &nbsp;  &nbsp;  &nbsp; &nbsp; &nbsp;onmousedown="createPopUp('userAndGroupLookup',9;find')"
&nbsp; &nbsp;    &nbsp; &nbsp; &nbsp; &nbsp; onclick=&quot;return false";>   ;    &nbsp; &nbsp; &nbsp; &nbsp;  
 &nbsp;</h:commandButton>
 ; &nbsp;  <h:message for="usrGrpList&quot; />
&nbsp; &nbsp;   ; &nbsp; &nbsp; 
 &nbsp;  </h:panelGrid>&nbsp;   ; &nbsp;
 &nbsp; &nbsp; </a4j:region>&nbsp;
Any pointers/suggestions&nbsp; to avoid reRendering of whole form using a4j reRender attribute will be highly appreciated


Building a website is a piece of cake.
Yahoo! Small Business gives you all the tools to get online.


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )