I don't know what the best way to do this is, but you're going to need
to put your outputText component inside a column of the dataTable in
order for the rowIndexAsString part to work. Maybe stick it in as a
hidden field. Then use javascript to read the value for that field.
Note that the id for each field in the table is going to be different.
On 8/31/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
we're running myfaces and tomahawk 1.1.3
I have a dataTable where I need to get the rowIndex of the first row
displayed on a page
(this table has many rows/pages).
I found this example on the web
var b = '<h:outputText value="#{myBean.property}"/>';
I coded this
var index = '<h:outputText value="#{myBean.rowIndexAsString}"/>';
and put it within a script/function func()
on a jsp page, where the function is called by a command button.
The value of the property from outputText is displayed on the page,
which I don't want, and an alert in the js function shows nothing in the
var.
Is this the correct way to pull a value into js? Can you point me
to a reference or examples?
Thanks in advance for your help.
Tom
This message is intended for the recipient only and is not meant to be
forwarded or distributed in any other format. This communication is for
informational purposes only. It is not intended as an offer or solicitation
for the purchase or sale of any financial instrument, or security, or as an
official confirmation of any transaction. Putnam does not accept purchase or
redemptions of securities, instructions, or authorizations that are sent via
e-mail. All market prices, data and other information are not warranted as to
completeness or accuracy and are subject to change without notice. Any
comments or statements made herein do not necessarily reflect those of Putnam,
LLC (DBA Putnam Investments) and its subsidiaries and affiliates. If you are
not the intended recipient of this e-mail, please delete the e-mail.