multi-column datatables

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

multi-column datatables

 element in the datatable has a "repeat-nodeset" attribute equal to 'record.'  I would take this approach, but the XML I'm currently working with looks like this:

<attr>
  <attrlabl/>
  <attrdef/>
  <attrdefs/>
  <attrdomv>
     <edom>
        ...
     </edom>
     <rdom>
        ...
     </rdom>
     <codesetd>
        ...
     </codesetd>
     <udom/>
  </attrdomv>
  <begdatea/>
  <enddatea/>
     ...
     ...
</attr>

I want to use the <begdatea> and <enddatea> elements as a single record in the datatable (<begdatea> first column, <enddatea> second column), but I don't wish to alter the XML to supply that "wrapper" element.

Is it possible to use XPath to grab the correct nodeset to use within the attribute of <xforms:repeat>? One approach I've tried is:

child::*[name() = 'begdatea' or name() = 'enddatea']

and then set the ref attributes of the cells equal to:

.[name() = 'begdatea']
.[name() = 'enddatea']


But this causes the first enddatea element to appear on the SECOND row of the second column, instead of the first row of the first column where I imagine it should be.


Also, on a side note, has the index() problem been fixed with the datatables, as referred to in this thread?


http://www.nabble.com/New-Generation-Datatables---Issue-with-Index-td24122576.html#a24122576



Thanks in advance!


---Philip
Philip.Cantin
Hi All,

I'm running into a bit of a problem when using the <fr:datatable> component to create multi-column datatables.

In the 'datatable-ng' sandbox example, I notice that the nodes used for rows in the datatable are wrapped in a <record> element, and the
Reply | Threaded
Open this post in threaded view
|

Re: multi-column datatables

 element in the datatable has a "repeat-nodeset" attribute equal to 'record.'  I would take this approach, but the XML I'm currently working with looks like this:

<attr>
  <attrlabl/>
  <attrdef/>
  <attrdefs/>
  <attrdomv>
     <edom>
        ...
     </edom>
     <rdom>
        ...
     </rdom>
     <codesetd>
        ...
     </codesetd>
     <udom/>
  </attrdomv>
  <begdatea/>
  <enddatea/>
     ...
     ...
</attr>

I want to use the <begdatea> and <enddatea> elements as a single record in the datatable (<begdatea> first column, <enddatea> second column), but I don't wish to alter the XML to supply that "wrapper" element.

Is it possible to use XPath to grab the correct nodeset to use within the attribute of <xforms:repeat>? One approach I've tried is:

child::*[name() = 'begdatea' or name() = 'enddatea']

and then set the ref attributes of the cells equal to:

.[name() = 'begdatea']
.[name() = 'enddatea']


But this causes the first enddatea element to appear on the SECOND row of the second column, instead of the first row of the first column where I imagine it should be.


Also, on a side note, has the index() problem been fixed with the datatables, as referred to in this thread?


http://www.nabble.com/New-Generation-Datatables---Issue-with-Index-td24122576.html#a24122576



Thanks in advance!


---Philip
Philip.Cantin
Okay, well I was able to work around this problem easily by just creating a separate instance with the XML from the main instance but with the extra wrapper element.

However, I can't seem to figure out how to get triggers outside of the datatable to recognize the current row that is selected.

To illustrate my problem a little more, I've attached some zipped sample code to this message. Basically what I want to happen is this:

1) Type in an attribute label for the first Attribute section. The datatable should be updated accordingly (it's a list of attribute labels)
2) Add another Attribute section, and type in an attribute label for that section.
3) Select the first row in the datatable, click the 'Go To' button, and in the first Attribute section, the text field near 'Selected?' should say 'true.'

I had tried to accomplish this using the XForms index() function, but it seems that doesn't work with datatable repeats. Is this bug going to be fixed in the near future? And if not, what would be a viable workaround for having the 'Go To' trigger know what is the current row in the datatable?

Thanks in advance!


---Philip


xforms-datatable-test.zip


