Minor issues with xforms table

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

Minor issues with xforms table

Jacques-Alexandre Gerber

Hi,

 

I have several issues I can’t resolve with the attached xform:

 

1.When I click the “Insert New Row” button, it does insert a new row, but when I click on the date picker for the new row, it does not show up. For some reason I cannot provide a date for any row but the first one.

 

2.In the last column, I’m supposed to show an image that allows the user to remove the corresponding row. I can’t find a way to get the image to display. It always shows a button.

 

3.Last problem: I’d like to show the “remove” button only if there is more than one row left in the table. I’ve tried to use xxforms:if but I could not get it to work.

 

I am using an “unstable” release of OPS that I downloaded on Nov.16th (ie 4 days ago).

 

Any thoughts toward solving these issues would be much appreciated.

 

Thanks,

 

JAG



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

table.xml (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Minor issues with xforms table

Erik Bruchez
Administrator
Jacques-Alexandre Gerber wrote:

 > 1.When I click the "Insert New Row" button, it does insert a new
 > row, but when I click on the date picker for the new row, it does
 > not show up. For some reason I cannot provide a date for any row but
 > the first one.

This seems to be caused by the use of xxforms:if. We should document
that this construct doesn't work with XForms NG, because you can use
XForms "relevant" bindings instead, e.g. bind your trigger to a node
with a binding that determines its visibility:

<xforms:trigger ref="instance('utils')/remove-trigger">
   ...

 > 2.In the last column, I'm supposed to show an image that allows the
 > user to remove the corresponding row. I can't find a way to get the
 > image to display. It always shows a button.

You should use appearance="xxforms:image" instead of
xxforms:appearance="image". Note that in the future, we may instead go
with using xforms:label, as other XForms engines have gone this way.

 > 3.Last problem: I'd like to show the "remove" button only if there
 > is more than one row left in the table. I've tried to use xxforms:if
 > but I could not get it to work.

 > Any thoughts toward solving these issues would be much appreciated.

I also attach a working version of your example!

-Erik

<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
            xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
            xmlns:ev="http://www.w3.org/2001/xml-events"
            xmlns:f="http://orbeon.org/oxf/xml/formatting"
            xmlns:xhtml="http://www.w3.org/1999/xhtml">
    <xhtml:head>
        <xforms:model>
            <xforms:instance id="taskoutput">
                <output>
                    <details>
                        <request>
                            <from/>
                            <to/>
                            <hours/>
                        </request>
                    </details>
                </output>
            </xforms:instance>
            <xforms:instance id="utils">
                <utils>
                    <remove-trigger/>
                </utils>
            </xforms:instance>
            <xforms:bind nodeset="/output/details/request/from" type="xs:date"/>
            <xforms:bind nodeset="/output/details/request/to" type="xs:date"/>
           
            <xforms:bind nodeset="instance('utils')/remove-trigger" relevant="count(instance('taskoutput')/details/request) &gt; 1"/>
        </xforms:model>
    </xhtml:head>
    <xhtml:body>
        <xforms:group ref="instance('taskoutput')">
            <xhtml:table
                    style="width: 100%; border-width: 1px; cell-padding: 4px; cell-spacing: 0px; border-collapse: collapse; border-style: solid; border-color: #333333">
                <xhtml:tr>
                    <xhtml:td
                            style="background-color: #CCCCCC; border-width: 1px; border-collapse: collapse; border-style: solid; border-color: #333333">
                        From</xhtml:td>
                    <xhtml:td
                            style="background-color: #CCCCCC; border-width: 1px; border-collapse: collapse; border-style: solid; border-color: #333333">
                        To</xhtml:td>
                    <xhtml:td
                            style="background-color: #CCCCCC; border-width: 1px; border-collapse: collapse; border-style: solid; border-color: #333333">
                        Nb Hours</xhtml:td>
                    <xhtml:td
                            style="background-color: #CCCCCC; border-width: 1px; border-collapse: collapse; border-style: solid; border-color: #333333">
                        Remove</xhtml:td>
                </xhtml:tr>
                <xforms:group ref="details">
                    <xforms:repeat nodeset="request" id="lineSet">
                        <xhtml:tr>
                            <xhtml:td
                                    style="border-width: 1px; border-collapse: collapse; border-style: solid; border-color: #333333">
                                <xforms:input ref="from">
                                    <xforms:label></xforms:label>
                                    <xforms:help>First day when you will be away from the office</xforms:help>
                                </xforms:input>
                            </xhtml:td>
                            <xhtml:td
                                    style="border-width: 1px; border-collapse: collapse; border-style: solid; border-color: #333333">
                                <xforms:input ref="to">
                                    <xforms:label></xforms:label>
                                    <xforms:help>Last day when you will be away from the office</xforms:help>
                                </xforms:input>
                            </xhtml:td>
                            <xhtml:td
                                    style="border-width: 1px; border-collapse: collapse; border-style: solid; border-color: #333333">
                                <xforms:input ref="hours">
                                    <xforms:label></xforms:label>
                                    <xforms:help>Number of working hours you will be missing</xforms:help>
                                </xforms:input>
                            </xhtml:td>
                            <xhtml:td
                                    style="border-width: 1px; border-collapse: collapse; border-style: solid; border-color: #333333; text-align: center">
                                <xforms:trigger appearance="xxforms:image" ref="instance('utils')/remove-trigger">
                                    <xxforms:img src="/images/remove.png"/>
                                    <xforms:label/>
                                    <xforms:delete ev:event="DOMActivate"
                                                   nodeset="instance('taskoutput')/details/request"
                                                   at="index('lineSet')"/>
                                </xforms:trigger>
                            </xhtml:td>
                        </xhtml:tr>
                    </xforms:repeat>
                </xforms:group>
            </xhtml:table>
            <xforms:trigger>
                <xforms:label>Insert New Row</xforms:label>
                <xforms:insert ev:event="DOMActivate" nodeset="instance('taskoutput')/details/request" at="last()"
                               position="after"/>
            </xforms:trigger>
        </xforms:group>
    </xhtml:body>
</xhtml:html>


--
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: Minor issues with xforms table

Jacques-Alexandre Gerber
In reply to this post by Jacques-Alexandre Gerber
Erik,

Thank you very much for your help. I still have issue#1, though. I can
select a date only in the first row. If you insert a second row and then
try to pick a date in the second row, the date picker does not show up.

Any clue?

Thanks again,

JAG

-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: Sunday, November 20, 2005 5:30 PM
To: [hidden email]
Subject: Re: [ops-users] Minor issues with xforms table

Jacques-Alexandre Gerber wrote:

 > 1.When I click the "Insert New Row" button, it does insert a new
 > row, but when I click on the date picker for the new row, it does
 > not show up. For some reason I cannot provide a date for any row but
 > the first one.

This seems to be caused by the use of xxforms:if. We should document
that this construct doesn't work with XForms NG, because you can use
XForms "relevant" bindings instead, e.g. bind your trigger to a node
with a binding that determines its visibility:

<xforms:trigger ref="instance('utils')/remove-trigger">
   ...

 > 2.In the last column, I'm supposed to show an image that allows the
 > user to remove the corresponding row. I can't find a way to get the
 > image to display. It always shows a button.

You should use appearance="xxforms:image" instead of
xxforms:appearance="image". Note that in the future, we may instead go
with using xforms:label, as other XForms engines have gone this way.

 > 3.Last problem: I'd like to show the "remove" button only if there
 > is more than one row left in the table. I've tried to use xxforms:if
 > but I could not get it to work.

 > Any thoughts toward solving these issues would be much appreciated.

I also attach a working version of your example!

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

Re: Minor issues with xforms table

Erik Bruchez
Administrator
It seems like this only fails with IE. Is that what you are using?

-Erik

Jacques-Alexandre Gerber wrote:

> Erik,
>
> Thank you very much for your help. I still have issue#1, though. I can
> select a date only in the first row. If you insert a second row and then
> try to pick a date in the second row, the date picker does not show up.
>
> Any clue?
>
> Thanks again,
>
> JAG


--
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: Minor issues with xforms table

Jacques-Alexandre Gerber
In reply to this post by Jacques-Alexandre Gerber
Yes, IE version 6.0 sp2. Any workaround known to you?

JAG

-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: Sunday, November 20, 2005 8:17 PM
To: [hidden email]
Subject: Re: [ops-users] Minor issues with xforms table

It seems like this only fails with IE. Is that what you are using?

-Erik

Jacques-Alexandre Gerber wrote:
> Erik,
>
> Thank you very much for your help. I still have issue#1, though. I can
> select a date only in the first row. If you insert a second row and
then
> try to pick a date in the second row, the date picker does not show
up.
>
> Any clue?
>
> Thanks again,
>
> JAG




--
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: Minor issues with xforms table

Erik Bruchez
Administrator
Besides using Firefox for now, no ;-)

