display input if its ref don't exist

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

display input if its ref don't exist

aa aa-2
Hi,
 
It is possible to display a xforms:input if its ref don't exist at the instance??
 
For example:
 

<xforms:instance id="datos-instance">

<datos xmlns="">

<referencia>

<input1>1</input1>

</referencia>

</datos>

</xforms:instance>
 
....

 

<p>

<xforms:input ref="/datos/formulario/input1" incremental="true">

<xforms:label>Input1: </xforms:label>

</xforms:input>

</p>

<p>

<xforms:input ref="/datos/formulario/input2" incremental="true">

<xforms:label>Input2: </xforms:label>

</xforms:input>

</p>

By default the second input is not display. It is possible to display it??
I tried with de relevant attribute but it doesn't work
 
Thank you,

Rubén



¡Ya está aquí Windows Live Spaces! Ahora podrás crear fácilmente tu propio sitio Web. Pruébalo

--
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: display input if its ref don't exist

Erik Bruchez
Administrator
Rubén,

Controls that are bound to a non-existing node are non-relevant. In
Orbeon Forms, by default, we don't show non-relevant controls at all.

It may be possible to change this with some CSS. A disabled control will
typically appear like this in the HTML:

<label class="fixed-width xforms-disabled xforms-label"
        for="xforms-element-22">Missing:</label>
<span id="xforms-element-22"
       class="xforms-control xforms-input xforms-disabled">
   ...
</span>

By default xforms-disabled has a display: none property. By overriding
xforms-disabled, you may be able to change this. I tried the following:

<div id="non-relevant-but-visible">
   <xforms:input ref="missing-node">
     <xforms:label class="fixed-width">Missing:</xforms:label>
   </xforms:input>
</div>

However, the input control appears enabled when you do that. But that's
a step in the right direction.

-Erik

aa aa wrote:

> Hi,
>  
> It is possible to display a xforms:input if its ref don't exist at the
> instance??
>  
> For example:
>  
>
> <xforms:instance id="datos-instance">
>
> <datos xmlns="">
>
> <referencia>
>
> <input1>1</input1>
>
> </referencia>
>
> </datos>
>
> </xforms:instance>
>  
> ....
>
>  
>
> <p>
>
> <xforms:input ref="/datos/formulario/input1" incremental="true">
>
> <xforms:label>Input1: </xforms:label>
>
> </xforms:input>
>
> </p>
>
> <p>
>
> <xforms:input ref="/datos/formulario/input2" incremental="true">
>
> <xforms:label>Input2: </xforms:label>
>
> </xforms:input>
>
> </p>
>
> By default the second input is not display. It is possible to display it??
> I tried with de relevant attribute but it doesn't work
>  
> Thank you,
>
> Rubén
>
>
> ------------------------------------------------------------------------
> ¡Ya está aquí Windows Live Spaces! Ahora podrás crear fácilmente tu
> propio sitio Web. Pruébalo <http://spaces.live.com/signup.aspx>
>

--
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: display input if its ref don't exist

aa aa-2
In reply to this post by aa aa-2
Thank you very much.
 
It works perfectly!

