Marius Cloete
,
Greenhorn
Jun 07, 2005 01:39:00
Hi all, When you look at the id of the row in the page source of your browser window (id="form1:table1:1:cell1") I am interested in the single digit "1" that represents the current row.That row value is also the index number of the array of elements that was used in the data table. How will I be able to get that value back so I can use it in my code? Any ideas will be much appreciated, thx. [ June 09, 2005: Message edited by: Gregg Bolinger ]
Kurt Boets
,
Greenhorn
Jun 07, 2005 03:31:00
Hi Marius, Perhaps you can use a binding. You can use a UIData element to bind and so retrieve the index of your row. Hope it helps.
Marius Cloete
,
Greenhorn
Jun 07, 2005 03:51:00
Thx Kurt, Do you mean I need to add an int[] rowNumber to the bean thats holds the identifier and then access it this way #{arrayVar.rowNumber}? I'll try that.
Kurt Boets
,
Greenhorn
Jun 07, 2005 05:27:00
That's right. Hope it works !
Marius Cloete
,
Greenhorn
Jun 07, 2005 06:19:00
Hi Kurt, Thx that did work but it feels like I "hacked" the system, I am sure there must be/should be a better/standard way of doing this. But till then thank you Kurt this will do it. This is wat I added to java page code... the rest is standard Thanks and cheerz
Gregg Bolinger
,
Ranch Hand
Jun 07, 2005 08:12:00
You might take a look at this thread where something very similar was discussed.
Kurt Boets
,
Greenhorn
Jun 07, 2005 08:23:00
Hi Marius, The following code will get the index out of a DataList (and is used to change my look and feel). Perhaps it can give you some extra info. jsf page with the binding + rowindex java bean (rowindex is used to calculate month)
Varun Khanna
,
Ranch Hand
Jun 07, 2005 10:43:00
This thread does require some edit work for better readability.
Marcos Maia
,
Ranch Hand
Jun 09, 2005 07:30:00
Originally posted by Varun Khanna: This thread does require some edit work for better readability.
I agree.
Sasparilla and fresh horses for all my men! You will see to it, won't you tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com