selected row in tables

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

selected row in tables

ozenzin

I  see  that  xfrom:repeat  being rendered as table provides ability to highlight currently selected
row.  This  leads  some  of  our  forms users to retrieve a value of table, i.e. they interpret that
selected row as value of table and hope to use it for further data handling.

The  question  is: whether you presumed such behavior of table? if so are there single-row selection
table and multiple-row selection tables support?

AFAIK  there  is no such notion as "currently selected row" in repeat module of xForms or any xForms
event to handle it. Or is there something? - please advise.

Thank you,
Oleg Zenzin



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: selected row in tables

Erik Bruchez
Administrator
Oleg,

[hidden email] wrote:
> I  see  that  xfrom:repeat  being rendered as table provides ability to highlight currently selected
> row.  This  leads  some  of  our  forms users to retrieve a value of table, i.e. they interpret that
> selected row as value of table and hope to use it for further data handling.
>
> The  question  is: whether you presumed such behavior of table? if so are there single-row selection
> table and multiple-row selection tables support?

No, see below.

> AFAIK  there  is no such notion as "currently selected row" in repeat module of xForms or any xForms
> event to handle it. Or is there something? - please advise.

That's incorrect ;-)

XForms has the concept of *repeat index*. Each xforms:repeat has an
associated index. Orbeon Forms uses the index to add classes to the HTML
DOM: xforms-repeat-selected-item-1 and xforms-repeat-selected-item-2,
which by default set a background color. This is why you see, within
repeated table rows, the current row highlighted.

You can modify the index with the xforms:setindex action, and read it
with the index() XPath function.

I hope this helps,

-Erik

--
Orbeon Forms - XForms Everywhere
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re[2]: selected row in tables

ozenzin
Erik,

thank  you - it is helpful. You'r right - with help of xpath:index() I can retrieve the selected row
data and use it as "value for Table".

thanks,
Oleg
--
                          mailto:[hidden email]


Tuesday, November 21, 2006, 10:52:41 PM, Erik:

> Oleg,

> [hidden email] wrote:
>> I  see  that  xfrom:repeat  being rendered as table provides ability to highlight currently selected
>> row.  This  leads  some  of  our  forms users to retrieve a value of table, i.e. they interpret that
>> selected row as value of table and hope to use it for further data handling.
>>
>> The  question  is: whether you presumed such behavior of table? if so are there single-row selection
>> table and multiple-row selection tables support?

> No, see below.

>> AFAIK  there  is no such notion as "currently selected row" in repeat module of xForms or any xForms
>> event to handle it. Or is there something? - please advise.

> That's incorrect ;-)

> XForms has the concept of *repeat index*. Each xforms:repeat has an
> associated index. Orbeon Forms uses the index to add classes to the HTML
> DOM: xforms-repeat-selected-item-1 and xforms-repeat-selected-item-2,
> which by default set a background color. This is why you see, within
> repeated table rows, the current row highlighted.

> You can modify the index with the xforms:setindex action, and read it
> with the index() XPath function.

> I hope this helps,

> -Erik





--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws