-
1. Re: Getting clciked row in Extended datatable
ilya_shaikovsky Jun 23, 2009 5:22 AM (in response to shivaji.byrapaneni)use onRowClick event
-
2. Re: Getting clciked row in Extended datatable
nbelaevski Jun 23, 2009 5:26 AM (in response to shivaji.byrapaneni)Hi Shivaji,
Please post page code. -
3. Re: Getting clciked row in Extended datatable
shivaji.byrapaneni Jun 23, 2009 6:00 AM (in response to shivaji.byrapaneni)This my page code
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <!-- RichFaces tag library declaration --> <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%> <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%> <h:panelGrid columns="2" columnClasses="top,top"> <rich:messages /> <rich:extendedDataTable value="#{nominationSessionBean.coursesList}" id="courseListEDT" binding="#{courseListBean.courseListEDT}" var="course" width="700px" height="400px" sortMode="single" selectionMode="single"> <rich:column sortable="false" label="Course Image" width="40px" id="imageColumn" binding="#{courseListBean.imageColumn}"> <f:facet name="header"> <h:outputText value="" /> </f:facet> <h:graphicImage value="/Images/create_doc.gif" /> </rich:column> <rich:column sortable="true" sortBy="#{course.courseName}" filterBy="#{course.courseName}" filterEvent="onkeyup" width="170px" label="Course Name" id="courseNameColumn" binding="#{courseListBean.courseNameColumn}"> <f:facet name="header"> <h:outputText value="Course Name" /> </f:facet> <h:outputText value="#{course.courseName}" /> </rich:column> <rich:column sortable="true" sortBy="#{course.noOfSeats}" filterBy="#{course.noOfSeats}" filterEvent="onkeyup" width="170px" label="No Of Seats" id="noOfSeatsColumn" binding="#{courseListBean.noOfSeatsColumn}"> <f:facet name="header"> <h:outputText value="no Of Seats" /> </f:facet> <h:outputText value="#{course.noOfSeats}" /> </rich:column> <rich:column sortable="false" label="on Date" id="onDateColumn" binding="#{courseListBean.onDateColumn}"> <f:facet name="header"> <h:outputText value="on Date" /> </f:facet> <h:outputText value="#{course.onDate}" /> </rich:column> <rich:column sortable="false" label="Time" id="timeColumn" binding="#{courseListBean.timeColumn}"> <f:facet name="header"> <h:outputText value="Time" /> </f:facet> <h:outputText value="#{course.courseTime}" /> </rich:column> <rich:column sortable="false" label="location" id="locationColumn" binding="#{courseListBean.locationColumn}"> <f:facet name="header"> <h:outputText value="location" /> </f:facet> <h:outputText value="#{course.location}" /> </rich:column> <a4j:support event="ondblclick" reRender="courseListEDT" actionListener="#{courseListBean.nominateToTheCourse}"> <f:setPropertyActionListener value="#{course}" target="#{courseListBean.currentRow}" /> </a4j:support> </rich:extendedDataTable> </h:panelGrid>
and im including thsi page into other page which is below<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <!-- RichFaces tag library declaration --> <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%> <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%> <html> <head> <title>:: Nomination system Home ::</title> <script src="/NominationWeb/scripts/nominationScripts.js" type="text/javascript"></script> </head> <body> <f:view> <a4j:form id="nominationSystemHome" binding="#{homeBean.nominationSystemHome}"> <rich:tabPanel switchType="ajax" id="nominationHometp" binding="#{homeBean.nominationHometp}"> <rich:tab label="Course List" id="courseListTab" binding="#{homeBean.courseListTab}" action="#{courseListBean.loadCourseList}"> <%@ include file="/pages/courseList.jsp"%> </rich:tab> <rich:tab label="Approve Nominations" id="approveNominationsTab" binding="#{homeBean.approveNominationsTab}" action="#{approveCoursesBean.populateCourseListToApprove}"> <%@ include file="/pages/approveCourses.jsp"%> </rich:tab> <rich:tab label="Manage Courses" id="manageCoursesTab" binding="#{homeBean.manageCoursesTab}" action="#{manageCoursesBean.loadManageCourses}"> <%@ include file="/pages/manageCourses.jsp"%> </rich:tab> <rich:tab label="Manage Users" id="manageUsersTab" binding="#{homeBean.manageUsersTab}" > <p>Managing users goes here.</p> </rich:tab> </rich:tabPanel> </a4j:form> <%@ include file="/pages/manageCourseSupport.jsp"%> <%@ include file="/pages/processing.jsp"%> </f:view> </body> </html>
please help me in solving this problem
many thanks in advance -
4. Re: Getting clciked row in Extended datatable
ilya_shaikovsky Jun 23, 2009 6:07 AM (in response to shivaji.byrapaneni)check please my mesage above.
Also selection could be used in order to process selected rows instead of passing them as parameters. -
5. Re: Getting clciked row in Extended datatable
shivaji.byrapaneni Jun 23, 2009 6:14 AM (in response to shivaji.byrapaneni)Thanks for you reply
do you mean me to replace the onclick event with onrowclick ..?
Could you please provide me with a code sample to collect the row on which the event have been fired on...?
many Thanks -
6. Re: Getting clciked row in Extended datatable
shivaji.byrapaneni Jun 23, 2009 6:25 AM (in response to shivaji.byrapaneni)i checked onrowclick as well and cant see the event getting fired.
-
7. Re: Getting clciked row in Extended datatable
ilya_shaikovsky Jun 23, 2009 6:29 AM (in response to shivaji.byrapaneni)because the name of the variable is onRowClick - in camel case as I already written. I know that this is confusing but we can't correct this because of backwards compatibility.
-
8. Re: Getting clciked row in Extended datatable
shivaji.byrapaneni Jun 23, 2009 6:34 AM (in response to shivaji.byrapaneni)i had changed the event like this
<a4j:support event="onrowclik" reRender="courseListEDT" actionListener="#{courseListBean.nominateToTheCourse}"> <f:setPropertyActionListener value="#{course}" target="#{courseListBean.currentRow}" /> </a4j:support> </rich:extendedDataTable>
still i cant see the action getting called in the sense event fire is not happening. -
9. Re: Getting clciked row in Extended datatable
panky_p Jun 23, 2009 6:40 AM (in response to shivaji.byrapaneni)Spell properly the event onRowClick .
<a4j:support event="onRowClick" reRender="courseListEDT" actionListener="#{courseListBean.nominateToTheCourse}"> <f:setPropertyActionListener value="#{course}" target="#{courseListBean.currentRow}" /> </a4j:support> </rich:extendedDataTable>
-
10. Re: Getting clciked row in Extended datatable
ilya_shaikovsky Jun 23, 2009 6:41 AM (in response to shivaji.byrapaneni)read please my post above carefully.
-
11. Re: Getting clciked row in Extended datatable
shivaji.byrapaneni Jun 23, 2009 6:43 AM (in response to shivaji.byrapaneni)cheers it helped out
im even able to get the selected row
but i want the event to be fired on row double clcik..
could you please help me on this as well...? -
12. Re: Getting clciked row in Extended datatable
ilya_shaikovsky Jun 23, 2009 6:46 AM (in response to shivaji.byrapaneni)just change the event to corresponding one. tlddocs and dev guide could be very helpful to get such info like proper attributes names.
-
13. Re: Getting clciked row in Extended datatable
panky_p Jun 23, 2009 6:46 AM (in response to shivaji.byrapaneni)use event ondblclick
-
14. Re: Getting clciked row in Extended datatable
panky_p Jun 23, 2009 6:48 AM (in response to shivaji.byrapaneni)sorry for last wrong post use onRowDblClick