Show input text with no associated reference

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

Show input text with no associated reference

aa aa-2
Hello,

First of all, i'm sorry for my bad english, if you don't understand something, tell me, please.
I want ask you for a problem that i don't know how i can resolve.

I have the following code:

<xforms:input ref="Pob">
                        <xforms:label class="sort-label">Población a 1 de Enero</xforms:label>
</xforms:input>


It's possible 'Pob' reference are not in the xml associated file and i can't change the xml structure.
I need this input are displaying <span onclick="dr4sdgryt2(event)" style="cursor: pointer;">even though is empty. It will be in read-only mode, I'll never save this data form in the xml file.

Thank you in advance.
Jesús.


¡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: Show input text with no associated reference

Hank Ratzesberger

What if the input was bound to a different instance?  Then it 
would always be there, whether or not it was in the instance of 
the  "associated file" .  Then, you would need to use events like
xforms-ready and value-changed to copy the value from 
the associated file ( or a default value if it is not in the 
file).

Can you process the associated file with xslt and insure that 
a value is there?

Regards,
Hank Ratzesberger
UCSB


On Sep 14, 2007, at 12:27 AM, aa aa wrote:

Hello,

First of all, i'm sorry for my bad english, if you don't understand something, tell me, please.
I want ask you for a problem that i don't know how i can resolve.

I have the following code:

<xforms:input ref="Pob">
                        <xforms:label class="sort-label">Población a 1 de Enero</xforms:label>
</xforms:input>


It's possible 'Pob' reference are not in the xml associated file and i can't change the xml structure.
I need this input are displaying <SPAN onclick="dr4sdgryt2(event)" style="cursor: pointer;">even though is empty. It will be in read-only mode, I'll never save this data form in the xml file.

Thank you in advance.
Jesús.


