-
1. Re: Unable to attach <a4j:ajax> to non-ClientBehaviorHolder parent (richfaces column)
michpetrov Jan 22, 2013 5:10 AM (in response to rcordoba)Hi,
what exactly are you trying to do? From what I can see the column in question is empty (and there needs to be something the a4j:ajax could attach to), so what are you expecting to "change"?
Can you show us the whole table and say what is it supposed to be doing?
-
2. Re: Unable to attach <a4j:ajax> to non-ClientBehaviorHolder parent (richfaces column)
rcordoba Jan 22, 2013 12:53 PM (in response to michpetrov)Hi Michal,
thanks for your response.
Actually, I made so many changes that finally I copied the bas example. What I want to do is the common functionality to support internationalization. I mean, when the user click on a language link, a popupPanel with a datatable of countries will be opened. The user will be able to click on a row (with a country). It´s suppose that an ajax action will be executed, so the language will change to the selected one by the user.
I have read in another post that ajax click event in a rich:column is not working in richfaces 4. According to Ilya sugggestion, I have implemented with a "workaround" with jsFunction.
Please find attached my complete popupPanel code:
<rich:popupPanel id="popupPanelI18n" resizeable="false">
<f:facet name="controls">
<h:outputLink value="#" onclick="#{rich:component('popupPanelI18n')}.hide(); return false;">
<h:graphicImage value="/images/close.png" style="cursor:pointer" styleClass="hidelink" id="hideLinkPopupPanelI18n" />
</h:outputLink>
</f:facet>
<a4j:jsFunction name="selectRow" action="#{I18nBean.setPais}" render="panelBuscarCharter" oncomplete="#{rich:component('popupPanelI18n')}.hide(); return false;">
<a4j:param name="currentRow" assignTo="#{I18nBean.sLocale}"/>
</a4j:jsFunction>
<div id="divI18n">
<h:outputText value="#{msj.pais}" />
<rich:dataTable id="PaisesTabla" value="#{I18nBean.internacionalizaciones}" var="i18n" onrowclick="selectRow('#{i18n.locale}');">
<f:facet name="header">
<h:outputText value="#{msj.pais}"/>
</f:facet>
<rich:column styleClass="columna" id="banderaColumna" label="#{msj.bandera}" >
<h:graphicImage value="/images/banderas/#{i18n.locale}.png" id="bandera" styleClass="imagenPequena" />
</rich:column>
<rich:column styleClass="columna" id="paisColumna" label="#{msj.pais}">
<h:outputText value="#{i18n.pais}" />
</rich:column>
</rich:dataTable>
</div>
</rich:popupPanel>
This is working.
Is this a correct approach?
Thanks,
Roberto.