This content has been marked as final.
Show 2 replies
-
1. Re: Datatable onRowClick firing server side sction controlle
baz Jun 20, 2007 8:35 AM (in response to paulo5)Please search the forum and you will find a solution that at least works for us.
http://jboss.com/index.html?module=bb&op=viewtopic&t=106284
and
http://jboss.com/index.html?module=bb&op=viewtopic&t=107198 -
2. Re: Datatable onRowClick firing server side sction controlle
paulo5 Jun 21, 2007 4:38 AM (in response to paulo5)Thanks for your response - I did do some searches but did was obviously searchng for the wrong words :-)
Either way I took a little bit from several of the responses and managed to fire my action controller:
My Data Table<rich:dataTable id="widgetTable" styleClass="resultsTable" value="#{widgetSummaryManager.widgetDataModel}" var="widgetRecord" onRowMouseOver="switchElmtClass(this, 'highlightRow', 'normalRow')" onRowMouseOut="switchElmtClass(this, 'highlightRow', 'normalRow')" summary="Provides a list of widgets available" headerClass="tableHeader" columnClasses="idField"> <a4j:support event="onRowClick" action="#{widgetSummaryManager.selectWidget}" actionListener="#{widgetSummaryManager.viewWidget}"/> ....
My widgetSummaryManager.selectWidget Action controllerpublic String selectWidget() { logger.info("trying to get small widget dto"); SmallWidgetDTO smallWidgetDTO = (SmallWidgetDTO) widgetDataModel.getRowData(); logger.info("Attempting to get widget using id of "+ smallWidgetDTO.getId()); WidgetDTO widgetDTO = getSearchMgr().getWidget(smallWidgetDTO.getId()); setSelectedWidget(widgetDTO); return "widgetDetail"; }
and the navigation rule in faces-config.xml that directs me to the next page...<navigation-rule> <from-view-id>/pages/widgetSummary.jsp</from-view-id> <navigation-case> <from-outcome>widgetDetail</from-outcome> <to-view-id>/pages/widgetDetail.jsp</to-view-id> </navigation-case> navigation-rule>
Thanks again for your help pointing me in the right direction and apologies for not managing to find it myself :-)
Cheers