This is a bug and it will just have to be fixed. Here is the reference
to track it:

https://forge.objectweb.org/tracker/index.php?func=detail&aid=304305&group_id=168&atid=350207

-Erik

Jacques-Alexandre Gerber wrote:
> Yes, IE version 6.0 sp2. Any workaround known to you?
>
> JAG



--
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: Minor issues with xforms table

Alessandro  Vernet
Administrator
On 11/20/05, Erik Bruchez <[hidden email]> wrote:
> This is a bug and it will just have to be fixed. Here is the reference
> to track it:
>
> https://forge.objectweb.org/tracker/index.php?func=detail&aid=304305&group_id=168&atid=350207

Hi Jacques-Alexandre,

This bug is fixed now. As usual the fix is included in the latest
"unstable build".

Alex
--
Blog (XML, Web apps, Open Source): 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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

RE: Minor issues with xforms table

Jacques-Alexandre Gerber
In reply to this post by Jacques-Alexandre Gerber
Indeed, this is now fixed. Thanks!

JAG

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Alessandro Vernet
Sent: Tuesday, November 22, 2005 11:40 PM
To: [hidden email]
Subject: Re: [ops-users] Minor issues with xforms table

On 11/20/05, Erik Bruchez <[hidden email]> wrote:
> This is a bug and it will just have to be fixed. Here is the reference
> to track it:
>
>
https://forge.objectweb.org/tracker/index.php?func=detail&aid=304305&gro
up_id=168&atid=350207

Hi Jacques-Alexandre,

This bug is fixed now. As usual the fix is included in the latest
"unstable build".

Alex
--
Blog (XML, Web apps, Open Source): 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