So Tim, to answer your question based on Joe's response I would simply
create a state saving variable (i.e. firstResult) that maps to the "first"
attribute of the dataTable tag. And then for each request you can alter it
to meet your need.

Note that depending on the type of form submission, you may want to reset it
to it's initial value (i.e. 1). For example, if the list is based on a
search you would want to reset to firstResult=1 in that case. I got bit by
this awhile back because a search obviously has the ability to return a
small subset of records and if the value of firstResult is beyond that of
the actual results then you will see a blank dataTable list.

Does that answer your question Tim?

HTH,
Aaron Bartell
http://mowyourlawn.com

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Joe Pluta
Sent: Friday, December 14, 2007 10:07 AM
To: 'Web Enabling the AS400 / iSeries'
Subject: Re: [WEB400] JSF/EGL datatable positioning question

From: Aaron Bartell

If you can figure out how to do it in JSF, then I can probably help do
it in EGL, although I haven't tried it.

Here is how I do it with JSF. Pay particular attention to the firstResult
portion. Any idea how we could do this in EGL? BTW, I have 2hrs left on
my download of RAD_V7.


--userlist.jsp-- (note dataTable attributes value, rows, first):
<h:panelGroup>
<x:dataTable id="list1" styleClass="table" headerClass="table_header"
var="user"
value="#{UserCtl.userListDataModel}" preserveDataModel="true"
rowClasses="row1,row2"
rows="#{UserCtl.perPage}" first="#{UserCtl.firstResult}">

The only difference between what you're writing and what EGL creates is the
fact that EGL uses the Extended Data Table from IBM's Java Widget Library.
The tag (hx:dataTableEx) has a first attribute, which, while I haven't used
it, should do the same thing the first attribute does for x:dataTable.

Here's documentation on the dataTableEx tag:

http://tinyurl.com/3cbgcn

Joe


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.