-
1. Re: ExtendedDataTable and select selection="#{userBean.selection}" selection==null
222222 Jan 22, 2014 11:30 AM (in response to 222222)<h:form>
<rich:extendedDataTable id="table" value="#{userBean.arl}" var="var0" style="height:300px; width:500px;"
clientRows="0" selection="#{userBean.selection}" selectionMode="single">
<a4j:ajax execute="@form" event="selectionchange" render="name000, panel" listener="#{userBean.selectionListener}"/>
<f:facet name="caption">
<h:outputText value="название таблицы" />
</f:facet>
<f:facet name="header">
<h:outputText value="шапка0" />
</f:facet>
<rich:column id="c_one" sortBy="#{var0.a0}" sortOrder="#{userBean.sortsOrders['one']}" sortType="custom">
<f:facet name="header">
<a4j:commandLink execute="@this" value="колонка1" render="table" action="#{userBean.sort}">
</a4j:commandLink>
</f:facet>
<h:outputText value="#{var0.a0}"/>
<f:facet name="footer">низ колонки1</f:facet>
</rich:column>
<rich:column>
<f:facet name="header">колонка2</f:facet>
<h:outputText value="#{var0.a1}"/>
<f:facet name="footer">низ колонки2</f:facet>
</rich:column>
<f:facet name="footer">
<h:outputText value="низ таблицы" />
</f:facet>
</rich:extendedDataTable>
<h:inputText id="name00" value="#{userBean.singleItemSel.a0}" rendered="#{not empty userBean.selection}"></h:inputText>
<h:outputText id="name000" value="#{userBean.singleItemSel.a0}" />
<a4j:commandButton value="Show Current Selection" render="name000">
<rich:componentControl target="panel" operation="show" />
</a4j:commandButton>
<h:commandButton value="Show Current Selection2">
<f:ajax render="name000"/>
<a4j:actionListener listener="#{userBean.processAction}"/>
</h:commandButton>
</h:form>
fine work :-)