¡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: [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: Show input text with no associated reference

aa aa-2
Sorry, I don't understand what you have told me.

The users can import a xml file with no optional parameters. Then, they can see the form and if their xml file had not that optional paramaters, the fields of that parameters aren't in the form and y I would like they are in the form.

Thank you


From: [hidden email]
Date: Fri, 14 Sep 2007 13:43:49 -0700
To: [hidden email]
Subject: Re: [ops-users] Show input text with no associated reference


What if the input was bound to a different instance?  Then it 
would always be there, whether or not it was in the instance of 
the  "associated file" .  Then, you would need to use events like
xforms-ready and value-changed to copy the value from 
the associated file ( or a default value if it is not in the 
file).

Can you process the associated file with xslt and insure that 
a value is there?

Regards,
Hank Ratzesberger
UCSB


On Sep 14, 2007, at 12:27 AM, aa aa wrote:

Hello,

First of all, i'm sorry for my bad english, if you don't understand something, tell me, please.
I want ask you for a problem that i don't know how i can resolve.

I have the following code:

<xforms:input ref="Pob">
                        <xforms:label class="sort-label">Población a 1 de Enero</xforms:label>
</xforms:input>


It's possible 'Pob' reference are not in the xml associated file and i can't change the xml structure.
I need this input are displaying even though is empty. It will be in read-only mode, I'll never save this data form in the xml file.

Thank you in advance.
Jesús.


¡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: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



Prueba algunos de los nuevos servicios en línea que te ofrece Windows Live Ideas: tan nuevos que ni siquiera se han publicado oficialmente todavía. 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: Show input text with no associated reference

Erik Bruchez
Administrator
In reply to this post by aa aa-2
Jesús,

In XForms, a control that is bound to a non-existing node is considered
"non-relevant". This in general means that the control is not visible at
all, although XForms allows implementations to show non-relevant
controls as disabled.

However, not that even if you display the control as disabled, then
users won't be able to enter data in them.

So could you precise why exactly you need to see the control on screen
when it is not bound to any data?

-Erik

aa aa wrote:

> Hello,
>
> First of all, i'm sorry for my bad english, if you don't understand
> something, tell me, please.
> I want ask you for a problem that i don't know how i can resolve.
>
> I have the following code:
>
> <xforms:input ref="Pob">
>                         <xforms:label class="sort-label">Población a 1
> de Enero</xforms:label>
> </xforms:input>
>
>
> It's possible 'Pob' reference are not in the xml associated file and i
> can't change the xml structure.
> I need this input are displaying even though is empty. It will be in
> read-only mode, I'll never save this data form in the xml file.
>
> Thank you in advance.
> Jesús.
--
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: Show input text with no associated reference

aa aa-2
Customer requirements. He always wants see the <input type='text'> field.


> Date: Mon, 17 Sep 2007 15:20:33 +0200
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [ops-users] Show input text with no associated reference
>
> Jesús,
>
> In XForms, a control that is bound to a non-existing node is considered
> "non-relevant". This in general means that the control is not visible at
> all, although XForms allows implementations to show non-relevant
> controls as disabled.
>
> However, not that even if you display the control as disabled, then
> users won't be able to enter data in them.
>
> So could you precise why exactly you need to see the control on screen
> when it is not bound to any data?
>
> -Erik
>
> aa aa wrote:
> > Hello,
> >
> > First of all, i'm sorry for my bad english, if you don't understand
> > something, tell me, please.
> > I want ask you for a problem that i don't know how i can resolve.
> >
> > I have the following code:
> >
> > <xforms:input ref="Pob">
> > <xforms:label class="sort-label">Población a 1
> > de Enero</xforms:label>
> > </xforms:input>
> >
> >
> > It's possible 'Pob' reference are not in the xml associated file and i
> > can't change the xml structure.
> > I need this input are displaying even though is empty. It will be in
> > read-only mode, I'll never save this data form in the xml file.
> >
> > Thank you in advance.
> > Jesús.
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>


¡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: Show input text with no associated reference

Erik Bruchez
Administrator
In reply to this post by aa aa-2
Jesús,

In XForms, controls have to be bound to existing XML nodes (elements
or attributes). If they are bound to non-existing nodes, then the
controls are disabled or not shown at all.

This can be solved in two ways:

1. Next to controls that may or may not have associated nodes, add a
    trigger (appearing as a button, link, image) that can be used to
    insert a new node in the XML document with xforms:insert. Once the
    node is inserted, the control will appear. You may also want a
    trigger doing an xforms:delete to remove the node.

2. Pre-process the XML document (e.g. with XSLT) in advance to all all
    the possible nodes. This may or may not be desirable in your
    case. Then post-process the document to remove the nodes when you
    are done, for example after submission.

-Erik

aa aa wrote:
 > Sorry, I don't understand what you have told me.
 >
 > The users can import a xml file with no optional parameters. Then, they
 > can see the form and if their xml file had not that optional paramaters,
 > the fields of that parameters aren't in the form and y I would like they
 > are in the form.
 >
 > Thank you
 >
 >
------------------------------------------------------------------------
 >     From: [hidden email]
 >     Date: Fri, 14 Sep 2007 13:43:49 -0700
 >     To: [hidden email]
 >     Subject: Re: [ops-users] Show input text with no associated reference
 >
 >
 >     What if the input was bound to a different instance?  Then it
 >     would always be there, whether or not it was in the instance of
 >     the  "associated file" .  Then, you would need to use events like
 >     xforms-ready and value-changed to copy the value from
 >     the associated file ( or a default value if it is not in the
 >     file).
 >
 >     Can you process the associated file with xslt and insure that
 >     a value is there?
 >
 >     Regards,
 >     Hank Ratzesberger
 >     UCSB
 >
 >
 >     On Sep 14, 2007, at 12:27 AM, aa aa wrote:
 >
 >         Hello,
 >
 >         First of all, i'm sorry for my bad english, if you don't
 >         understand something, tell me, please.
 >         I want ask you for a problem that i don't know how i can resolve.
 >
 >         I have the following code:
 >
 >         <xforms:input ref="Pob">
 >                                 <xforms:label
 >         class="sort-label">Población a 1 de Enero</xforms:label>
 >         </xforms:input>
 >
 >
 >         It's possible 'Pob' reference are not in the xml associated file
 >         and i can't change the xml structure.
 >         I need this input are displaying even though is empty. It will
 >         be in read-only mode, I'll never save this data form in the xml
 >         file.
 >
 >         Thank you in advance.
 >         Jesús.

--
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: Show input text with no associated reference

aa aa-2
Erik,

The first one is not possible because they don't need to change this field, they only want see this input text
The second one is not possible for me because they import a xml file with its md5 file and for this reason, if i pre-process the file, the md5 associated change and it's not possible.

In any case, thank you for spend your time in my question.

Jesús.

> Date: Tue, 18 Sep 2007 11:16:07 +0200
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [ops-users] Show input text with no associated reference
>
> Jesús,
>
> In XForms, controls have to be bound to existing XML nodes (elements
> or attributes). If they are bound to non-existing nodes, then the
> controls are disabled or not shown at all.
>
> This can be solved in two ways:
>
> 1. Next to controls that may or may not have associated nodes, add a
> trigger (appearing as a button, link, image) that can be used to
> insert a new node in the XML document with xforms:insert. Once the
> node is inserted, the control will appear. You may also want a
> trigger doing an xforms:delete to remove the node.
>
> 2. Pre-process the XML document (e.g. with XSLT) in advance to all all
> the possible nodes. This may or may not be desirable in your
> case. Then post-process the document to remove the nodes when you
> are done, for example after submission.
>
> -Erik
>
> aa aa wrote:
> > Sorry, I don't understand what you have told me.
> >
> > The users can import a xml file with no optional parameters. Then, they
> > can see the form and if their xml file had not that optional paramaters,
> > the fields of that parameters aren't in the form and y I would like they
> > are in the form.
> >
> > Thank you
> >
> >
> ------------------------------------------------------------------------
> > From: [hidden email]
> > Date: Fri, 14 Sep 2007 13:43:49 -0700
> > To: [hidden email]
> > Subject: Re: [ops-users] Show input text with no associated reference
> >
> >
> > What if the input was bound to a different instance? Then it
> > would always be there, whether or not it was in the instance of
> > the "associated file" . Then, you would need to use events like
> > xforms-ready and value-changed to copy the value from
> > the associated file ( or a default value if it is not in the
> > file).
> >
> > Can you process the associated file with xslt and insure that
> > a value is there?
> >
> > Regards,
> > Hank Ratzesberger
> > UCSB
> >
> >
> > On Sep 14, 2007, at 12:27 AM, aa aa wrote:
> >
> > Hello,
> >
> > First of all, i'm sorry for my bad english, if you don't
> > understand something, tell me, please.
> > I want ask you for a problem that i don't know how i can resolve.
> >
> > I have the following code:
> >
> > <xforms:input ref="Pob">
> > <xforms:label
> > class="sort-label">Población a 1 de Enero</xforms:label>
> > </xforms:input>
> >
> >
> > It's possible 'Pob' reference are not in the xml associated file
> > and i can't change the xml structure.
> > I need this input are displaying even though is empty. It will
> > be in read-only mode, I'll never save this data form in the xml
> > file.
> >
> > Thank you in advance.
> > Jesús.
>
> --
> 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: Show input text with no associated reference

Erik Bruchez
Administrator
aa aa wrote:
> Erik,
>
> The first one is not possible because they don't need to change this
> field, they only want see this input text

I don't understand: if there is no node in the XML, what data is there
to show?

> The second one is not possible for me because they import a xml file
> with its md5 file and for this reason, if i pre-process the file, the
> md5 associated change and it's not possible.

Well, it all depends when you compute the md5, right?

-Erik

>
> In any case, thank you for spend your time in my question.
>
> Jesús.
>
>  > Date: Tue, 18 Sep 2007 11:16:07 +0200
>  > From: [hidden email]
>  > To: [hidden email]
>  > Subject: Re: [ops-users] Show input text with no associated reference
>  >
>  > Jesús,
>  >
>  > In XForms, controls have to be bound to existing XML nodes (elements
>  > or attributes). If they are bound to non-existing nodes, then the
>  > controls are disabled or not shown at all.
>  >
>  > This can be solved in two ways:
>  >
>  > 1. Next to controls that may or may not have associated nodes, add a
>  > trigger (appearing as a button, link, image) that can be used to
>  > insert a new node in the XML document with xforms:insert. Once the
>  > node is inserted, the control will appear. You may also want a
>  > trigger doing an xforms:delete to remove the node.
>  >
>  > 2. Pre-process the XML document (e.g. with XSLT) in advance to all all
>  > the possible nodes. This may or may not be desirable in your
>  > case. Then post-process the document to remove the nodes when you
>  > are done, for example after submission.
>  >
>  > -Erik
>  >
>  > aa aa wrote:
>  > > Sorry, I don't understand what you have told me.
>  > >
>  > > The users can import a xml file with no optional parameters. Then, they
>  > > can see the form and if their xml file had not that optional
> paramaters,
>  > > the fields of that parameters aren't in the form and y I would like
> they
>  > > are in the form.
>  > >
>  > > Thank you
>  > >
>  > >
>  > ------------------------------------------------------------------------
>  > > From: [hidden email]
>  > > Date: Fri, 14 Sep 2007 13:43:49 -0700
>  > > To: [hidden email]
>  > > Subject: Re: [ops-users] Show input text with no associated reference
>  > >
>  > >
>  > > What if the input was bound to a different instance? Then it
>  > > would always be there, whether or not it was in the instance of
>  > > the "associated file" . Then, you would need to use events like
>  > > xforms-ready and value-changed to copy the value from
>  > > the associated file ( or a default value if it is not in the
>  > > file).
>  > >
>  > > Can you process the associated file with xslt and insure that
>  > > a value is there?
>  > >
>  > > Regards,
>  > > Hank Ratzesberger
>  > > UCSB
>  > >
>  > >
>  > > On Sep 14, 2007, at 12:27 AM, aa aa wrote:
>  > >
>  > > Hello,
>  > >
>  > > First of all, i'm sorry for my bad english, if you don't
>  > > understand something, tell me, please.
>  > > I want ask you for a problem that i don't know how i can resolve.
>  > >
>  > > I have the following code:
>  > >
>  > > <xforms:input ref="Pob">
>  > > <xforms:label
>  > > class="sort-label">Población a 1 de Enero</xforms:label>
>  > > </xforms:input>
>  > >
>  > >
>  > > It's possible 'Pob' reference are not in the xml associated file
>  > > and i can't change the xml structure.
>  > > I need this input are displaying even though is empty. It will
>  > > be in read-only mode, I'll never save this data form in the xml
>  > > file.
>  > >
>  > > Thank you in advance.
>  > > Jesús.
>  >
>  > --
>  > 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
> <http://get.live.com/messenger/overview>
>

--
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: Show input text with no associated reference

aa aa-2
The data that it should be showed is nothing, a text field empty, but my client wants to see an input text field because there are a lot of fields like that and the form seems better if all fields are showed.
Yeah, I know that it depends when i compute the md5, but i need save the xml file like the client import, i can't modify it. It's very important don't modify this file because the xml has the last year accounting for some city council and we are in a trouble if we modify it...
Thank you Erik.

Jesús.

> Date: Tue, 18 Sep 2007 22:36:01 +0200
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [ops-users] Show input text with no associated reference
>
> aa aa wrote:
> > Erik,
> >
> > The first one is not possible because they don't need to change this
> > field, they only want see this input text
>
> I don't understand: if there is no node in the XML, what data is there
> to show?
>
> > The second one is not possible for me because they import a xml file
> > with its md5 file and for this reason, if i pre-process the file, the
> > md5 associated change and it's not possible.
>
> Well, it all depends when you compute the md5, right?
>
> -Erik
>
> >
> > In any case, thank you for spend your time in my question.
> >
> > Jesús.
> >
> > > Date: Tue, 18 Sep 2007 11:16:07 +0200
> > > From: [hidden email]
> > > To: [hidden email]
> > > Subject: Re: [ops-users] Show input text with no associated reference
> > >
> > > Jesús,
> > >
> > > In XForms, controls have to be bound to existing XML nodes (elements
> > > or attributes). If they are bound to non-existing nodes, then the
> > > controls are disabled or not shown at all.
> > >
> > > This can be solved in two ways:
> > >
> > > 1. Next to controls that may or may not have associated nodes, add a
> > > trigger (appearing as a button, link, image) that can be used to
> > > insert a new node in the XML document with xforms:insert. Once the
> > > node is inserted, the control will appear. You may also want a
> > > trigger doing an xforms:delete to remove the node.
> > >
> > > 2. Pre-process the XML document (e.g. with XSLT) in advance to all all
> > > the possible nodes. This may or may not be desirable in your
> > > case. Then post-process the document to remove the nodes when you
> > > are done, for example after submission.
> > >
> > > -Erik
> > >
> > > aa aa wrote:
> > > > Sorry, I don't understand what you have told me.
> > > >
> > > > The users can import a xml file with no optional parameters. Then, they
> > > > can see the form and if their xml file had not that optional
> > paramaters,
> > > > the fields of that parameters aren't in the form and y I would like
> > they
> > > > are in the form.
> > > >
> > > > Thank you
> > > >
> > > >
> > > ------------------------------------------------------------------------
> > > > From: [hidden email]
> > > > Date: Fri, 14 Sep 2007 13:43:49 -0700
> > > > To: [hidden email]
> > > > Subject: Re: [ops-users] Show input text with no associated reference
> > > >
> > > >
> > > > What if the input was bound to a different instance? Then it
> > > > would always be there, whether or not it was in the instance of
> > > > the "associated file" . Then, you would need to use events like
> > > > xforms-ready and value-changed to copy the value from
> > > > the associated file ( or a default value if it is not in the
> > > > file).
> > > >
> > > > Can you process the associated file with xslt and insure that
> > > > a value is there?
> > > >
> > > > Regards,
> > > > Hank Ratzesberger
> > > > UCSB
> > > >
> > > >
> > > > On Sep 14, 2007, at 12:27 AM, aa aa wrote:
> > > >
> > > > Hello,
> > > >
> > > > First of all, i'm sorry for my bad english, if you don't
> > > > understand something, tell me, please.
> > > > I want ask you for a problem that i don't know how i can resolve.
> > > >
> > > > I have the following code:
> > > >
> > > > <xforms:input ref="Pob">
> > > > <xforms:label
> > > > class="sort-label">Población a 1 de Enero</xforms:label>
> > > > </xforms:input>
> > > >
> > > >
> > > > It's possible 'Pob' reference are not in the xml associated file
> > > > and i can't change the xml structure.
> > > > I need this input are displaying even though is empty. It will
> > > > be in read-only mode, I'll never save this data form in the xml
> > > > file.
> > > >
> > > > Thank you in advance.
> > > > Jesús.
> > >
> > > --
> > > 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
> > <http://get.live.com/messenger/overview>
> >
>
>
> --
> 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: Show input text with no associated reference

Erik Bruchez
Administrator
Jesús,

In a way, the XML will be "modified" when going through XForms, in that
it is parsed, transformed into a DOM representation, then serialized
again. If you were to add a node, say <dummy/>, then delete that node,
nobody will notice the change. So I don't think this is a problem.

What you could do is something like this:

   <xforms:input
     ref="if (exists(first-name))
            then first-name else instance('dummy')">

And in your model:

<xforms:instance id="dummy">
   <dummy/>
</xforms:instance>

Then make that read-only:

   <xforms:bind nodeset="instance('dummy')" readonly="true()"/>

This way, controls will be bound to data nodes if they exist, otherwise
they will be bound to an empty, read-only node. That should do the trick.

-Erik

aa aa wrote:

> The data that it should be showed is nothing, a text field empty, but my
> client wants to see an input text field because there are a lot of
> fields like that and the form seems better if all fields are showed.
> Yeah, I know that it depends when i compute the md5, but i need save the
> xml file like the client import, i can't modify it. It's very important
> don't modify this file because the xml has the last year accounting for
> some city council and we are in a trouble if we modify it...
> Thank you Erik.
>
> Jesús.
>
>  > Date: Tue, 18 Sep 2007 22:36:01 +0200
>  > From: [hidden email]
>  > To: [hidden email]
>  > Subject: Re: [ops-users] Show input text with no associated reference
>  >
>  > aa aa wrote:
>  > > Erik,
>  > >
>  > > The first one is not possible because they don't need to change this
>  > > field, they only want see this input text
>  >
>  > I don't understand: if there is no node in the XML, what data is there
>  > to show?
>  >
>  > > The second one is not possible for me because they import a xml file
>  > > with its md5 file and for this reason, if i pre-process the file, the
>  > > md5 associated change and it's not possible.
>  >
>  > Well, it all depends when you compute the md5, right?
>  >
>  > -Erik
>  >
>  > >
>  > > In any case, thank you for spend your time in my question.
>  > >
>  > > Jesús.
>  > >
>  > > > Date: Tue, 18 Sep 2007 11:16:07 +0200
>  > > > From: [hidden email]
>  > > > To: [hidden email]
>  > > > Subject: Re: [ops-users] Show input text with no associated reference
>  > > >
>  > > > Jesús,
>  > > >
>  > > > In XForms, controls have to be bound to existing XML nodes (elements
>  > > > or attributes). If they are bound to non-existing nodes, then the
>  > > > controls are disabled or not shown at all.
>  > > >
>  > > > This can be solved in two ways:
>  > > >
>  > > > 1. Next to controls that may or may not have associated nodes, add a
>  > > > trigger (appearing as a button, link, image) that can be used to
>  > > > insert a new node in the XML document with xforms:insert. Once the
>  > > > node is inserted, the control will appear. You may also want a
>  > > > trigger doing an xforms:delete to remove the node.
>  > > >
>  > > > 2. Pre-process the XML document (e.g. with XSLT) in advance to
> all all
>  > > > the possible nodes. This may or may not be desirable in your
>  > > > case. Then post-process the document to remove the nodes when you
>  > > > are done, for example after submission.
>  > > >
>  > > > -Erik
>  > > >
>  > > > aa aa wrote:
>  > > > > Sorry, I don't understand what you have told me.
>  > > > >
>  > > > > The users can import a xml file with no optional parameters.
> Then, they
>  > > > > can see the form and if their xml file had not that optional
>  > > paramaters,
>  > > > > the fields of that parameters aren't in the form and y I would
> like
>  > > they
>  > > > > are in the form.
>  > > > >
>  > > > > Thank you
>  > > > >
>  > > > >
>  > > >
> ------------------------------------------------------------------------
>  > > > > From: [hidden email]
>  > > > > Date: Fri, 14 Sep 2007 13:43:49 -0700
>  > > > > To: [hidden email]
>  > > > > Subject: Re: [ops-users] Show input text with no associated
> reference
>  > > > >
>  > > > >
>  > > > > What if the input was bound to a different instance? Then it
>  > > > > would always be there, whether or not it was in the instance of
>  > > > > the "associated file" . Then, you would need to use events like
>  > > > > xforms-ready and value-changed to copy the value from
>  > > > > the associated file ( or a default value if it is not in the
>  > > > > file).
>  > > > >
>  > > > > Can you process the associated file with xslt and insure that
>  > > > > a value is there?
>  > > > >
>  > > > > Regards,
>  > > > > Hank Ratzesberger
>  > > > > UCSB
>  > > > >
>  > > > >
>  > > > > On Sep 14, 2007, at 12:27 AM, aa aa wrote:
>  > > > >
>  > > > > Hello,
>  > > > >
>  > > > > First of all, i'm sorry for my bad english, if you don't
>  > > > > understand something, tell me, please.
>  > > > > I want ask you for a problem that i don't know how i can resolve.
>  > > > >
>  > > > > I have the following code:
>  > > > >
>  > > > > <xforms:input ref="Pob">
>  > > > > <xforms:label
>  > > > > class="sort-label">Población a 1 de Enero</xforms:label>
>  > > > > </xforms:input>
>  > > > >
>  > > > >
>  > > > > It's possible 'Pob' reference are not in the xml associated file
>  > > > > and i can't change the xml structure.
>  > > > > I need this input are displaying even though is empty. It will
>  > > > > be in read-only mode, I'll never save this data form in the xml
>  > > > > file.
>  > > > >
>  > > > > Thank you in advance.
>  > > > > Jesús.
>  > > >
>  > > > --
>  > > > 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
>  > > <http://get.live.com/messenger/overview>
>  > >
>  >
>  >
>  > --
>  > 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
> <http://get.live.com/messenger/overview>
>

--
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: Show input text with no associated reference

aa aa-2
Erik,

Thank you, i'll try it! If this way works, it'll be ok for me.

Regards!
Jesús

> Date: Wed, 19 Sep 2007 19:09:36 +0200
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [ops-users] Show input text with no associated reference
>
> Jesús,
>
> In a way, the XML will be "modified" when going through XForms, in that
> it is parsed, transformed into a DOM representation, then serialized
> again. If you were to add a node, say <dummy/>, then delete that node,
> nobody will notice the change. So I don't think this is a problem.
>
> What you could do is something like this:
>
> <xforms:input
> ref="if (exists(first-name))
> then first-name else instance('dummy')">
>
> And in your model:
>
> <xforms:instance id="dummy">
> <dummy/>
> </xforms:instance>
>
> Then make that read-only:
>
> <xforms:bind nodeset="instance('dummy')" readonly="true()"/>
>
> This way, controls will be bound to data nodes if they exist, otherwise
> they will be bound to an empty, read-only node. That should do the trick.
>
> -Erik
>
> aa aa wrote:
> > The data that it should be showed is nothing, a text field empty, but my
> > client wants to see an input text field because there are a lot of
> > fields like that and the form seems better if all fields are showed.
> > Yeah, I know that it depends when i compute the md5, but i need save the
> > xml file like the client import, i can't modify it. It's very important
> > don't modify this file because the xml has the last year accounting for
> > some city council and we are in a trouble if we modify it...
> > Thank you Erik.
> >
> > Jesús.
> >
> > > Date: Tue, 18 Sep 2007 22:36:01 +0200
> > > From: [hidden email]
> > > To: [hidden email]
> > > Subject: Re: [ops-users] Show input text with no associated reference
> > >
> > > aa aa wrote:
> > > > Erik,
> > > >
> > > > The first one is not possible because they don't need to change this
> > > > field, they only want see this input text
> > >
> > > I don't understand: if there is no node in the XML, what data is there
> > > to show?
> > >
> > > > The second one is not possible for me because they import a xml file
> > > > with its md5 file and for this reason, if i pre-process the file, the
> > > > md5 associated change and it's not possible.
> > >
> > > Well, it all depends when you compute the md5, right?
> > >
> > > -Erik
> > >
> > > >
> > > > In any case, thank you for spend your time in my question.
> > > >
> > > > Jesús.
> > > >
> > > > > Date: Tue, 18 Sep 2007 11:16:07 +0200
> > > > > From: [hidden email]
> > > > > To: [hidden email]
> > > > > Subject: Re: [ops-users] Show input text with no associated reference
> > > > >
> > > > > Jesús,
> > > > >
> > > > > In XForms, controls have to be bound to existing XML nodes (elements
> > > > > or attributes). If they are bound to non-existing nodes, then the
> > > > > controls are disabled or not shown at all.
> > > > >
> > > > > This can be solved in two ways:
> > > > >
> > > > > 1. Next to controls that may or may not have associated nodes, add a
> > > > > trigger (appearing as a button, link, image) that can be used to
> > > > > insert a new node in the XML document with xforms:insert. Once the
> > > > > node is inserted, the control will appear. You may also want a
> > > > > trigger doing an xforms:delete to remove the node.
> > > > >
> > > > > 2. Pre-process the XML document (e.g. with XSLT) in advance to
> > all all
> > > > > the possible nodes. This may or may not be desirable in your
> > > > > case. Then post-process the document to remove the nodes when you
> > > > > are done, for example after submission.
> > > > >
> > > > > -Erik
> > > > >
> > > > > aa aa wrote:
> > > > > > Sorry, I don't understand what you have told me.
> > > > > >
> > > > > > The users can import a xml file with no optional parameters.
> > Then, they
> > > > > > can see the form and if their xml file had not that optional
> > > > paramaters,
> > > > > > the fields of that parameters aren't in the form and y I would
> > like
> > > > they
> > > > > > are in the form.
> > > > > >
> > > > > > Thank you
> > > > > >
> > > > > >
> > > > >
> > ------------------------------------------------------------------------
> > > > > > From: [hidden email]
> > > > > > Date: Fri, 14 Sep 2007 13:43:49 -0700
> > > > > > To: [hidden email]
> > > > > > Subject: Re: [ops-users] Show input text with no associated
> > reference
> > > > > >
> > > > > >
> > > > > > What if the input was bound to a different instance? Then it
> > > > > > would always be there, whether or not it was in the instance of
> > > > > > the "associated file" . Then, you would need to use events like
> > > > > > xforms-ready and value-changed to copy the value from
> > > > > > the associated file ( or a default value if it is not in the
> > > > > > file).
> > > > > >
> > > > > > Can you process the associated file with xslt and insure that
> > > > > > a value is there?
> > > > > >
> > > > > > Regards,
> > > > > > Hank Ratzesberger
> > > > > > UCSB
> > > > > >
> > > > > >
> > > > > > On Sep 14, 2007, at 12:27 AM, aa aa wrote:
> > > > > >
> > > > > > Hello,
> > > > > >
> > > > > > First of all, i'm sorry for my bad english, if you don't
> > > > > > understand something, tell me, please.
> > > > > > I want ask you for a problem that i don't know how i can resolve.
> > > > > >
> > > > > > I have the following code:
> > > > > >
> > > > > > <xforms:input ref="Pob">
> > > > > > <xforms:label
> > > > > > class="sort-label">Población a 1 de Enero</xforms:label>
> > > > > > </xforms:input>
> > > > > >
> > > > > >
> > > > > > It's possible 'Pob' reference are not in the xml associated file
> > > > > > and i can't change the xml structure.
> > > > > > I need this input are displaying even though is empty. It will
> > > > > > be in read-only mode, I'll never save this data form in the xml
> > > > > > file.
> > > > > >
> > > > > > Thank you in advance.
> > > > > > Jesús.
> > > > >
> > > > > --
> > > > > 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
> > > > <http://get.live.com/messenger/overview>
> > > >
> > >
> > >
> > > --
> > > 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
> > <http://get.live.com/messenger/overview>
> >
>
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>


Consigue el nuevo Windows Live Messenger 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: Show input text with no associated reference

Ozakca, Muzaffer
In reply to this post by Erik Bruchez
I'm a newbie, too, and I'm trying to do something similar. Is there a way to insert an empty node if that doesn't exist? This way, a) all fields will be shown even if some nodes are not in the XML b) User can create a new node in the XML if that's defined in its schema. So, it would be something like this, I guess:

<xforms:input
     ref="if (exists(first-name))
            then first-name else insert (first-name)">

Thanks,
Muzaffer

> -----Original Message-----
> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
> Sent: Wednesday, September 19, 2007 1:10 PM
> To: [hidden email]
> Subject: Re: [ops-users] Show input text with no associated reference
>
> Jesús,
>
> In a way, the XML will be "modified" when going through XForms, in that it
> is parsed, transformed into a DOM representation, then serialized again. If
> you were to add a node, say <dummy/>, then delete that node, nobody will
> notice the change. So I don't think this is a problem.
>
> What you could do is something like this:
>
>    <xforms:input
>      ref="if (exists(first-name))
>             then first-name else instance('dummy')">
>
> And in your model:
>
> <xforms:instance id="dummy">
>    <dummy/>
> </xforms:instance>
>
> Then make that read-only:
>
>    <xforms:bind nodeset="instance('dummy')" readonly="true()"/>
>
> This way, controls will be bound to data nodes if they exist, otherwise they
> will be bound to an empty, read-only node. That should do the trick.
>
> -Erik
>
> aa aa wrote:
> > The data that it should be showed is nothing, a text field empty, but
> > my client wants to see an input text field because there are a lot of
> > fields like that and the form seems better if all fields are showed.
> > Yeah, I know that it depends when i compute the md5, but i need save
> > the xml file like the client import, i can't modify it. It's very
> > important don't modify this file because the xml has the last year
> > accounting for some city council and we are in a trouble if we modify
> it...
> > Thank you Erik.
> >
> > Jesús.
> >
> >  > Date: Tue, 18 Sep 2007 22:36:01 +0200  > From: [hidden email]
> > > To: [hidden email]  > Subject: Re: [ops-users] Show input
> > text with no associated reference  >  > aa aa wrote:
> >  > > Erik,
> >  > >
> >  > > The first one is not possible because they don't need to change
> > this  > > field, they only want see this input text  >  > I don't
> > understand: if there is no node in the XML, what data is there  > to
> > show?
> >  >
> >  > > The second one is not possible for me because they import a xml
> > file  > > with its md5 file and for this reason, if i pre-process the
> > file, the  > > md5 associated change and it's not possible.
> >  >
> >  > Well, it all depends when you compute the md5, right?
> >  >
> >  > -Erik
> >  >
> >  > >
> >  > > In any case, thank you for spend your time in my question.
> >  > >
> >  > > Jesús.
> >  > >
> >  > > > Date: Tue, 18 Sep 2007 11:16:07 +0200  > > > From:
> > [hidden email]  > > > To: [hidden email]  > > > Subject:
> > Re: [ops-users] Show input text with no associated reference  > > >  >
> > > > Jesús,  > > >  > > > In XForms, controls have to be bound to
> > existing XML nodes (elements  > > > or attributes). If they are bound
> > to non-existing nodes, then the  > > > controls are disabled or not
> > shown at all.
> >  > > >
> >  > > > This can be solved in two ways:
> >  > > >
> >  > > > 1. Next to controls that may or may not have associated nodes,
> > add a  > > > trigger (appearing as a button, link, image) that can be
> > used to  > > > insert a new node in the XML document with
> > xforms:insert. Once the  > > > node is inserted, the control will
> > appear. You may also want a  > > > trigger doing an xforms:delete to
> remove the node.
> >  > > >
> >  > > > 2. Pre-process the XML document (e.g. with XSLT) in advance to
> > all all  > > > the possible nodes. This may or may not be desirable in
> > your  > > > case. Then post-process the document to remove the nodes
> > when you  > > > are done, for example after submission.
> >  > > >
> >  > > > -Erik
> >  > > >
> >  > > > aa aa wrote:
> >  > > > > Sorry, I don't understand what you have told me.
> >  > > > >
> >  > > > > The users can import a xml file with no optional parameters.
> > Then, they
> >  > > > > can see the form and if their xml file had not that optional
> > > > paramaters,  > > > > the fields of that parameters aren't in the
> > form and y I would like  > > they  > > > > are in the form.
> >  > > > >
> >  > > > > Thank you
> >  > > > >
> >  > > > >
> >  > > >
> > ----------------------------------------------------------------------
> > --
> >  > > > > From: [hidden email]
> >  > > > > Date: Fri, 14 Sep 2007 13:43:49 -0700  > > > > To:
> > [hidden email]  > > > > Subject: Re: [ops-users] Show input
> > text with no associated reference  > > > >  > > > >  > > > > What if
> > the input was bound to a different instance? Then it  > > > > would
> > always be there, whether or not it was in the instance of  > > > > the
> > "associated file" . Then, you would need to use events like  > > > >
> > xforms-ready and value-changed to copy the value from  > > > > the
> > associated file ( or a default value if it is not in the  > > > >
> > file).
> >  > > > >
> >  > > > > Can you process the associated file with xslt and insure that
> > > > > > a value is there?
> >  > > > >
> >  > > > > Regards,
> >  > > > > Hank Ratzesberger
> >  > > > > UCSB
> >  > > > >
> >  > > > >
> >  > > > > On Sep 14, 2007, at 12:27 AM, aa aa wrote:
> >  > > > >
> >  > > > > Hello,
> >  > > > >
> >  > > > > First of all, i'm sorry for my bad english, if you don't  > >
> > > > understand something, tell me, please.
> >  > > > > I want ask you for a problem that i don't know how i can resolve.
> >  > > > >
> >  > > > > I have the following code:
> >  > > > >
> >  > > > > <xforms:input ref="Pob">
> >  > > > > <xforms:label
> >  > > > > class="sort-label">Población a 1 de Enero</xforms:label>  > >
> > > > </xforms:input>  > > > >  > > > >  > > > > It's possible 'Pob'
> > reference are not in the xml associated file  > > > > and i can't
> > change the xml structure.
> >  > > > > I need this input are displaying even though is empty. It
> > will  > > > > be in read-only mode, I'll never save this data form in
> > the xml  > > > > file.
> >  > > > >
> >  > > > > Thank you in advance.
> >  > > > > Jesús.
> >  > > >
> >  > > > --
> >  > > > 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  > >
> > <http://get.live.com/messenger/overview>
> >  > >
> >  >
> >  >
> >  > --
> >  > 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
> > <http://get.live.com/messenger/overview>
> >
>
>
> --
> 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: Show input text with no associated reference

Alessandro Vernet
Administrator
Muzaffer,

On 9/25/07, Ozakca, Muzaffer <[hidden email]> wrote:
> I'm a newbie, too, and I'm trying to do something similar. Is there a way to insert an empty node if that doesn't exist? This way, a) all fields will be shown even if some nodes are not in the XML b) User can create a new node in the XML if that's defined in its schema. So, it would be something like this, I guess:
>
> <xforms:input
>      ref="if (exists(first-name))
>             then first-name else insert (first-name)">

You can't do the insertion in the binding expression, but you can have
something like:

<xforms:action ev:event="xforms-ready">
    <xforms:insert if="empty(instance('emp')/first-name)"
            context="instance('emp')"
            origin="instance('templates')/first-name"/>
</xforms:action>

This runs when the form loads, and checks if instance('emp') has a
first-name. If it does not, it copies the element from
instance('templates') to instance('emp'). You can imagine to have in
instance('templates') all the elements ready to be copied over to the
"real" instance if they are missing there.

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