-
1. Re: Design suggestions with extendedDataTable & commandButton
nbelaevski Dec 16, 2009 3:02 PM (in response to dandausch)Hi Daniel,
Please check corresponding example at richfaces-demo.
-
2. Re: Design suggestions with extendedDataTable & commandButton
dandausch Dec 16, 2009 4:25 PM (in response to nbelaevski)I have looked at the examples multiple times and continuing to examine some web examples also. I can't seem to get the 'selection' attribute to work as shown in the extendedDataTable example, so looking for alternatives. Also looking for best practices from people also in terms of how to tie together, row selection, command link, modal panel, etc. -
3. Re: Design suggestions with extendedDataTable & commandButton
ibrewster Dec 17, 2009 6:19 AM (in response to dandausch)1 of 1 people found this helpfulTry looking here http://livedemo.exadel.com/richfaces-demo/richfaces/dataTable.jsf?tab=editDataTable&cid=5059845
I assume this will work with <rich:extendedDataTable> but haven't tried it
-
4. Re: Design suggestions with extendedDataTable & commandButton
dandausch Dec 17, 2009 11:59 AM (in response to ibrewster)Ian, thanks for pointing me to that example - it did help. I am able to bring up the modal panel successfully now and I believe I am close to a solution. The remaining issue has to do with the row context to be used on the modal panel. It does not seem that the<
f:setPropertyActionListener>
tag is working properly. Here is my code:
main page:
---------------------------
<h:form id="form_mgr_pendingrequests">
<ui:include src="modalPanels/approveReq.xhtml"/>
<a4j:region>
<rich:extendedDataTable id="mgr_pendingrequests" rowKeyVar="rkv"
value="#{RequestWorkflowController.managerPendingRequests}" var="pending"
rows="0" height="255px" width="890px">
<rich:column.... data display here
<rich:column width="230px" style="padding:0" headerClass="head2">
<f:facet name="header">
<h:outputText value="Action"/>
</f:facet>
<a4j:commandButton value="Approve" ajaxSingle="true" id="approveButton"
oncomplete="#{rich:component('approveReq')}.show()"
reRender="approveReqDiv">
<f:setPropertyActionListener value="#{pending}"
target="#{RequestWorkflowController.currentItem}"/>
------------------------------
such that I have added a methods to my backing bean called: RequestWorkflowController.setCurrentItem & getCurrentItem. I expect this method to be invoked and the current item to be stored in the Session bean.
My modalPanel is as follows:
<rich:modalPanel id="approveReq" autosized="true" width="400">
<f:facet name="header">
<h:panelGroup>
<h:outputText>Approve Request</h:outputText>
</h:panelGroup>
</f:facet>
<div id="approveReqDiv">
<h:form id="approveForm">
<h:panelGrid id="approveForm" columns ="3">
<h:outputText id="approve1label" style="font-weight:normal"
value="Access Level: "></h:outputText>
<h:outputText id="approve1" style="font-weight:normal"
value="#{RequestWorkflowController.currentItem.accessLevel}"></h:outputText>
<a4j:commandButton value="Approve"
oncomplete="#{rich:component('approveReq')}.hide()"/>
</h:panelGrid>
</h:form>
</div>
</rich:modalPanel>
-------------------------------
In the modalPanel, i expect the getCurrentItem.getAccessLevel to be invoked and display the current selected data. The issue seems to be the Setter and Getters not being invoked properly. I have seen other postings indicating this can be an issue. Any thoughts or suggestions?
-
5. Re: Design suggestions with extendedDataTable & commandButton
ilya_shaikovsky Dec 18, 2009 4:53 AM (in response to dandausch)Just download full sources of richfaces-demo from SVN and investigate. http://anonsvn.jboss.org/repos/richfaces/branches/community/3.3.X/samples/richfaces-demo -
6. Re: Design suggestions with extendedDataTable & commandButton
dandausch Jan 5, 2010 8:56 AM (in response to dandausch)I was able to get this to work. Thanks for the suggestions.