How to send some data from DataTable to TabPanel
sebekk23 Feb 2, 2009 2:00 PMHi,
I'm not able to send some data from datatable to tabpanel with rich:componentControl. I was googling all evening :) but no luck. I try to do something like this: when user click on table row ModalPanel appears with tabpanel inside with rows having user data like email, login and etc. but i can't receive data after onRowClick event. I'm new with richfaces so i think that it's my fault. Below is my code:
<h:form id="userList"> <rich:modalPanel id="userMenuModalPanel"> <f:facet name="header"> <h:outputText value="header" /> </f:facet> <rich:tabPanel width="100%" switchType="client" > <rich:tab label="Dane personalne" > <b><h:outputText value="#{userList.userId}"/></b> <b> {login} </b> </rich:tab> <rich:tab label="Dane systemowe"> Test 2 </rich:tab> <rich:tab label="Dane prywatne"> test 3 </rich:tab> </rich:tabPanel> <a onclick="Richfaces.hideModalPanel('userMenuModalPanel');" href="#" style="color:white;">Hide</a> </rich:modalPanel> <rich:dataTable id="userListTable" rows="4" value="#{userList.users}" var="user" width="100%" > <f:facet name="caption"><h:outputText value="Lista użytkowników" /></f:facet> <rich:column sortBy="#{user.name}" filterBy="#{user.name}" filterEvent="onkeyup" title="Wpisz frazę wyszukiwania"> <f:facet name="header"> <h:outputText value="Nazwa użytkownika"/> </f:facet> <h:outputText value="#{user.name}"/> <f:facet name="footer"> <h:outputText value="Nazwa użytkownika"/> </f:facet> </rich:column> <rich:column sortBy="#{user.login}" filterBy="#{user.login}" filterEvent="onkeyup" title="Wpisz frazę wyszukiwania"> <f:facet name="header"> <h:outputText value="Login użytkownika w systemie"/> </f:facet> <h:outputText value="#{user.login}"/> <f:facet name="footer"> <h:outputText value="Login użytkownika w systemie"/> </f:facet> </rich:column> <rich:componentControl event="onRowClick" for="userMenuModalPanel" operation="show"> <f:param value="#{user.login}" name="login" /> <!-- not working --> <a4j:actionparam value="#{user.id}" name="userId" assignTo="#{userList.userId}"/> <!-- not working too :( --> </rich:componentControl> </rich:dataTable> </h:form>
I try to make lik is show on example http://livedemo.exadel.com/richfaces-demo/richfaces/contextMenu.jsf?c=contextMenu&tab=usage (this one with cars) but that didn't work either :(.