Hi Manfred, thanks for your reply,
I'm afraid that i don't realy understand; adding an
action listener to my scroll buttons, what this means
exactly? i tryied using <f:actionListener>...like
this:
<f:facet name="first" >
<h:graphicImage
url="../images/datascroller/arrow-first.jpg"
border="0" />
<f:actionListener
type="ro.citrusmedia.lims.web.ui.util.WebTableModel"/>
</f:facet>
but it trows the following exception:
org.apache.jasper.JasperException: Component _id53 is
no ActionSource
And what about the page indexes? the user can jump to
a specific page using also the links to each page
(1,2,3,...n), not just the navigation buttons.
When using the viewRoot's findComponent, i have to
know the name (id) of the dataTable...which i don't
(from my backend bean).
--- Manfred Geiler <[EMAIL PROTECTED]> wrote:
> Catalin,
> Add an action listener to your scroll buttons.
> In this action listener get the data table component
> (use findComponent
> of the viewRoot). The dataTable has all the (public)
> properties you need:
> - getRowCount() returns the total number of rows
> - getRows() returns number of rows per page
> - getFirst() returns the index of the current top
> row
> With some division and modulo it is easy to
> calculate the current page
> number: see getPageIndex method in
> HtmlDataScrollerRenderer.
>
> Manfred
>
>
> Catalin Kormos wrote:
> > --- "Korhonen, Kalle" <[EMAIL PROTECTED]> wrote:
> >
> >
> >>>-----Original Message-----
> >>>From: Catalin Kormos [mailto:[EMAIL PROTECTED]
> >>>Subject: pageSelectionListener tag implementation
> >>
> >>help needed
> >>
> >>>I have to tell that i'm very frustrated that
> there
> >>
> >>is no way
> >>
> >>>to find out the page selection change on a
> >>
> >>dataTable that
> >>
> >>>displays rows on more than one page.
> >>>Please correct me if i'm wrong.
> >>
> >>Bind your dataScroller pageIndexVar to a property
> in
> >>your own bean, i.e.
> >>on the .jsp page:
> >><x:dataScroller ....
> >> pageIndexVar="#{myTableBean.pageIndex}"
> >></x:dataScroller>
> >>
> >>And in your pageIndex's setter do whatever you
> >>needed to do when the
> >>page changes, e.g.
> >>
> >>Public void setPageIndex(Integer pageIndex) {
> >> if (pageIndex == null) return;
> >> if (!pageIndex.equals(this.pageIndex))
> >>pageChanged();
> >> this.pageIndex = pageIndex;
> >>}
> >>
> >>Would that work?
> >
> >
> > No, it does't work. The pageIndexVar represents
> only a
> > name used by a bean which holds the page index
> value,
> > that can be used inside the dataScroller tag;
> (like
> > the var for dataTable). So, binding it like you
> said,
> > only changes the name of that bean...(the bean's
> name
> > which holds the actual value). Thanks anyway for
> your
> > interest.
> >
> > Any other ideeas?
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > The all-new My Yahoo! - Get yours free!
> > http://my.yahoo.com
> >
> >
> >
> >
>
__________________________________
Do you Yahoo!?
All your favorites on one personal page � Try My Yahoo!
http://my.yahoo.com