> Date: Wed, 27 Jun 2007 00:35:14 +0200
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [ops-users] display input if its ref don't exist
>
> Rubén,
>
> Controls that are bound to a non-existing node are non-relevant. In
> Orbeon Forms, by default, we don't show non-relevant controls at all.
>
> It may be possible to change this with some CSS. A disabled control will
> typically appear like this in the HTML:
>
> <label class="fixed-width xforms-disabled xforms-label"
> for="xforms-element-22">Missing:</label>
> <span id="xforms-element-22"
> class="xforms-control xforms-input xforms-disabled">
> ...
> </span>
>
> By default xforms-disabled has a display: none property. By overriding
> xforms-disabled, you may be able to change this. I tried the following:
>
> <div id="non-relevant-but-visible">
> <xforms:input ref="missing-node">
> <xforms:label class="fixed-width">Missing:</xforms:label>
> </xforms:input>
> </div>
>
> However, the input control appears enabled when you do that. But that's
> a step in the right direction.
>
> -Erik
>
> aa aa wrote:
> > Hi,
> >
> > It is possible to display a xforms:input if its ref don't exist at the
> > instance??
> >
> > For example:
> >
> >
> > <xforms:instance id="datos-instance">
> >
> > <datos xmlns="">
> >
> > <referencia>
> >
> > <input1>1</input1>
> >
> > </referencia>
> >
> > </datos>
> >
> > </xforms:instance>
> >
> > ....
> >
> >
> >
> > <p>
> >
> > <xforms:input ref="/datos/formulario/input1" incremental="true">
> >
> > <xforms:label>Input1: </xforms:label>
> >
> > </xforms:input>
> >
> > </p>
> >
> > <p>
> >
> > <xforms:input ref="/datos/formulario/input2" incremental="true">
> >
> > <xforms:label>Input2: </xforms:label>
> >
> > </xforms:input>
> >
> > </p>
> >
> > By default the second input is not display. It is possible to display it??
> > I tried with de relevant attribute but it doesn't work
> >
> > Thank you,
> >
> > Rubén
> >
> >
> > ------------------------------------------------------------------------
> > ¡Ya está aquí Windows Live Spaces! Ahora podrás crear fácilmente tu
> > propio sitio Web. Pruébalo <http://spaces.live.com/signup.aspx>
> >
>
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>



Busca desde cualquier página Web con una protección excepcional. Consigue la Barra de herramientas de Windows Live hoy mismo GRATUITAMENTE. Pruébalo

--
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: display input if its ref don't exist

Erik Bruchez
Administrator
But would you prefer to see the control visible but read-only, or the
way it is now (i.e. you can click in it and enter data)?

-Erik

aa aa wrote:

> Thank you very much.
>  
> It works perfectly!
>
>  > Date: Wed, 27 Jun 2007 00:35:14 +0200
>  > From: [hidden email]
>  > To: [hidden email]
>  > Subject: Re: [ops-users] display input if its ref don't exist
>  >
>  > Rubén,
>  >
>  > Controls that are bound to a non-existing node are non-relevant. In
>  > Orbeon Forms, by default, we don't show non-relevant controls at all.
>  >
>  > It may be possible to change this with some CSS. A disabled control will
>  > typically appear like this in the HTML:
>  >
>  > <label class="fixed-width xforms-disabled xforms-label"
>  > for="xforms-element-22">Missing:</label>
>  > <span id="xforms-element-22"
>  > class="xforms-control xforms-input xforms-disabled">
>  > ...
>  > </span>
>  >
>  > By default xforms-disabled has a display: none property. By overriding
>  > xforms-disabled, you may be able to change this. I tried the following:
>  >
>  > <div id="non-relevant-but-visible">
>  > <xforms:input ref="missing-node">
>  > <xforms:label class="fixed-width">Missing:</xforms:label>
>  > </xforms:input>
>  > </div>
>  >
>  > However, the input control appears enabled when you do that. But that's
>  > a step in the right direction.
>  >
>  > -Erik
>  >
>  > aa aa wrote:
>  > > Hi,
>  > >
>  > > It is possible to display a xforms:input if its ref don't exist at the
>  > > instance??
>  > >
>  > > For example:
>  > >
>  > >
>  > > <xforms:instance id="datos-instance">
>  > >
>  > > <datos xmlns="">
>  > >
>  > > <referencia>
>  > >
>  > > <input1>1</input1>
>  > >
>  > > </referencia>
>  > >
>  > > </datos>
>  > >
>  > > </xforms:instance>
>  > >
>  > > ....
>  > >
>  > >
>  > >
>  > > <p>
>  > >
>  > > <xforms:input ref="/datos/formulario/input1" incremental="true">
>  > >
>  > > <xforms:label>Input1: </xforms:label>
>  > >
>  > > </xforms:input>
>  > >
>  > > </p>
>  > >
>  > > <p>
>  > >
>  > > <xforms:input ref="/datos/formulario/input2" incremental="true">
>  > >
>  > > <xforms:label>Input2: </xforms:label>
>  > >
>  > > </xforms:input>
>  > >
>  > > </p>
>  > >
>  > > By default the second input is not display. It is possible to
> display it??
>  > > I tried with de relevant attribute but it doesn't work
>  > >
>  > > Thank you,
>  > >
>  > > Rubén
>  > >
>  > >
>  > >
> ------------------------------------------------------------------------
>  > > ¡Ya está aquí Windows Live Spaces! Ahora podrás crear fácilmente tu
>  > > propio sitio Web. Pruébalo <http://spaces.live.com/signup.aspx>
>  > >
>  >
>  >
>  > --
>  > Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>  > http://www.orbeon.com/
>  >
>
>
> ------------------------------------------------------------------------
> Busca desde cualquier página Web con una protección excepcional.
> Consigue la Barra de herramientas de Windows Live hoy mismo
> GRATUITAMENTE. Pruébalo <http://www.toolbar.live.com>
>