Philip.Cantin wrote
Hi All,

I'm running into a bit of a problem when using the <fr:datatable> component to create multi-column datatables.

In the 'datatable-ng' sandbox example, I notice that the nodes used for rows in the datatable are wrapped in a <record> element, and the
Reply | Threaded
Open this post in threaded view
|

Re: Re: multi-column datatables

Erik Bruchez
Administrator
Philip,

The non-working index() function is a limitation of the current XBL
implementation wrt id resolution. We have notes on the wiki about
this:

http://sites.google.com/a/orbeon.com/forms/projects/xbl-scoping-improvements#TOC-Scenarios-for-XPath-resolution

We are in fact working on fixing this right now, and this particular
issue might already be fixed on our "development" branch:

http://github.com/orbeon/orbeon-forms/commits/development

I would recommend waiting a few days and then try a build from that branch:

http://forge.objectweb.org/nightlybuilds/ops/ops/

-Erik

On Tue, Sep 15, 2009 at 12:29 PM, Philip.Cantin <[hidden email]> wrote:

>
> Okay, well I was able to work around this problem easily by just creating a
> separate instance with the XML from the main instance but with the extra
> wrapper element.
>
> However, I can't seem to figure out how to get triggers outside of the
> datatable to recognize the current row that is selected.
>
> To illustrate my problem a little more, I've attached some zipped sample
> code to this message. Basically what I want to happen is this:
>
> 1) Type in an attribute label for the first Attribute section. The datatable
> should be updated accordingly (it's a list of attribute labels)
> 2) Add another Attribute section, and type in an attribute label for that
> section.
> 3) Select the first row in the datatable, click the 'Go To' button, and in
> the first Attribute section, the text field near 'Selected?' should say
> 'true.'
>
> I had tried to accomplish this using the XForms index() function, but it
> seems that doesn't work with datatable repeats. Is this bug going to be
> fixed in the near future? And if not, what would be a viable workaround for
> having the 'Go To' trigger know what is the current row in the datatable?
>
> Thanks in advance!
>
>
> ---Philip
>
>
> http://www.nabble.com/file/p25460170/xforms-datatable-test.zip
> xforms-datatable-test.zip
>
>
>
> Philip.Cantin wrote:
>>
>> Hi All,
>>
>> I'm running into a bit of a problem when using the <fr:datatable>
>> component to create multi-column datatables.
>>
>> In the 'datatable-ng' sandbox example, I notice that the nodes used for
>> rows in the datatable are wrapped in a <record> element, and the <tr>
>> element in the datatable has a "repeat-nodeset" attribute equal to
>> 'record.'  I would take this approach, but the XML I'm currently working
>> with looks like this:
>>
>> <attr>
>>   <attrlabl/>
>>   <attrdef/>
>>   <attrdefs/>
>>   <attrdomv>
>>      <edom>
>>         ...
>>      </edom>
>>      <rdom>
>>         ...
>>      </rdom>
>>      <codesetd>
>>         ...
>>      </codesetd>
>>      <udom/>
>>   </attrdomv>
>>   <begdatea/>
>>   <enddatea/>
>>      ...
>>      ...
>> </attr>
>>
>> I want to use the <begdatea> and <enddatea> elements as a single record in
>> the datatable (<begdatea> first column, <enddatea> second column), but I
>> don't wish to alter the XML to supply that "wrapper" element.
>>
>> Is it possible to use XPath to grab the correct nodeset to use within the
>> attribute of <xforms:repeat>? One approach I've tried is:
>>
>> child::*[name() = 'begdatea' or name() = 'enddatea']
>>
>> and then set the ref attributes of the cells equal to:
>>
>> .[name() = 'begdatea']
>> .[name() = 'enddatea']
>>
>>
>> But this causes the first enddatea element to appear on the SECOND row of
>> the second column, instead of the first row of the first column where I
>> imagine it should be.
>>
>>
>> Also, on a side note, has the index() problem been fixed with the
>> datatables, as referred to in this thread?
>>
>>
>> http://www.nabble.com/New-Generation-Datatables---Issue-with-Index-td24122576.html#a24122576
>>
>>
>>
>> Thanks in advance!
>>
>>
>> ---Philip
>>
>
> --
> View this message in context: http://www.nabble.com/multi-column-datatables-tp25385756p25460170.html
> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.
>
>
>
> --
> 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
>
>


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: multi-column datatables

