This content has been marked as final.
Show 6 replies
-
1. Re: RichFaces dataTable and table control inside modalPanel
clerum Jun 1, 2009 5:08 PM (in response to katsu)Have you considered using a DataScroller ?
-
2. Re: RichFaces dataTable and table control inside modalPanel
freakwave10 Jun 1, 2009 11:31 PM (in response to katsu)We are using exactly the same, here is the modal panel
<rich:modalPanel id="searchfmno" autosized="true" width="450"> <f:facet name="header"> <h:outputText value="Book for Someone else" /> </f:facet> <f:facet name="controls"> <h:panelGroup> <h:graphicImage value="../img/thin_close_view.gif" styleClass="hidelink" id="hidelink" /> <rich:componentControl for="searchfmno" attachTo="hidelink" operation="hide" event="onclick" /> </h:panelGroup> </f:facet> <h:form> <rich:dataTable value="#{BasisPersonVList.resultList}" var="_BasisPersonV" id="table" rows="20"> <f:facet name="header"> <rich:columnGroup> <rich:column breakBefore="true"> <h:outputText value="FMNO" /> </rich:column> <rich:column> <h:outputText value="First Name" /> </rich:column> <rich:column> <h:outputText value="Last Name" /> </rich:column> <rich:column> <h:outputText value="Action" /> </rich:column> </rich:columnGroup> </f:facet> <rich:column> <f:facet name="header"> <h:inputText value="#{BasisPersonVList.BasisPersonV.fmno}" id="inputFmno"> <a4j:support event="onkeyup" reRender="table , ds2" ignoreDupResponses="true" requestDelay="700" oncomplete="setCaretToEnd(event);" /> </h:inputText> </f:facet> <h:outputText value="#{_BasisPersonV.fmno}" /> </rich:column> <rich:column> <f:facet name="header"> <h:inputText value="#{BasisPersonVList.BasisPersonV.firstName}" id="inputFirstName"> <a4j:support event="onkeyup" reRender="table , ds2" ignoreDupResponses="true" requestDelay="700" oncomplete="setCaretToEnd(event);" /> </h:inputText> </f:facet> <h:outputText value="#{_BasisPersonV.firstName}" /> </rich:column> <rich:column> <f:facet name="header"> <h:inputText value="#{BasisPersonVList.BasisPersonV.lastName}" id="inputLastName"> <a4j:support event="onkeyup" reRender="table , ds2" ignoreDupResponses="true" requestDelay="700" oncomplete="setCaretToEnd(event);" /> </h:inputText> </f:facet> <h:outputText value="#{_BasisPersonV.lastName}" /> </rich:column> <rich:column styleClass="action"> <h:commandButton action="#{meAccountWizardBean.getSelectedRecord(_BasisPersonV.fmno, _BasisPersonV.internetMailAddress )}" value="" image="../img/edit.gif" /> </rich:column> <f:facet name="footer"> <rich:datascroller id="ds2" renderIfSinglePage="false"></rich:datascroller> </f:facet> </rich:dataTable> </h:form> </rich:modalPanel>
Regards,
Wolfgang
-
3. Re: RichFaces dataTable and table control inside modalPanel
allforjava.allforjava.aol.in Jun 2, 2009 7:59 AM (in response to katsu)Hi Wolfgang,
We too faced the same problem using datascroller with resultList. May be the problem is the pagination is performed on the provided list. The next/ previous etc does not invoke the respective result sets. To test, get resultlist with max result to 20 and in datascroller set max row display to 5 or 10 and check it.
We are using the EntityQuery methods for pagination with s:link
<h:panelGrid columns="8">
<s:link view="/workLogList.xhtml"
rendered="#{workLogList.previousExists}" value="First Page"
reRender="ss">
<f:param name="firstResult" value="0" />
</s:link>
<rich:spacer value="30" />
<s:link view="/workLogList.xhtml"
rendered="#{workLogList.nextFirstResult > workLogList.maxResults ? true : false}"
value="Previous Page" reRender="ss">
<f:param name="firstResult" value="#{workLogList.previousFirstResult}" />
</s:link>
<rich:spacer value="30" />
<s:link view="/workLogList.xhtml"
rendered="#{workLogList.resultCount >= workLogList.nextFirstResult ? true : false}"
value="Next Page" reRender="ss">
<f:param name="firstResult" value="#{workLogList.nextFirstResult}" />
</s:link>
<rich:spacer value="30" />
<s:link view="/workLogList.xhtml" rendered="#{workLogList.nextExists}"
value="Last Page" reRender="ss">
<f:param name="firstResult" value="#{workLogList.lastFirstResult}" />
</s:link>
</h:panelGrid> -
4. Re: RichFaces dataTable and table control inside modalPanel
katsu Jun 2, 2009 9:03 AM (in response to katsu)i gotta half step to solution dudes, i think.
i agree with Prathamesh, except pagination method with page param is unacceptable inside modal panel.
the datascroller works nicely, but still there a bit problem.
it make datatable paginable, without a sense of is there another data behind.
because datatable only display 25 (it depends on what had passed into setMaxResults) row data from getResultList(), the last page of datascroller is 25/(row per page -> <rich:datatable rows=...>).
it's absolutely incorrect if we have data larger than default value (25). i spent a couple hour at https://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/datascroller.html to find is there a way for datascroller to refresh the datatable with previousFirstResult, nextFirstResult, lastFirstResult stuffs, but no results
thanks in advance -
5. Re: RichFaces dataTable and table control inside modalPanel
katsu Jun 3, 2009 4:32 AM (in response to katsu)guys,
finally i find a solution, but it may be not the elegant one.
i ommit the call of setMaxResults in constructor of EmployeeList.java:
.....
// setMaxResults(25);
.....
and move the restrictions back in EmployeeList.page.xml, so the EmployeeList.xhtml can keep the pagination on.
i add the following in EmployeeList.page.xml:
<action execute="#{employeeList.setMaxResults(25)}"/>
so far so good, it works nicely.
but i'm newbie in Seam, so i don't know if this approach have some pitfall. i hope you guys give a comment on my work or share another idea.
regards,
Adam -
6. Re: RichFaces dataTable and table control inside modalPanel
pomcompot.pomme_compote-seamframework.yahoo.fr Feb 4, 2010 11:13 AM (in response to katsu)You use reRender attribute into s:link but it seems this attribute is not available for s:link. Does it work and you really have a AJAX style rerender or is it an error ?