--
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: display input if its ref don't exist

aa aa-2
In reply to this post by aa aa-2
I want to can click in it and enter data.
 
Sometimes we have a incomplete xml, but we want to see all the inputs.

> Date: Wed, 27 Jun 2007 12:55:36 +0200
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [ops-users] display input if its ref don't exist
>
> But would you prefer to see the control visible but read-only, or the
> way it is now (i.e. you can click in it and enter data)?
>
> -Erik
>
> aa aa wrote:
> > Thank you very much.
> >
> > It works perfectly!
> >
> > > Date: Wed, 27 Jun 2007 00:35:14 +0200
> > > From: [hidden email]
> > > To: [hidden email]
> > > Subject: Re: [ops-users] display input if its ref don't exist
> > >
> > > Rubén,
> > >
> > > Controls that are bound to a non-existing node are non-relevant. In
> > > Orbeon Forms, by default, we don't show non-relevant controls at all.
> > >
> > > It may be possible to change this with some CSS. A disabled control will
> > > typically appear like this in the HTML:
> > >
> > > <label class="fixed-width xforms-disabled xforms-label"
> > > for="xforms-element-22">Missing:</label>
> > > <span id="xforms-element-22"
> > > class="xforms-control xforms-input xforms-disabled">
> > > ...
> > > </span>
> > >
> > > By default xforms-disabled has a display: none property. By overriding
> > > xforms-disabled, you may be able to change this. I tried the following:
> > >
> > > <div id="non-relevant-but-visible">
> > > <xforms:input ref="missing-node">
> > > <xforms:label class="fixed-width">Missing:</xforms:label>
> > > </xforms:input>
> > > </div>
> > >
> > > However, the input control appears enabled when you do that. But that's
> > > a step in the right direction.
> > >
> > > -Erik
> > >
> > > aa aa wrote:
> > > > Hi,
> > > >
> > > > It is possible to display a xforms:input if its ref don't exist at the
> > > > instance??
> > > >
> > > > For example:
> > > >
> > > >
> > > > <xforms:instance id="datos-instance">
> > > >
> > > > <datos xmlns="">
> > > >
> > > > <referencia>
> > > >
> > > > <input1>1</input1>
> > > >
> > > > </referencia>
> > > >
> > > > </datos>
> > > >
> > > > </xforms:instance>
> > > >
> > > > ....
> > > >
> > > >
> > > >
> > > > <p>
> > > >
> > > > <xforms:input ref="/datos/formulario/input1" incremental="true">
> > > >
> > > > <xforms:label>Input1: </xforms:label>
> > > >
> > > > </xforms:input>
> > > >
> > > > </p>
> > > >
> > > > <p>
> > > >
> > > > <xforms:input ref="/datos/formulario/input2" incremental="true">
> > > >
> > > > <xforms:label>Input2: </xforms:label>
> > > >
> > > > </xforms:input>
> > > >
> > > > </p>
> > > >
> > > > By default the second input is not display. It is possible to
> > display it??
> > > > I tried with de relevant attribute but it doesn't work
> > > >
> > > > Thank you,
> > > >
> > > > Rubén
> > > >
> > > >
> > > >
> > ------------------------------------------------------------------------
> > > > ¡Ya está aquí Windows Live Spaces! Ahora podrás crear fácilmente tu
> > > > propio sitio Web. Pruébalo <http://spaces.live.com/signup.aspx>
> > > >
> > >
> > >
> > > --
> > > Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> > > http://www.orbeon.com/
> > >
> >
> >
> > ------------------------------------------------------------------------
> > Busca desde cualquier página Web con una protección excepcional.
> > Consigue la Barra de herramientas de Windows Live hoy mismo
> > GRATUITAMENTE. Pruébalo <http://www.toolbar.live.com>
> >
>
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>