>> element in the datatable has a "repeat-nodeset" attribute equal to
>> 'record.'  I would take this approach, but the XML I'm currently working
>> with looks like this:
>>
>> <attr>
>>   <attrlabl/>
>>   <attrdef/>
>>   <attrdefs/>
>>   <attrdomv>
>>      <edom>
>>         ...
>>      </edom>
>>      <rdom>
>>         ...
>>      </rdom>
>>      <codesetd>
>>         ...
>>      </codesetd>
>>      <udom/>
>>   </attrdomv>
>>   <begdatea/>
>>   <enddatea/>
>>      ...
>>      ...
>> </attr>
>>
>> I want to use the <begdatea> and <enddatea> elements as a single record in
>> the datatable (<begdatea> first column, <enddatea> second column), but I
>> don't wish to alter the XML to supply that "wrapper" element.
>>
>> Is it possible to use XPath to grab the correct nodeset to use within the
>> attribute of <xforms:repeat>? One approach I've tried is:
>>
>> child::*[name() = 'begdatea' or name() = 'enddatea']
>>
>> and then set the ref attributes of the cells equal to:
>>
>> .[name() = 'begdatea']
>> .[name() = 'enddatea']
>>
>>
>> But this causes the first enddatea element to appear on the SECOND row of
>> the second column, instead of the first row of the first column where I
>> imagine it should be.
>>
>>
>> Also, on a side note, has the index() problem been fixed with the
>> datatables, as referred to in this thread?
>>
>>
>> http://www.nabble.com/New-Generation-Datatables---Issue-with-Index-td24122576.html#a24122576
>>
>>
>>
>> Thanks in advance!
>>
>>
>> ---Philip
>>
>
> --
> View this message in context: http://www.nabble.com/multi-column-datatables-tp25385756p25460170.html
> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.
>
>
>
> --
> You receive this message as a subscriber of the ops-users@ow2.org mailing list.
> To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
> For general help: mailto:sympa@ow2.org?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Erik Bruchez
Administrator
BTW I checked that this is in fact not quite yet fixed on the development branch, so it will be necessary to wait a little more. But it's coming along!

-Erik

Erik Bruchez wrote
Philip,

The non-working index() function is a limitation of the current XBL
implementation wrt id resolution. We have notes on the wiki about
this:

http://sites.google.com/a/orbeon.com/forms/projects/xbl-scoping-improvements#TOC-Scenarios-for-XPath-resolution

We are in fact working on fixing this right now, and this particular
issue might already be fixed on our "development" branch:

http://github.com/orbeon/orbeon-forms/commits/development

I would recommend waiting a few days and then try a build from that branch:

http://forge.objectweb.org/nightlybuilds/ops/ops/

-Erik

