This content has been marked as final.
Show 2 replies
-
1. Re: Putting oncontextmenu in datatable row tags
nbelaevski Mar 26, 2008 8:34 PM (in response to pdpantages)Hello,
We've already got request for similar feature: http://jira.jboss.com/jira/browse/RF-2170
Context menu event is a bubbling one, so why not use wrapper div with event handler declared on it instead of table? -
2. Re: Putting oncontextmenu in datatable row tags
pdpantages Mar 26, 2008 9:20 PM (in response to pdpantages)Hello Nick, thank you for the info. I can't seem to get anything to work. I tried the div wrapper as you suggest, but my menu does not work. It this what you were suggesting (below)?
Btw do you think my mods to AbstractRowsRenderer.java would cause any problems?
I need the component control to pass me some row-specific parameters, so I have to keep this component inside the dataTable tag, and set the attachTo to the div.
I think I really need to attach to the row, no?
This is what I tried:<div id="cdiv"> <rich:dataTable rowClasses="alarmRowOdd, alarmRowEven" value="#{nodeList}" onRowClick="fselect('#{networkElement.id}', ctrlkey )" var="networkElement" rendered="true" > <c:forEach items="#{nodeRowFormats.columnDataModel}" var="column"> <rich:column sortable="false"> .... etc. </rich:column> </c:forEach> <rich:componentControl event="oncontextmenu" attachTo="cdiv" for="menu" operation="show"> <f:param value="#{networkElement.id}" name="neId"/> <f:param value="#{networkElement.name}" name="name"/> <f:param value="/img/ne16.png" name="icon"/> </rich:componentControl> </rich:dataTable> </div>