Re: Re: Sorting datable breaks select values

Posted by Louis Ratzesberger on
URL: https://discuss.orbeon.com/Sorting-datable-breaks-select-values-tp1568796p1570402.html

Thank you Alex.

Excellent. 

I was unable, however, to code a solution that does not
utilize xxform:variable -- good for Orbeon, possibly an
issue for XForms ( or my coding skills).

Best,
Hank

Quoting Alessandro Vernet <[hidden email]>:

> Hank,
>
> This is a very interesting example and question. There are two problems:
>
> 1) Since all the xforms:select1 are bound to the same node, they will
> all receive an xforms-value-changed, while you want only the one the
> user clicked on to receive an event. Instead of xforms-value-changed,
> you need to use the xforms-select event.
>
> 2) The order of the nodes in the repeat is not the same as the order
> of the nodes in the instance. So if users click on the second row, the
> data corresponding to that is not necessarily in the second ojoin in
> the instance. Inside the repeat, you want to know: what is the
> position of this ojoin in the instance? The answer is:
> <xxforms:variable name="position"
> select="count(preceding-sibling::ojoin) + 1"/>.
>
> And here is the updated example:
>
> http://gist.github.com/315165
>
> Alex
>
> On Wed, Feb 24, 2010 at 8:50 PM, Louis Ratzesberger
> <[hidden email]> wrote:
>> Hi,
>>
>> I am using the fr:datable XBL wizard and after I sort the table, the
>> select I have refers to data in the original sort order.  I have
>> tried using variables and index() and I get some different results --
>> basically other problems.
>>
>> The interface is GMail like, with select controls created in a repeat
>> element block. I have a example for the sandbox, it has most of my
>> original code, hopefully not too complicated.
>>
>> http://gist.github.com/314246
>>
>> Anyone else using the datable like this?
>>
>> Thanks,
>> Hank
>>
>> --
>> Hank Ratzesberger
>> [hidden email]
>>
>> --
>> 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
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>
>
>
> --
> Orbeon Forms - Web forms, open-source, for the Enterprise -
> http://www.orbeon.com/
> My Twitter: http://twitter.com/avernet
>

 

--
Hank Ratzesberger
[hidden email]



--
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
OW2 mailing lists service home page: http://www.ow2.org/wws