i am trying to evaluate xforms and have a question about what i would
consider to be a fairly typical usage. much like the government forms example i want to start with a list of documents, select a specific one and then get the details back. i'm considering using the java integration to retrieve the xml since an xml database isn't in my future. i've gotten an example to work using a single node result (ie. <user>jim jones</user>) but if i return a result like <user><firstname>jim</firstname><lastname>jones</lastname></user> then i don't seem to be able to reference the input:instance in the detail view regardless of how i go about it (you can see all my attempts in user-detail.xhtml). i've studied the pfc-atm, xforms-wizard-pfc and government forms examples and thought i was on the right track but apparently not. also, if there is a better way of going about this i would sure like to know. thanks, andrew -- 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 index.xhtml (1K) Download Attachment page-flow.xml (760 bytes) Download Attachment user-detail.xhtml (1K) Download Attachment user-detail.xpl (480 bytes) Download Attachment UserProcessor.java (1K) Download Attachment |
I tried sending this once before but never saw it hit the mailing
list so excuse me if this is a repost. I am trying to evaluate XForms and have a question about what I believe would be a fairly typical usage. Much like the government forms example I want to start with a list of documents, select a specific one and then get the details back. I'm considering using the Java Integration to retrieve the XML since an XML database isn't in my future. I've gotten an example to work using a single node result (ie. <user>jim jones</user>) but if I return a result like <user><firstname>jim</firstname><lastname>jones</lastname></user> then I don't seem to be able to reference the input:instance in the detail view regardless of how I go about it (see all my attempts in user-detail.xhtml). I've studied the pfc-atm, xforms-wizard-pfc and government forms examples and thought I was on the right track but apparently not. Also, if there is a better way of going about this I would appreciate the advice. Thanks, Andrew -- 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 index.xhtml (1K) Download Attachment page-flow.xml (760 bytes) Download Attachment user-detail.xhtml (1K) Download Attachment user-detail.xpl (480 bytes) Download Attachment UserProcessor.java (1K) Download Attachment |
Administrator
|
In reply to this post by Andrew Wiggin
Andrew,
On 9/6/07, Andrew Wiggin <[hidden email]> wrote: > i've gotten an example to work using a single node result (ie. > <user>jim jones</user>) but if i return a result like > <user><firstname>jim</firstname><lastname>jones</lastname></user> > then i don't seem to be able to reference the input:instance in the > detail view regardless of how i go about it (you can see all my > attempts in user-detail.xhtml). I have been running your example, and I see: "First Name 3: my name is...jones ", which seems correct. If I put the XForms inspector in the page (http://www.orbeon.com/blog/2007/02/02/orbeon-forms-instance-inspector/), I can see that the instance is as follows, which seems OK. <user> <firstname>my name is...</firstname> <lastname>jones</lastname> </user> Are you expecting a different result in this case? 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 |
I am not expecting anything different for the First Name 3 field -
but i would like to create <xform:input> fields for each node in the <user> xml and I don't seem to be able to reference them properly. Look at all the other xforms:output controls in user-detail.xhtml. Thanks, Andrew On Sep 11, 2007, at 3:06 PM, Alessandro Vernet wrote: > Andrew, > > On 9/6/07, Andrew Wiggin <[hidden email]> wrote: >> i've gotten an example to work using a single node result (ie. >> <user>jim jones</user>) but if i return a result like >> <user><firstname>jim</firstname><lastname>jones</lastname></user> >> then i don't seem to be able to reference the input:instance in the >> detail view regardless of how i go about it (you can see all my >> attempts in user-detail.xhtml). > > I have been running your example, and I see: "First Name 3: my name > is...jones ", which seems correct. If I put the XForms inspector in > the page (http://www.orbeon.com/blog/2007/02/02/orbeon-forms- > instance-inspector/), > I can see that the instance is as follows, which seems OK. > > <user> > <firstname>my name is...</firstname> > <lastname>jones</lastname> > </user> > > Are you expecting a different result in this case? > > 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 ops- > [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 -- 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
|
Andrew,
On 9/12/07, Andrew Wiggin <[hidden email]> wrote: > I am not expecting anything different for the First Name 3 field - > but i would like to create <xform:input> fields for each node in the > <user> xml and I don't seem to be able to reference them properly. > Look at all the other xforms:output controls in user-detail.xhtml. OK, I see. The issue comes from the page-flow.xml. You have there a default namespace xmlns="http://www.orbeon.com/oxf/controller". You then create the elements <user>, <firstname>, and <lastname>, so those element are in the PFC namespace. In the view, an XPath expression like /user/firstname won't return anything. You can fix this by adding xmlns="" on <user> in the page flow (updated version attached). I said this many time here, but my personal opinion is that default namespaces are evil. Unless all the elements in an XML file are in that namespace, I would strongly advice not to use default namespaces. They save us a few keystrokes, but then create problems like the one you just had that are really not easy to spot. 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 page-flow.xml (1K) Download Attachment |
Free forum by Nabble | Edit this page |