Llama a tus amigos de PC a PC: ¡Es GRATIS! Pruébalo

--
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: display input if its ref don't exist

Alessandro Vernet
Administrator
On 6/27/07, aa aa <[hidden email]> wrote:
>  I want to can click in it and enter data.
>
>  Sometimes we have a incomplete xml, but we want to see all the inputs.

But what happens if you enter data? It won't have anywhere to go,
since there is no node to which the input is bound and where the data
could be stored. Is this what you want?

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

RE: display input if its ref don't exist

aa aa-2
In reply to this post by aa aa-2
Thank you very much, now I undestand the problem.
 
Of course I would like to stored the data. But sometimes we receive a xml without any node. Por example:
 
This is a complete xml:
 
<document>
  <telephone1>12345</telephone1>
  <telephone2>54321</telephone2>
</document>
 
An this one is a case when the person only have one telephone:
 
<document>
  <telephone1>12345</telephone1>
</document>
 
But in the form we always want to display both inputs. What we can do when we receive the second xml?? We have to preprocess the xml and add "<telephone2/>"? This is very complecated in a big xml with a lot of nodes...
 
Thank you in advance!

> Date: Thu, 28 Jun 2007 16:21:27 -0700
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [ops-users] display input if its ref don't exist
>
> On 6/27/07, aa aa <[hidden email]> wrote:
> > I want to can click in it and enter data.
> >
> > Sometimes we have a incomplete xml, but we want to see all the inputs.
>
> But what happens if you enter data? It won't have anywhere to go,
> since there is no node to which the input is bound and where the data
> could be stored. Is this what you want?
>
> Alex
> --
> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
> http://www.orbeon.com/
>



Busca desde cualquier página Web con una protección excepcional. Consigue la Barra de herramientas de Windows Live hoy mismo GRATUITAMENTE. Pruébalo

--
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: display input if its ref don't exist

Erik Bruchez
Administrator
In XForms, a control that captures data has to be bound to a node,
otherwise it is considered non-relevant, i.e. not accessible to the user
(in this case it is usually invisible, or grayed out).

If you want, XML data nodes are like variables holding control values.
This is a fundamental aspect of XForms and it's hard to change it.

I think you have a few options:

* Do what you suggested, i.e. pre-process your XML document to add the
missing fields.

* Use an "Add phone number" button which uses xforms:insert to add the
telephone2 field.

-Erik

aa aa wrote:

> Thank you very much, now I undestand the problem.
>  
> Of course I would like to stored the data. But sometimes we receive a
> xml without any node. Por example:
>  
> This is a complete xml:
>  
> <document>
>   <telephone1>12345</telephone1>
>   <telephone2>54321</telephone2>
> </document>
>  
> An this one is a case when the person only have one telephone:
>  
> <document>
>   <telephone1>12345</telephone1>
> </document>
>  
> But in the form we always want to display both inputs. What we can do
> when we receive the second xml?? We have to preprocess the xml and add
> "<telephone2/>"? This is very complecated in a big xml with a lot of
> nodes...
>  
> Thank you in advance!
>
>  > Date: Thu, 28 Jun 2007 16:21:27 -0700
>  > From: [hidden email]
>  > To: [hidden email]
>  > Subject: Re: [ops-users] display input if its ref don't exist
>  >
>  > On 6/27/07, aa aa <[hidden email]> wrote:
>  > > I want to can click in it and enter data.
>  > >
>  > > Sometimes we have a incomplete xml, but we want to see all the inputs.
>  >
>  > But what happens if you enter data? It won't have anywhere to go,
>  > since there is no node to which the input is bound and where the data
>  > could be stored. Is this what you want?
>  >
>  > Alex
>  > --
>  > Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
>  > http://www.orbeon.com/
>  >
>
>
> ------------------------------------------------------------------------
> Busca desde cualquier página Web con una protección excepcional.
> Consigue la Barra de herramientas de Windows Live hoy mismo
> GRATUITAMENTE. Pruébalo <http://www.toolbar.live.com>
>

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