Again some things are getting mixed up here I fear:
"pageIndexVar" and "pageCountVar" are runtime variables that function similar to the "var" attribute in the <x:dataTable>. That means: during runtime there is a bean available in request-scope that can be accessed by a name, that is specified by the corresponding "pageIndexVar" or "pageCountVar" attribute.
Example:
<x:dataScroller ... pageIndexVar="foo" ...>
Within the "scope" of the <x:dataScroller> (i.e. between the begin and end tag) you can access the value (in fact a request scope bean) by using the expression "#{foo}".
e.g. <h:outputText value="#{foo}"/> renders the current page number of the dataTable that is associated with this dataScroller.
See dataScroller.jsp in MyFaces examples!
HTH, Manfred
Korhonen, Kalle wrote:
On the page, make the pageIndexVar use a bean property, and implement the getters and setters for it in the backing bean. No extra work required and you can also reset to first page etc. in the backing bean logic in case you are implementing some kind of a table displaying search results or something similar.
Kalle
-----Original Message-----
From: Bill Dudney [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 16, 2004 4:55 PM
To: MyFaces Discussion
Subject: Re: "Request scope" clarification need
Hi Catalin,
Have you tried asking the session for the value?
FacesContext.getCurrentInstance().getExternalContext().getSess ionMap().g et('the value specified for pageIndexVar');
should do the trick.
I'm not sure about the data table.
Hope this helps,
-bd-
On Nov 16, 2004, at 7:48 AM, Catalin Kormos wrote:
Hi,
I'm almost very new to JSF, i'm trying to use it on a new project, more exacly, i'm using myfaces-1.0.7; i think i need some clarifications about the "session scope", i guess i don't
understand
well what is all about. For example, in tlddocs, for tag x:dataScroller, there is an attribute, "pageIndexVar"; the
following
is the description "A parameter name, under which the actual page index is set in request scope similar to the var parameter";
My question is: how can i get the value for that parameter from the request scope? i realy need the value to be able to detect
the change
in the page index currenly displayed by the data table. Is
there any
other possibility to be informed about the change of the currently displayed page index, for a data table?
Thanks, i would realy appreciate some help,
Regards,
Catalin
__________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com

