[richfaces-issues] [JBoss JIRA] Commented: (RF-11307) a4j:ajax doesn't render rich:datatable when it has a rendered condition.

Abdulkerim İnanmış (JIRA) jira-events at lists.jboss.org
Thu Aug 18 02:50:17 EDT 2011


    [ https://issues.jboss.org/browse/RF-11307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621813#comment-12621813 ] 

Abdulkerim İnanmış commented on RF-11307:
-----------------------------------------

This status may be an expected and normal behaviour .When page loading at first, the table does not render because of render condition.  At second rendering, the application can not render it because it is not exist. I used a panelGrid wrapping it and I rendered that panelGrid for solution. 
If you say that behaviour is a bug, not an expected situation then I will create a simple example for investigation of problem.

> a4j:ajax doesn't render rich:datatable when it has a rendered condition.
> ------------------------------------------------------------------------
>
>                 Key: RF-11307
>                 URL: https://issues.jboss.org/browse/RF-11307
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>         Environment: I am usinh richfaces 4.0 and jsf 2.04 libraries. My sample code is below.
>            Reporter: Abdulkerim İnanmış
>
> <h:panelGrid>
> 				<h:panelGrid columns="3" id="kriter"
> 					columnClasses="colPad,colPad5,colPad5,colPad5">
> 					<h:outputText value="Tarih" style="font-weight:bolder;" />
> 					<h:panelGroup>
> 						<rich:calendar value="#{adminBean.dateLow}"
> 							datePattern="d MMM,yyyy">
> 						</rich:calendar>
> 						<rich:calendar value="#{adminBean.dateHigh}"
> 							datePattern="d MMM,yyyy">
> 						</rich:calendar>
> 					</h:panelGroup>
> 					<h:selectOneRadio value="#{adminBean.okundu}" label="Okunma Durumu">
> 						<f:selectItem itemLabel="Okunanlar" itemValue="#{true}" />
> 						<f:selectItem itemLabel="Okunmamışlar" itemValue="#{false}" />
> 						<f:selectItem itemLabel="Hepsi" itemValue="#{null}" />
> 					</h:selectOneRadio>
> 				</h:panelGrid>
> 				<h:panelGrid columns="4" columnClasses="colPad5,colPad5">
> 					<h:selectOneRadio value="#{adminBean.aramaSekli}">
> 						<f:selectItem itemLabel="Konuda arama" itemValue="K" />
> 						<f:selectItem itemLabel="Genel arama" itemValue="G" />
> 					</h:selectOneRadio>
> 					<h:outputText value="Aranacak Sözcük" style="font-weight:bolder;" />
> 					<h:inputText value="#{adminBean.aranacakSozcuk}"
> 						id="aranacakSozcuk" />
> 					<h:commandButton value="Sorgula" action="#{adminBean.sorgula}"
> 						image="resources/images/search3.jpg" style="float:right;">
> 						<a4j:ajax execute="kriter" render="sonuclar"
> 							onbegin="document.getElementById('showBtn').click()"
> 							oncomplete="document.getElementById('hideBtn').click()" />
> 					</h:commandButton>
> 				</h:panelGrid>
> 			</h:panelGrid>
> 			<h:outputText value="sonuc bulunamadı"
> 				rendered="#{empty adminBean.iletisim}" />
> 			<rich:dataTable value="#{adminBean.iletisim}" var="i" id="sonuclar"
> 				rendered="#{not empty adminBean.iletisim}">
> 				<f:facet name="header">
> 					İletişim Mesajları Arama Sonuçları
> 				</f:facet>
> 				<rich:column style="width:200px;">
> 					<f:facet name="header">
> 						Konu
> 					</f:facet>
> 					<h:outputText value="#{i.konu}" rendered="#{i.okundu}" />
> 					<h:outputText value="#{i.konu}" rendered="#{not i.okundu}"
> 						style="color:red;" />
> 				</rich:column>
> 				<rich:column>
> 					<f:facet name="header">
> 						Kimden(e-posta)
> 					</f:facet>
> 					<h:outputText value="#{i.email}" />
> 				</rich:column>
> 				<rich:column>
> 					<f:facet name="header">
> 						Tarih
> 					</f:facet>
> 					<h:outputText value="#{i.tarih}">
> 						<f:convertDateTime dateStyle="medium" type="both" />
> 					</h:outputText>
> 				</rich:column>
> 				<rich:column>
> 					<h:commandLink value="Oku" action="#{adminBean.selectMessage(i)}">
> 						<a4j:ajax execute="@this" render="metin sonuclar"
> 							onbegin="beginFunc()" oncomplete="completeFunc()" />
> 					</h:commandLink>
> 				</rich:column>
> 				<rich:column>
> 					<h:commandLink value="Sil" action="#{adminBean.sil(i)}"
> 						onclick="if(!confirm('İletiyi silmek üzeresiniz.')) return false;">
> 						<a4j:ajax execute="@this" render="metin sonuclar" />
> 					</h:commandLink>
> 				</rich:column>
> 			</rich:dataTable>
> 			<rich:popupPanel autosized="true" id="popAciklama" modal="true">
> 				<f:facet name="header">
> 					Mesaj açıklaması
> 				</f:facet>
> 				<f:facet name="controls">
> 					<h:outputLink
> 						onclick="#{rich:component('popAciklama')}.hide();return false;">
> 						X
> 					</h:outputLink>
> 				</f:facet>
> 				<h:inputTextarea value="#{adminBean.selected.aciklama}" cols="80"
> 					disabled="true" styleClass="mesajDetay" id="metin"
> 					rows="#{(fn:length(adminBean.selected.aciklama) / 80) > 15 ? 15 : fn:replace((fn:length(adminBean.selected.aciklama) / 80) + ( 1 - ((fn:length(adminBean.selected.aciklama) / 80)%1)) % 1,'.0','')}" />
> 			</rich:popupPanel>
> 			<script type="text/javascript">
> 					function beginFunc(){
> 						document.getElementById('showBtn').click()
> 						}
> 					function completeFunc(){
> 						document.getElementById('hideBtn').click()
> 						#{rich:component('popAciklama')}.show();
> 					}
> 			</script>
> 		</ui:define>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the richfaces-issues mailing list