On Tue, Sep 15, 2009 at 12:29 PM, Philip.Cantin <pjcantin@gmail.com> wrote:
>
> Okay, well I was able to work around this problem easily by just creating a
> separate instance with the XML from the main instance but with the extra
> wrapper element.
>
> However, I can't seem to figure out how to get triggers outside of the
> datatable to recognize the current row that is selected.
>
> To illustrate my problem a little more, I've attached some zipped sample
> code to this message. Basically what I want to happen is this:
>
> 1) Type in an attribute label for the first Attribute section. The datatable
> should be updated accordingly (it's a list of attribute labels)
> 2) Add another Attribute section, and type in an attribute label for that
> section.
> 3) Select the first row in the datatable, click the 'Go To' button, and in
> the first Attribute section, the text field near 'Selected?' should say
> 'true.'
>
> I had tried to accomplish this using the XForms index() function, but it
> seems that doesn't work with datatable repeats. Is this bug going to be
> fixed in the near future? And if not, what would be a viable workaround for
> having the 'Go To' trigger know what is the current row in the datatable?
>
> Thanks in advance!
>
>
> ---Philip
>
>
> http://www.nabble.com/file/p25460170/xforms-datatable-test.zip
> xforms-datatable-test.zip
>
>
>
> Philip.Cantin wrote:
>>
>> Hi All,
>>
>> I'm running into a bit of a problem when using the <fr:datatable>
>> component to create multi-column datatables.
>>
>> In the 'datatable-ng' sandbox example, I notice that the nodes used for
>> rows in the datatable are wrapped in a <record> element, and the
Reply | Threaded
Open this post in threaded view
|

Re: Re: multi-column datatables

Philip.Cantin
Erik/Alex,

I just wanted to ask once again how the fix for this was progressing. And at the time this is fixed, is there a chance it will be included in regular nightly builds?

Thanks in advance!


---Philip


Erik Bruchez wrote
BTW I checked that this is in fact not quite yet fixed on the development branch, so it will be necessary to wait a little more. But it's coming along!

-Erik
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: multi-column datatables

Erik Bruchez
Administrator
Philip,

The core code handling XBL id resolution and XPath resolution is now
done on the development branch. The fr:datatable itself has not yet
been updated though. That should happen in the next 1-2 weeks. Sorry
about that delay, but it will be hard to do it before then.

The code is already included in the development nightly builds. We
haven't yet decided exactly if/when/how that will be folded into the
master branch, but it will certainly be available in nightly builds.

-Erik

On Tue, Sep 29, 2009 at 1:28 PM, Philip.Cantin <[hidden email]> wrote:

>
> Erik/Alex,
>
> I just wanted to ask once again how the fix for this was progressing. And at
> the time this is fixed, is there a chance it will be included in regular
> nightly builds?
>
> Thanks in advance!
>
>
> ---Philip
>
>
>
> Erik Bruchez wrote:
>>
>> BTW I checked that this is in fact not quite yet fixed on the development
>> branch, so it will be necessary to wait a little more. But it's coming
>> along!
>>
>> -Erik
>>
>
> --
> View this message in context: http://www.nabble.com/multi-column-datatables-tp25385756p25670300.html
> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.
>
>
>
> --
> 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
>
>


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: multi-column datatables

Erik Bruchez
Administrator
Philip,

A quick note to say that the datatable on the development branch
should now handle ids properly. Feel free to give it a try!

-Erik

On Tue, Sep 29, 2009 at 2:14 PM, Erik Bruchez <[hidden email]> wrote:

> Philip,
>
> The core code handling XBL id resolution and XPath resolution is now
> done on the development branch. The fr:datatable itself has not yet
> been updated though. That should happen in the next 1-2 weeks. Sorry
> about that delay, but it will be hard to do it before then.
>
> The code is already included in the development nightly builds. We
> haven't yet decided exactly if/when/how that will be folded into the
> master branch, but it will certainly be available in nightly builds.
>
> -Erik
>
> On Tue, Sep 29, 2009 at 1:28 PM, Philip.Cantin <[hidden email]> wrote:
>>
>> Erik/Alex,
>>
>> I just wanted to ask once again how the fix for this was progressing. And at
>> the time this is fixed, is there a chance it will be included in regular
>> nightly builds?
>>
>> Thanks in advance!
>>
>>
>> ---Philip
>>
>>
>>
>> Erik Bruchez wrote:
>>>
>>> BTW I checked that this is in fact not quite yet fixed on the development
>>> branch, so it will be necessary to wait a little more. But it's coming
>>> along!
>>>
>>> -Erik
>>>
>>
>> --
>> View this message in context: http://www.nabble.com/multi-column-datatables-tp25385756p25670300.html
>> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> 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
>>
>>
>


--
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