-
1. Re: Clicking button on row of datatable
nbelaevski Jan 28, 2009 1:17 PM (in response to lukep1984)Hello,
Add this:<div onclick="Event.stop(event)">
to prevent event propagation. -
2. Re: Clicking button on row of datatable
lukep1984 Feb 6, 2009 2:50 AM (in response to lukep1984)Thanks for try, but it didn't help.Action OnRowClick is still taking place.
-
3. Re: Clicking button on row of datatable
ilya_shaikovsky Feb 6, 2009 8:05 AM (in response to lukep1984)and what if you add the onclick="Event.stop(event)" to command link?
-
4. Re: Clicking button on row of datatable
lukep1984 Feb 12, 2009 8:34 AM (in response to lukep1984)Thanks for help, but it doesn't prevent from action onRowClick either.
-
5. Re: Clicking button on row of datatable
ilya_shaikovsky Feb 12, 2009 9:32 AM (in response to lukep1984)just checked within RF demo env
<rich:dataTable value="#{dataTableScrollerBean.allCars}" columns="1" var="category" rows="20" rowKeyVar="row" ajaxKeys="#{dataTableScrollerBean.keys}" id="table"> <a4j:support event="onRowClick"/> <f:facet name="header"> <h:outputText value="Cars Store"/> </f:facet> <rich:column width="100em;"> <f:facet name="header"> <h:outputText value="Make" /> </f:facet> <h:outputText value="#{category.make}" id="make" /> </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="Model" /> </f:facet> <h:outputText value="#{category.model}" id="model" /> </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="Price" /> </f:facet> <h:outputText value="#{category.price}" id="price" /> </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="Mileage" /> </f:facet> <h:outputText value="#{category.mileage}" /> </rich:column> <rich:column width="200px"> <f:facet name="header"> <h:outputText value="VIN" /> </f:facet> <h:outputText value="#{category.vin}" /> </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="Stock" /> </f:facet> <a4j:commandLink value="1123123" onclick="Event.stop(event);"/> <h:outputText value="#{category.stock}" /> </rich:column> <rich:column> <f:facet name="header"> Actions </f:facet> <a4j:commandLink ajaxSingle="true" id="editlink" oncomplete="#{rich:component('editPanel')}.show()"> <h:graphicImage value="/images/icons/edit.gif" style="border:0"/> <f:setPropertyActionListener value="#{category}" target="#{dataTableScrollerBean.currentItem}" /> <f:setPropertyActionListener value="#{row}" target="#{dataTableScrollerBean.currentRow}" /> </a4j:commandLink> <rich:toolTip for="editlink" value="Edit"/> <a4j:commandLink ajaxSingle="true" id="deletelink" oncomplete="#{rich:component('deletePanel')}.show()"> <h:graphicImage value="/images/icons/delete.gif" style="border:0"/> <f:setPropertyActionListener value="#{row}" target="#{dataTableScrollerBean.currentRow}" /> </a4j:commandLink> <rich:toolTip for="deletelink" value="Delete"/> </rich:column> <f:facet name="footer"> <rich:datascroller renderIfSinglePage="false" maxPages="5"/> </f:facet> </rich:dataTable> </a4j:region> </h:form> only one request fired in my case when clicking a link.
-
6. Re: Clicking button on row of datatable
ilya_shaikovsky Feb 12, 2009 9:33 AM (in response to lukep1984)I've meant
<a4j:commandLink value="1123123" onclick="Event.stop(event);"/>
link
And the other links causes two request because not stopping the event. -
7. Re: Clicking button on row of datatable
argonist Jun 11, 2009 3:36 AM (in response to lukep1984)Checkbox with Event.stop(event) in a column isn't working.
<h:selectBooleanCheckbox onclick="Event.stop(event)" value="#{req.firstInterpreterTimeChecked}" />
Have you another idea? -
8. Re: Clicking button on row of datatable
nbelaevski Jun 11, 2009 5:21 AM (in response to lukep1984)Hi.
What exactly isn't working? Are there any JavaScript errors in browser log? -
9. Re: Clicking button on row of datatable
argonist Jun 11, 2009 5:49 AM (in response to lukep1984)Hi,
I cannot change the checkbox because all events are stop, if I am clicking on checkbox. But the stop of the event "onRowClick" is working.
In Ajax-log are there no error. -
10. Re: Clicking button on row of datatable
nbelaevski Jun 11, 2009 5:55 AM (in response to lukep1984)In what browser?
-
11. Re: Clicking button on row of datatable
argonist Jun 12, 2009 4:34 AM (in response to lukep1984)hi,
I found out at javascript-debbuger, that there is a problem.
function for onclickfunction onclick(event) { this.checked; Event.stop(event); }
If I make with javascript-debbuger a step by step through that code, then I can see that the value of this.checked change. The value of this.checked don't save after the finishing of the function onclick(even). Is that a Bug? -
12. Re: Clicking button on row of datatable
argonist Jun 12, 2009 4:37 AM (in response to lukep1984)Hi nbelaevski,
sorry, I read your rely now. I was waiting for your rely yesterday, but your rely is in second page. fuck...
browser: firefox 3.0.10
Manu -
13. Re: Clicking button on row of datatable
argonist Jun 15, 2009 3:55 AM (in response to lukep1984)Hi,
I have still that problem and think, that is bug.
Manu -
14. Re: Clicking button on row of datatable
sefai Apr 15, 2010 4:25 AM (in response to argonist)Based on this post, if I use
<rich:column onclick="event.stopPropagation()" />
checkbox works as expected. Is it safe to use like this, will it have any side effects?
Best regards...