Creating link in repeat nodeset

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

Creating link in repeat nodeset

Christian Lebe-2

Dear all,

 

I am an Orbeon starter. The following question should be quite simple, but I could find any solution L

Basically, I would like to create a link (normal a href link) from a repeat nodeset xml.

 

Here’s my xml format:

 

<xf:instance id="xforms">

                <xforms xmlns="">

                    <xform>

                        <oid />

                        <type />

                        <created />

                        <created_by />

                        <link />

                    </xform>

                </xforms>

            </xf:instance>

 

Basically the link has got the absolute addresses (ie. http://myorbeonserver.com/)

 

And my output model would be:

<tr>

                            <th>Form Oid</th><th>Created</th><th>Created_by</th><th>Type</th><th>View</th>

                        </tr>

                        <xf:repeat nodeset="instance('xforms')/xform">

                        <tr>

                            <td>

                                <xf:output ref="oid" />

                            </td>

                            <td>

                                <xf:output ref="created" />

                            </td>

                            <td>

                                <xf:output ref="created_by" />

                            </td>

                            <td>

                                <xf:output ref="type" />

                            </td>

                            <td>

                                <xf:output ref="link" />

                            </td>

                        </tr>

                        </xf:repeat>

 

I’ve spinned my head around to make the output ref=”link” to become a clickable link but it seems that I cant figure out any way to do it. Could you please give me enlightment? I have tried:

1. putting it in submission

2. putting it in trigger button (it does display a button, but I cant click it)

 

Also, A hint to relative address would also be appreciated. I have tried to read the URL rewriting in Orbeon documentation, but it seems that I cant get it working.

 

Thank you so much for your help J

 

 

Christian



--
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: Creating link in repeat nodeset

Alexander Žaťko
Christian ,

Instead of:

                            <td>

                                <xf:output ref="link" />

                            </td>


...try something like this:

<xhtml:td>
    <xforms:trigger appearance="xxforms:link">
        <xforms:label>
            <xforms:output ref="@link-label"/>
        </xforms:label>
        <xforms:action ev:event="DOMActivate">
            <xforms:send submission="sub01"/>
        </xforms:action>
    </xforms:trigger>   
</xhtml:td>

you will need to create also a submission in your model with the action attribute containing a literal, or an AVT:

<xforms:submission id="sub01" method="get" action="{instance('your-instance')/link}" replace="all"/>

A.

On Jul 11, 2007, at 5:40 AM, Christian Lebe wrote:

Dear all,

 

I am an Orbeon starter. The following question should be quite simple, but I could find any solution L

Basically, I would like to create a link (normal a href link) from a repeat nodeset xml.

 

Here’s my xml format:

 

<xf:instance id="xforms">

                <xforms xmlns="">

                    <xform>

                        <oid />

                        <type />

                        <created />

                        <created_by />

                        <link />

                    </xform>

                </xforms>

            </xf:instance>

 

Basically the link has got the absolute addresses (ie. http://myorbeonserver.com/)

 

And my output model would be:

<tr>

                            <th>Form Oid</th><th>Created</th><th>Created_by</th><th>Type</th><th>View</th>

                        </tr>

                        <xf:repeat nodeset="instance('xforms')/xform">

                        <tr>

                            <td>

                                <xf:output ref="oid" />

                            </td>

                            <td>

                                <xf:output ref="created" />

                            </td>

                            <td>

                                <xf:output ref="created_by" />

                            </td>

                            <td>

                                <xf:output ref="type" />

                            </td>

                            <td>

                                <xf:output ref="link" />

                            </td>

                        </tr>

                        </xf:repeat>

 

I’ve spinned my head around to make the output ref=”link” to become a clickable link but it seems that I cant figure out any way to do it. Could you please give me enlightment? I have tried:

1. putting it in submission

2. putting it in trigger button (it does display a button, but I cant click it)

 

Also, A hint to relative address would also be appreciated. I have tried to read the URL rewriting in Orbeon documentation, but it seems that I cant get it working.

 

Thank you so much for your help J

 

 

Christian


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

RE: Creating link in repeat nodeset

Christian Lebe-2
In reply to this post by Christian Lebe-2

Hi Alexander,

 

Thank you so much for your help J

 

I am almost there. I can see the button and it actually tries to load the page, except, <xforms:submission id="sub01" method="get" action="{instance('your-instance')/link}" replace="all"/>

That doest compile well, so I get rid of the curly bracket. But then it doesn’t translate the link well. It still gives the action as instance(‘your-instance’)/link on the web browser

Any idea?

 

 

Cheers,

 

Christian


From: Alexander Zatko [mailto:[hidden email]]
Sent: Wednesday, 11 July 2007 3:12 PM
To: [hidden email]
Subject: Re: [ops-users] Creating link in repeat nodeset

 

Christian ,

 

Instead of:

 

                            <td>

                                <xf:output ref="link" />

                            </td>

 

...try something like this:

 

<xhtml:td>

    <xforms:trigger appearance="xxforms:link">

        <xforms:label>

            <xforms:output ref="@link-label"/>

        </xforms:label>

        <xforms:action ev:event="DOMActivate">

            <xforms:send submission="sub01"/>

        </xforms:action>

    </xforms:trigger>   

</xhtml:td>

 

you will need to create also a submission in your model with the action attribute containing a literal, or an AVT:

 

<xforms:submission id="sub01" method="get" action="{instance('your-instance')/link}" replace="all"/>

 

A.

 

On Jul 11, 2007, at 5:40 AM, Christian Lebe wrote:



Dear all,

 

I am an Orbeon starter. The following question should be quite simple, but I could find any solution L

Basically, I would like to create a link (normal a href link) from a repeat nodeset xml.

 

Here’s my xml format:

 

<xf:instance id="xforms">

                <xforms xmlns="">

                    <xform>

                        <oid />

                        <type />

                        <created />

                        <created_by />

                        <link />

                    </xform>

                </xforms>

            </xf:instance>

 

Basically the link has got the absolute addresses (ie. http://myorbeonserver.com/)

 

And my output model would be:

<tr>

                            <th>Form Oid</th><th>Created</th><th>Created_by</th><th>Type</th><th>View</th>

                        </tr>

                        <xf:repeat nodeset="instance('xforms')/xform">

                        <tr>

                            <td>

                                <xf:output ref="oid" />

                            </td>

                            <td>

                                <xf:output ref="created" />

                            </td>

                            <td>

                                <xf:output ref="created_by" />

                            </td>

                            <td>

                                <xf:output ref="type" />

                            </td>

                            <td>

                                <xf:output ref="link" />

                            </td>

                        </tr>

                        </xf:repeat>

 

I’ve spinned my head around to make the output ref=”link” to become a clickable link but it seems that I cant figure out any way to do it. Could you please give me enlightment? I have tried:

1. putting it in submission

2. putting it in trigger button (it does display a button, but I cant click it)

 

Also, A hint to relative address would also be appreciated. I have tried to read the URL rewriting in Orbeon documentation, but it seems that I cant get it working.

 

Thank you so much for your help J

 

 

Christian

 

--

You receive this message as a subscriber of the [hidden email] mailing list.

To unsubscribe: [hidden email]

For general help: [hidden email]

ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Creating link in repeat nodeset

Erik Bruchez
Administrator
Christian and Alex,

You can do simpler :-)

     <xforms:trigger appearance="minimal">
         <xforms:label><xforms:output ref="@link-label"/></xforms:label>
         <xforms:load ev:event="DOMActivate" resource="{link}"/>
     </xforms:trigger>

Note two things:

* No need for a submission
* Use the "minimal" appearance instead of the deprecated "xxforms:link"
appearance

-Erik

Christian Lebe wrote:
 > Hi Alexander,
 >
 >
 >
 > Thank you so much for your help J
 >
 >
 >
 > I am almost there. I can see the button and it actually tries to load
 > the page, except, <xforms:submission id="sub01" method="get"
 > action="{instance('your-instance')/link}" replace="all"/>
 >
 > That doest compile well, so I get rid of the curly bracket. But then it
 > doesn’t translate the link well. It still gives the action as
 > instance(‘your-instance’)/link on the web browser
 >
 > Any idea?
 >
 >
 >
 >
 >
 > Cheers,
 >
 >
 >
 > Christian
 >
 > ------------------------------------------------------------------------
 >
 > *From:* Alexander Zatko [mailto:[hidden email]]
 > *Sent:* Wednesday, 11 July 2007 3:12 PM
 > *To:* [hidden email]
 > *Subject:* Re: [ops-users] Creating link in repeat nodeset
 >
 >
 >
 > Christian ,
 >
 >
 >
 > Instead of:
 >
 >
 >
 >>                             <td>
 >>
 >>                                 <xf:output ref="link" />
 >>
 >>                             </td>
 >>
 >
 >
 > ...try something like this:
 >
 >
 >
 > <xhtml:td>
 >
 >     <xforms:trigger appearance="xxforms:link">
 >
 >         <xforms:label>
 >
 >             <xforms:output ref="@link-label"/>
 >
 >         </xforms:label>
 >
 >         <xforms:action ev:event="DOMActivate">
 >
 >             <xforms:send submission="sub01"/>
 >
 >         </xforms:action>
 >
 >     </xforms:trigger>
 >
 > </xhtml:td>
 >
 >
 >
 > you will need to create also a submission in your model with the action
 > attribute containing a literal, or an AVT:
 >
 >
 >
 > <xforms:submission id="sub01" method="get"
 > action="{instance('your-instance')/link}" replace="all"/>
 >
 >
 >
 > A.
 >
 >
 >
 > On Jul 11, 2007, at 5:40 AM, Christian Lebe wrote:
 >
 >
 >
 > Dear all,
 >
 >
 >
 > I am an Orbeon starter. The following question should be quite simple,
 > but I could find any solution L
 >
 > Basically, I would like to create a link (normal a href link) from a
 > repeat nodeset xml.
 >
 >
 >
 > Here’s my xml format:
 >
 >
 >
 > <xf:instance id="xforms">
 >
 >                 <xforms xmlns="">
 >
 >                     <xform>
 >
 >                         <oid />
 >
 >                         <type />
 >
 >                         <created />
 >
 >                         <created_by />
 >
 >                         <link />
 >
 >                     </xform>
 >
 >                 </xforms>
 >
 >             </xf:instance>
 >
 >
 >
 > Basically the link has got the absolute addresses (ie.
 > http://myorbeonserver.com/)
 >
 >
 >
 > And my output model would be:
 >
 > <tr>
 >
 >                             <th>Form
 > Oid</th><th>Created</th><th>Created_by</th><th>Type</th><th>View</th>
 >
 >                         </tr>
 >
 >                         <xf:repeat nodeset="instance('xforms')/xform">
 >
 >                         <tr>
 >
 >                             <td>
 >
 >                                 <xf:output ref="oid" />
 >
 >                             </td>
 >
 >                             <td>
 >
 >                                 <xf:output ref="created" />
 >
 >                             </td>
 >
 >                             <td>
 >
 >                                 <xf:output ref="created_by" />
 >
 >                             </td>
 >
 >                             <td>
 >
 >                                 <xf:output ref="type" />
 >
 >                             </td>
 >
 >                             <td>
 >
 >                                 <xf:output ref="link" />
 >
 >                             </td>
 >
 >                         </tr>
 >
 >                         </xf:repeat>
 >
 >
 >
 > I’ve spinned my head around to make the output ref=”link” to become a
 > clickable link but it seems that I cant figure out any way to do it.
 > Could you please give me enlightment? I have tried:
 >
 > 1. putting it in submission
 >
 > 2. putting it in trigger button (it does display a button, but I cant
 > click it)
 >
 >
 >
 > Also, A hint to relative address would also be appreciated. I have tried
 > to read the URL rewriting in Orbeon documentation, but it seems that I
 > cant get it working.
 >
 >
 >
 > Thank you so much for your help J
 >
 >
 >
 >
 >
 > Christian
 >
 >
 >
 > --
 >
 > You receive this message as a subscriber of the [hidden email]
 > <mailto:[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
 >
 >
 >


--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Creating link in repeat nodeset

Jency Chackummoottil
In reply to this post by Christian Lebe-2

Hi Christian,

 

Try <xforms:submission id="sub01" method="get" action="{{instance('your-instance')/link}}" replace="all"/>

2 curly braces are added in action. This should work.

 

Regards

Jency

 

 

From: Christian Lebe [mailto:[hidden email]]
Sent: Wednesday, July 11, 2007 1:30 PM
To: [hidden email]
Cc: [hidden email]
Subject: RE: [ops-users] Creating link in repeat nodeset

 

Hi Alexander,

 

Thank you so much for your help J

 

I am almost there. I can see the button and it actually tries to load the page, except, <xforms:submission id="sub01" method="get" action="{instance('your-instance')/link}" replace="all"/>

That doest compile well, so I get rid of the curly bracket. But then it doesn’t translate the link well. It still gives the action as instance(‘your-instance’)/link on the web browser

Any idea?

 

 

Cheers,

 

Christian


From: Alexander Zatko [mailto:[hidden email]]
Sent: Wednesday, 11 July 2007 3:12 PM
To: [hidden email]
Subject: Re: [ops-users] Creating link in repeat nodeset

 

Christian ,

 

Instead of:

 

                            <td>

                                <xf:output ref="link" />

                            </td>

 

...try something like this:

 

<xhtml:td>

    <xforms:trigger appearance="xxforms:link">

        <xforms:label>

            <xforms:output ref="@link-label"/>

        </xforms:label>

        <xforms:action ev:event="DOMActivate">

            <xforms:send submission="sub01"/>

        </xforms:action>

    </xforms:trigger>   

</xhtml:td>

 

you will need to create also a submission in your model with the action attribute containing a literal, or an AVT:

 

<xforms:submission id="sub01" method="get" action="{instance('your-instance')/link}" replace="all"/>

 

A.

 

On Jul 11, 2007, at 5:40 AM, Christian Lebe wrote:

 

Dear all,

 

I am an Orbeon starter. The following question should be quite simple, but I could find any solution L

 

Basically, I would like to create a link (normal a href link) from a repeat nodeset xml.

 

Here’s my xml format:

 

<xf:instance id="xforms">

                <xforms xmlns="">

                    <xform>

                        <oid />

                        <type />

                        <created />

                        <created_by />

                        <link />

                    </xform>

                </xforms>

            </xf:instance>

 

Basically the link has got the absolute addresses (ie. http://myorbeonserver.com/)

 

And my output model would be:

<tr>

                            <th>Form Oid</th><th>Created</th><th>Created_by</th><th>Type</th><th>View</th>

                        </tr>

                        <xf:repeat nodeset="instance('xforms')/xform">

                        <tr>

                            <td>

                                <xf:output ref="oid" />

                            </td>

                            <td>

                                <xf:output ref="created" />

                            </td>

                            <td>

                                <xf:output ref="created_by" />

                            </td>

                            <td>

                                <xf:output ref="type" />

                            </td>

                            <td>

                                <xf:output ref="link" />

                            </td>

                        </tr>

                        </xf:repeat>

 

I’ve spinned my head around to make the output ref=”link” to become a clickable link but it seems that I cant figure out any way to do it. Could you please give me enlightment? I have tried:

1. putting it in submission

2. putting it in trigger button (it does display a button, but I cant click it)

 

Also, A hint to relative address would also be appreciated. I have tried to read the URL rewriting in Orbeon documentation, but it seems that I cant get it working.

 

Thank you so much for your help J

 

 

 

Christian

 

--

You receive this message as a subscriber of the [hidden email] mailing list.

To unsubscribe: [hidden email]

For general help: [hidden email]

ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Creating link in repeat nodeset

Erik Bruchez
Administrator
In reply to this post by Erik Bruchez
A couple more details if you want to be perfect: there is no need for
<xforms:output> within <xforms:label>.

Also, if your URI is already completely specified in the <link> element,
that is if you don't need to compute it further using XPath, you can use
the @ref attribute instead of the @resource attribute on <xforms:load>:

     <xforms:trigger appearance="minimal">
         <xforms:label ref="@link-label"/>
         <xforms:load ev:event="DOMActivate" ref="link"/>
     </xforms:trigger>

-Erik

Erik Bruchez wrote:

> Christian and Alex,
>
> You can do simpler :-)
>
>     <xforms:trigger appearance="minimal">
>         <xforms:label><xforms:output ref="@link-label"/></xforms:label>
>         <xforms:load ev:event="DOMActivate" resource="{link}"/>
>     </xforms:trigger>
>
> Note two things:
>
> * No need for a submission
> * Use the "minimal" appearance instead of the deprecated "xxforms:link"
> appearance
>
> -Erik
>
> Christian Lebe wrote:
>  > Hi Alexander,
>  >
>  >
>  >
>  > Thank you so much for your help J
>  >
>  >
>  >
>  > I am almost there. I can see the button and it actually tries to load
>  > the page, except, <xforms:submission id="sub01" method="get"
>  > action="{instance('your-instance')/link}" replace="all"/>
>  >
>  > That doest compile well, so I get rid of the curly bracket. But then it
>  > doesn’t translate the link well. It still gives the action as
>  > instance(‘your-instance’)/link on the web browser
>  >
>  > Any idea?
>  >
>  >
>  >
>  >
>  >
>  > Cheers,
>  >
>  >
>  >
>  > Christian
>  >
>  > ------------------------------------------------------------------------
>  >
>  > *From:* Alexander Zatko [mailto:[hidden email]]
>  > *Sent:* Wednesday, 11 July 2007 3:12 PM
>  > *To:* [hidden email]
>  > *Subject:* Re: [ops-users] Creating link in repeat nodeset
>  >
>  >
>  >
>  > Christian ,
>  >
>  >
>  >
>  > Instead of:
>  >
>  >
>  >
>  >>                             <td>
>  >>
>  >>                                 <xf:output ref="link" />
>  >>
>  >>                             </td>
>  >>
>  >
>  >
>  > ...try something like this:
>  >
>  >
>  >
>  > <xhtml:td>
>  >
>  >     <xforms:trigger appearance="xxforms:link">
>  >
>  >         <xforms:label>
>  >
>  >             <xforms:output ref="@link-label"/>
>  >
>  >         </xforms:label>
>  >
>  >         <xforms:action ev:event="DOMActivate">
>  >
>  >             <xforms:send submission="sub01"/>
>  >
>  >         </xforms:action>
>  >
>  >     </xforms:trigger>
>  >
>  > </xhtml:td>
>  >
>  >
>  >
>  > you will need to create also a submission in your model with the action
>  > attribute containing a literal, or an AVT:
>  >
>  >
>  >
>  > <xforms:submission id="sub01" method="get"
>  > action="{instance('your-instance')/link}" replace="all"/>
>  >
>  >
>  >
>  > A.
>  >
>  >
>  >
>  > On Jul 11, 2007, at 5:40 AM, Christian Lebe wrote:
>  >
>  >
>  >
>  > Dear all,
>  >
>  >
>  >
>  > I am an Orbeon starter. The following question should be quite simple,
>  > but I could find any solution L
>  >
>  > Basically, I would like to create a link (normal a href link) from a
>  > repeat nodeset xml.
>  >
>  >
>  >
>  > Here’s my xml format:
>  >
>  >
>  >
>  > <xf:instance id="xforms">
>  >
>  >                 <xforms xmlns="">
>  >
>  >                     <xform>
>  >
>  >                         <oid />
>  >
>  >                         <type />
>  >
>  >                         <created />
>  >
>  >                         <created_by />
>  >
>  >                         <link />
>  >
>  >                     </xform>
>  >
>  >                 </xforms>
>  >
>  >             </xf:instance>
>  >
>  >
>  >
>  > Basically the link has got the absolute addresses (ie.
>  > http://myorbeonserver.com/)
>  >
>  >
>  >
>  > And my output model would be:
>  >
>  > <tr>
>  >
>  >                             <th>Form
>  > Oid</th><th>Created</th><th>Created_by</th><th>Type</th><th>View</th>
>  >
>  >                         </tr>
>  >
>  >                         <xf:repeat nodeset="instance('xforms')/xform">
>  >
>  >                         <tr>
>  >
>  >                             <td>
>  >
>  >                                 <xf:output ref="oid" />
>  >
>  >                             </td>
>  >
>  >                             <td>
>  >
>  >                                 <xf:output ref="created" />
>  >
>  >                             </td>
>  >
>  >                             <td>
>  >
>  >                                 <xf:output ref="created_by" />
>  >
>  >                             </td>
>  >
>  >                             <td>
>  >
>  >                                 <xf:output ref="type" />
>  >
>  >                             </td>
>  >
>  >                             <td>
>  >
>  >                                 <xf:output ref="link" />
>  >
>  >                             </td>
>  >
>  >                         </tr>
>  >
>  >                         </xf:repeat>
>  >
>  >
>  >
>  > I’ve spinned my head around to make the output ref=”link” to become a
>  > clickable link but it seems that I cant figure out any way to do it.
>  > Could you please give me enlightment? I have tried:
>  >
>  > 1. putting it in submission
>  >
>  > 2. putting it in trigger button (it does display a button, but I cant
>  > click it)
>  >
>  >
>  >
>  > Also, A hint to relative address would also be appreciated. I have tried
>  > to read the URL rewriting in Orbeon documentation, but it seems that I
>  > cant get it working.
>  >
>  >
>  >
>  > Thank you so much for your help J
>  >
>  >
>  >
>  >
>  >
>  > Christian
>  >
>  >
>  >
>  > --
>  >
>  > You receive this message as a subscriber of the [hidden email]
>  > <mailto:[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
>  >
>  >
>  >
>
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Creating link in repeat nodeset

Christian Lebe-2
In reply to this post by Christian Lebe-2
Thanks guys :)

That solved my problem :)

Thank you so much!

Cheers,
 
Christian

-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]]
Sent: Wednesday, 11 July 2007 5:40 PM
To: [hidden email]
Subject: Re: [ops-users] Creating link in repeat nodeset

A couple more details if you want to be perfect: there is no need for
<xforms:output> within <xforms:label>.

Also, if your URI is already completely specified in the <link> element,

that is if you don't need to compute it further using XPath, you can use

the @ref attribute instead of the @resource attribute on <xforms:load>:

     <xforms:trigger appearance="minimal">
         <xforms:label ref="@link-label"/>
         <xforms:load ev:event="DOMActivate" ref="link"/>
     </xforms:trigger>

-Erik

Erik Bruchez wrote:
> Christian and Alex,
>
> You can do simpler :-)
>
>     <xforms:trigger appearance="minimal">
>         <xforms:label><xforms:output
ref="@link-label"/></xforms:label>
>         <xforms:load ev:event="DOMActivate" resource="{link}"/>
>     </xforms:trigger>
>
> Note two things:
>
> * No need for a submission
> * Use the "minimal" appearance instead of the deprecated
"xxforms:link"

> appearance
>
> -Erik
>
> Christian Lebe wrote:
>  > Hi Alexander,
>  >
>  >
>  >
>  > Thank you so much for your help J
>  >
>  >
>  >
>  > I am almost there. I can see the button and it actually tries to
load
>  > the page, except, <xforms:submission id="sub01" method="get"
>  > action="{instance('your-instance')/link}" replace="all"/>
>  >
>  > That doest compile well, so I get rid of the curly bracket. But
then it

>  > doesn't translate the link well. It still gives the action as
>  > instance('your-instance')/link on the web browser
>  >
>  > Any idea?
>  >
>  >
>  >
>  >
>  >
>  > Cheers,
>  >
>  >
>  >
>  > Christian
>  >
>  >
------------------------------------------------------------------------

>  >
>  > *From:* Alexander Zatko [mailto:[hidden email]]
>  > *Sent:* Wednesday, 11 July 2007 3:12 PM
>  > *To:* [hidden email]
>  > *Subject:* Re: [ops-users] Creating link in repeat nodeset
>  >
>  >
>  >
>  > Christian ,
>  >
>  >
>  >
>  > Instead of:
>  >
>  >
>  >
>  >>                             <td>
>  >>
>  >>                                 <xf:output ref="link" />
>  >>
>  >>                             </td>
>  >>
>  >
>  >
>  > ...try something like this:
>  >
>  >
>  >
>  > <xhtml:td>
>  >
>  >     <xforms:trigger appearance="xxforms:link">
>  >
>  >         <xforms:label>
>  >
>  >             <xforms:output ref="@link-label"/>
>  >
>  >         </xforms:label>
>  >
>  >         <xforms:action ev:event="DOMActivate">
>  >
>  >             <xforms:send submission="sub01"/>
>  >
>  >         </xforms:action>
>  >
>  >     </xforms:trigger>
>  >
>  > </xhtml:td>
>  >
>  >
>  >
>  > you will need to create also a submission in your model with the
action

>  > attribute containing a literal, or an AVT:
>  >
>  >
>  >
>  > <xforms:submission id="sub01" method="get"
>  > action="{instance('your-instance')/link}" replace="all"/>
>  >
>  >
>  >
>  > A.
>  >
>  >
>  >
>  > On Jul 11, 2007, at 5:40 AM, Christian Lebe wrote:
>  >
>  >
>  >
>  > Dear all,
>  >
>  >
>  >
>  > I am an Orbeon starter. The following question should be quite
simple,
>  > but I could find any solution L
>  >
>  > Basically, I would like to create a link (normal a href link) from
a

>  > repeat nodeset xml.
>  >
>  >
>  >
>  > Here's my xml format:
>  >
>  >
>  >
>  > <xf:instance id="xforms">
>  >
>  >                 <xforms xmlns="">
>  >
>  >                     <xform>
>  >
>  >                         <oid />
>  >
>  >                         <type />
>  >
>  >                         <created />
>  >
>  >                         <created_by />
>  >
>  >                         <link />
>  >
>  >                     </xform>
>  >
>  >                 </xforms>
>  >
>  >             </xf:instance>
>  >
>  >
>  >
>  > Basically the link has got the absolute addresses (ie.
>  > http://myorbeonserver.com/)
>  >
>  >
>  >
>  > And my output model would be:
>  >
>  > <tr>
>  >
>  >                             <th>Form
>  >
Oid</th><th>Created</th><th>Created_by</th><th>Type</th><th>View</th>
>  >
>  >                         </tr>
>  >
>  >                         <xf:repeat
nodeset="instance('xforms')/xform">

>  >
>  >                         <tr>
>  >
>  >                             <td>
>  >
>  >                                 <xf:output ref="oid" />
>  >
>  >                             </td>
>  >
>  >                             <td>
>  >
>  >                                 <xf:output ref="created" />
>  >
>  >                             </td>
>  >
>  >                             <td>
>  >
>  >                                 <xf:output ref="created_by" />
>  >
>  >                             </td>
>  >
>  >                             <td>
>  >
>  >                                 <xf:output ref="type" />
>  >
>  >                             </td>
>  >
>  >                             <td>
>  >
>  >                                 <xf:output ref="link" />
>  >
>  >                             </td>
>  >
>  >                         </tr>
>  >
>  >                         </xf:repeat>
>  >
>  >
>  >
>  > I've spinned my head around to make the output ref="link" to become
a
>  > clickable link but it seems that I cant figure out any way to do
it.
>  > Could you please give me enlightment? I have tried:
>  >
>  > 1. putting it in submission
>  >
>  > 2. putting it in trigger button (it does display a button, but I
cant
>  > click it)
>  >
>  >
>  >
>  > Also, A hint to relative address would also be appreciated. I have
tried
>  > to read the URL rewriting in Orbeon documentation, but it seems
that I

>  > cant get it working.
>  >
>  >
>  >
>  > Thank you so much for your help J
>  >
>  >
>  >
>  >
>  >
>  > Christian
>  >
>  >
>  >
>  > --
>  >
>  > You receive this message as a subscriber of the
[hidden email]
>  > <mailto:[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
>  >
>  >
>  >
>
>


--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Creating link in repeat nodeset

Christian Lebe-2
In reply to this post by Christian Lebe-2
Hi all,

I've been reading the code for creating a configurable error summary:

http://www.orbeon.com/blog/2006/08/04/

Everything looks simple. However, I'm a bit lost, where do we define the
rule? Ie. Where do we define the rule for firstname (must contain
letters, etc).

Could anyone possible give me light on this? I've been looking at the
DMV form example in orbeon.com, but it seems very complicated. And I
cant find where the rule is being defined.


Any help would be very much appreciated.




--
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: Creating link in repeat nodeset

Alessandro Vernet
Administrator
Hi Christian,

On 7/11/07, Christian Lebe <[hidden email]> wrote:
> Everything looks simple. However, I'm a bit lost, where do we define the
> rule? Ie. Where do we define the rule for firstname (must contain
> letters, etc).

If you went through everything finding it simple and just miss how to
define the rule that validates "firstname", then you are in for a good
news: this is even simpler :). It is done with either an <xforms:bind
constraint="...">, a <xforms:bind type="...">, or a schema. In the
Government Forms example, this is done with a schema. In
apps/forms/forms/DMV-14/schema.xsd, you will find:

<xs:simpleType name="first-name">
    <xs:restriction base="dmv:requiredNonEmptyString">
        <xs:pattern value="[A-Z]([A-Z]|[a-z]|\-){0,9}"/>
    </xs:restriction>
</xs:simpleType>

But in your own application, especially if you don't already have a
schema, you might just want to use an <xforms:bind nodeset="path to
node" constraint="...">, where 'constraint' is an XPath expression
that validates the node 'nodeset' points to.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws