Hi All,
I've been looking at this for hours trying various different things and can't figure out why the <xf:insert if="...> statements are not working in the attached form. In the select1 control I have this action block <xf:action ev:event="xforms-value-changed"> <xf:delete if="../@choice='Windows'" nodeset="../../../Disk/*" /> <xf:insert if="../@choice='Windows'" nodeset="../../../Disk/*" origin="instance('onchoice-windows')"/> <xf:delete if="../@choice='Linux'" nodeset="../../../Disk/*" /> <xf:insert if="../@choice='Linux'" nodeset="../../../Disk/*" origin="instance('onchoice-linux')"/> </xf:action> whose intention is to set the disk partition configuration based on the choice of OS (Windows or Linux). One can observe that the <xf:delete> statements work fine because the partitions disappear as soon as an OS is selected, but the inserts don't have any effect! I've stripped the form down to the bare minimum for clarity so that it can be run in the xforms sandbox. Is there some mistake on my part or is this an Orbeon Forms bug? Any help is greatly appreciated. Larry T. Chen Intelenet Communications, Inc. -- 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 configuration-insert-test.xhtml (4K) Download Attachment |
Hi All,
Immediately after posting I think of something else I haven't tried. I just tried this and it works. <xf:action ev:event="xforms-value-changed" if="../@choice='Windows'"> <xf:delete nodeset="../../../Disk/*" /> <xf:insert context="../../../Disk" nodeset="*" origin="instance('onchoice-windows')"/> </xf:action> <xf:action ev:event="xforms-value-changed" if="../@choice='Linux'" > <xf:delete nodeset="../../../Disk/*" /> <xf:insert context="../../../Disk" nodeset="*" origin="instance('onchoice-linux')"/> </xf:action> Could somebody explain why the above works and not <xf:action ev:event="xforms-value-changed" > <xf:delete if="../@choice='Windows'" nodeset="../../../Disk/*" /> <xf:insert if="../@choice='Windows'" context="../../../Disk" nodeset="*" origin="instance('onchoice-windows')"/> <xf:delete if="../@choice='Linux'" nodeset="../../../Disk/*" /> <xf:insert if="../@choice='Linux'" context="../../../Disk" nodeset="*" origin="instance('onchoice-linux')"/> </xf:action> Thanks. Larry T. Chen Intelenet Communications, Inc. Larry T. Chen wrote: Hi All, -- 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 |
Administrator
|
In reply to this post by Larry T. Chen
Larry,
I modified your document, and it looks to me like the delete/insert are now doing what they are expected to do. The handler for xforms-value-changed now looks like: <xf:action ev:event="xforms-value-changed"> <xf:delete nodeset="/Managed_Server/Disk/*" /> <xf:action if=". = 'Windows'"> <xf:insert context="/Managed_Server/Disk" origin="instance('onchoice-windows')"/> </xf:action> <xf:action if=". = 'Linux'"> <xf:insert context="/Managed_Server/Disk" origin="instance('onchoice-linux')"/> </xf:action> </xf:action> I replaced the ../../ with absolute paths. Using paths with .. will work, but gets me confused :). The main problem was that you were first deleting the Disk_Volume elements, and then inserting relative to those elements. Since they don't exist anymore, the insertion does not happen. Note how the modified code uses "context" pointing to the container element rather than "nodeset". Alex On 4/9/07, Larry T. Chen <[hidden email]> wrote: > Hi All, > > I've been looking at this for hours trying various different things and > can't figure out why the <xf:insert if="...> statements are not working > in the attached form. > In the select1 control I have this action block > > <xf:action ev:event="xforms-value-changed"> > <xf:delete if="../@choice='Windows'" nodeset="../../../Disk/*" /> > <xf:insert if="../@choice='Windows'" nodeset="../../../Disk/*" > origin="instance('onchoice-windows')"/> > <xf:delete if="../@choice='Linux'" nodeset="../../../Disk/*" /> > <xf:insert if="../@choice='Linux'" nodeset="../../../Disk/*" > origin="instance('onchoice-linux')"/> > </xf:action> > > whose intention is to set the disk partition configuration based on the > choice of OS (Windows or Linux). One can observe that the <xf:delete> > statements work fine because the partitions disappear as soon as an OS > is selected, but the inserts don't have any effect! > > I've stripped the form down to the bare minimum for clarity so that it > can be run in the xforms sandbox. > > Is there some mistake on my part or is this an Orbeon Forms bug? Any > help is greatly appreciated. > > Larry T. Chen > Intelenet Communications, Inc. > > > -- > 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 > > > -- Orbeon Forms - Web 2.0 Forms 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 configuration-insert-test.xhtml (4K) Download Attachment |
I tried to run this sample, because I have trouble trying to run my own xforms:insert construct.
The sandbox says "element html' not allowed here.
|
Administrator
|
On Feb 19, 2008, at 2:35 PM, someperson wrote:
> I tried to run this sample, because I have trouble trying to run my > own > xforms:insert construct. > > The sandbox says "element html' not allowed here. Could you attach the file you have been uploading to the XForms sandbox? Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Sometimes this happens when your form loads a schema or other external
resource, but the URL is incorrect so instead of getting an XML schema you get an (X)HTML page. Is it possible that this is happening in your case? -Erik On Feb 20, 2008, at 3:33 PM, Alessandro Vernet wrote: > On Feb 19, 2008, at 2:35 PM, someperson wrote: > >> I tried to run this sample, because I have trouble trying to run my >> own >> xforms:insert construct. >> >> The sandbox says "element html' not allowed here. > > > Could you attach the file you have been uploading to the XForms > sandbox? > > Alex > -- > Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise > Orbeon's Blog: http://www.orbeon.com/blog/ > Personal Blog: http://avernet.blogspot.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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Guys,
i'm having the following problem and just wanted to ask, if someone had a similar problem or an idea to solve it. OK, i'm writing an application for some germanistic people not so confirm with xml and schemas and so on. The have to enter pretty much data and must do additional quotations inside large text passages. So that text will have mixed content. I.e. they have to enter informations about a city the must quote the name of the city, if it is mentioned in the text. BUT, i should find a solution they can do this by mark the name and then click some extra functions, i.e. choose the option "placename" out of a pulldown-menu and than the city should automatically be surrounded by special tags like <cityname>...</cityname> so that those prople don't have to enter the xml-tags by themself. ALso we would need a kind of validation that insures, that there won't be any crossings between the tags. Can anyone think of a good and perhaps easy solution to realize such a function for textareas? My first thought was to use the FCKeditor and to use plugins, but than i would have the problems with validating the code during editing, cause there is a special xsd that defines exactly when one can use additional tags and when they are forbidden, also there must be the right order of inner and outer tags. I can describe that very good with a xsd but realize such a functionality on a form i have not really any idea how i can manage that :-(( Any tipps, ideas or solutions i can use are very welcome. I hope that i could have made my point clear about the needs of that functionality. Sorry if my english is not as precise as it should be, but i give my best. Thanks a lot, regards, Marcus -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by Erik Bruchez
Yes, this was exactly what was happening. As an afterthought I had the reference to schema removed and the error went away.
|
Administrator
|
In reply to this post by Marcus-2
Marcus,
On Thu, Feb 21, 2008 at 7:17 PM, Marcus <[hidden email]> wrote: > OK, i'm writing an application for some germanistic people not so confirm > with xml and schemas and so on. The have to enter pretty much data and must > do additional quotations inside large text passages. So that text will have > mixed content. I.e. they have to enter informations about a city the must > quote the name of the city, if it is mentioned in the text. BUT, i should > find a solution they can do this by mark the name and then click some extra > functions, i.e. choose the option "placename" out of a pulldown-menu and > than the city should automatically be surrounded by special tags like > <cityname>...</cityname> so that those prople don't have to enter the > xml-tags by themself. ALso we would need a kind of validation that insures, > that there won't be any crossings between the tags. description, I imgine of something like: <p>Welcome to our great city of <city>Berlin</city>.</p> If this is the case, then you might be out of luck as XForms doesn't handle very well cases like this where you have sibling text nodes and elements. If possible you might want to change this into the following and provide different fields for the different elements (welcome-message and city). <p> <welcome-message>Welcome to our great city of</welcome-message> <city>Berlin</city> </p> Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |