Hi All,
I have a question about the xml submission. The following is the xhtml code. I know that contentSchema will be submitted. Does contentTidy and contentXsl will be submitted as well? If it does, how can I get the values. <head> <title>PBS Edit Screen - brandPolicyListing</title> <xforms:model> <xforms:instance id="ps-data"> <superroot> <xi:include href="input:data"/> <contentSchema>../../../Schema/InternalStructures/PBDS-pub.xsd</contentSchema> </superroot> </xforms:instance> <xforms:submission id="main-submission" method="post" action="/ps/submit/"/> </xforms:model> </head> <body> <input type="hidden" name="contentTidy" value="Yes"/> <input type="hidden" name="contentXsl" value=""/> </body> Thanks a lot! xin -- 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
|
Xin,
You are not using XForms controls in your example, so I am not sure how to answer your question. You have to use xforms:input with the appropriate attributes, not HTML input fields. Mixing both together will not do anything good. If you use XForms controls though, then the answer is that non-relevant nodes won't be submitted. -Erik Xin Chen wrote: > Hi All, > > I have a question about the xml submission. The following is the xhtml code. > > I know that contentSchema will be submitted. > Does contentTidy and contentXsl will be submitted as well? If it does, > how can I get the values. > > > <head> > <title>PBS Edit Screen - brandPolicyListing</title> > <xforms:model> > <xforms:instance id="ps-data"> > <superroot> > <xi:include href="input:data"/> > > <*contentSchema*>../../../Schema/InternalStructures/PBDS-pub.xsd</*contentSchema*> > </superroot> > </xforms:instance> > <xforms:submission id="main-submission" > method="post" action="/ps/submit/"/> > </xforms:model> > </head> > <body> > <input type="hidden" name="*contentTidy*" value="Yes"/> > <input type="hidden" name="*contentXsl*" value=""/> > </body> > > Thanks a lot! > xin > -- 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 |
Hi Erik,
Thanks a lot for your reply :-) The whole xhtml file is the following:: "If you use XForms controls though, then the answer is that non-relevant nodes won't be submitted. " -- does that mean 'hidden html input' won't be submitted. -- The only way to submit content is put them in the xforms:instance? -- What about processor "Request", does it can get the value? Looking forward ur replys :-) Thanks! xin code start -------- <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:ps="http://www.pageseeder.com/editing/2.0" xmlns:pbs="http://www.aaa.eer.au/Schema/PBS" xmlns:db="http://docbook.org/ns/docbook" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <head> <title>Edit Screen </title> <xforms:model> <xforms:instance id="ps-data"> <superroot> <xi:include href="input:data"/> <contentSchema>../../../Schema/InternalStructures/sss.xsd</contentSchema> </superroot> </xforms:instance> <xforms:submission id="main-submission" method="post" action="/ps/submit/"/> </xforms:model> </head> <body> <input type="hidden" name="contentTidy" value="Yes"/> <input type="hidden" name="contentXsl" value=""/> <input type="hidden" name="contentNamespace" value="http://www.aaa.eer.au/Schema/PBS"/> <input type="hidden" name="contentXRef" value="No"/> <p>The time is now <xsl:value-of select="current-dateTime()"/>!</p> <p>==================XForms====================</p> <xforms:group ref="instance('ps-data')//pbs:unrestricted"> <xforms:input ref="pbs:drug/db:title"> <xforms:label>Drug Title</xforms:label> </xforms:input> <br/> <xforms:input ref="pbs:drug/pbs:code"> <xforms:label>Drug Code</xforms:label> </xforms:input> <br/> <xforms:textarea mediatype="text/html" ref="pbs:drug/pbs:ready-prepared/pbs:form-strength/pbs:label"> <xforms:label>Form and Strength</xforms:label> </xforms:textarea> <xforms:submit submission="main-submission"> <xforms:label>Just Submit</xforms:label> </xforms:submit> </xforms:group> </body> </html> ---- end Erik Bruchez wrote: Xin, -- 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
|
Xin Chen wrote:
> Hi Erik, > > Thanks a lot for your reply :-) > > The whole xhtml file is the following:: > > "If you use XForms controls though, then the answer is that non-relevant > nodes won't be submitted. " > -- does that mean 'hidden html input' won't be submitted. It won't be include in the XForms submission, that's for sure. When you do a submission with replace="instance" or replace="none", the page in the browser is not reloaded. The HTML form that Orbeon Forms creates is not even submitted to the server, instead Ajax requests are performed. So your hidden HTML fields won't matter. If you use replace="all", Orbeon Forms will cause an HTML form submission to happen, but then the XForms engine will not look at all at those extra fields you create, so again they will be ignored. > -- The only way to submit content is put them in the xforms:instance? So yes, this is the conclusion. > -- What about processor "*Request*", does it can get the value? Not when performing an XForms submission, for the reasons above. What you could do though is use a hidden xforms:input control. Then you can use JavaScript to set values in there, see the doc here: http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-javascript -Erik -- 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 |
Hi erik ,still related to get and set values
i already call my web-service here is my logic of xpl model atom.xpl <p:processor name="oxf:delegation"> <p:input name="data" href="#instance"/> <p:input name="interface"> <config> <service id="single-branch" type="webservice" style="document" endpoint="http://localhost:8080/ode/processes/SimpleChoiceBranching/SimpleChoiceBranching/SimpleChoiceBranching/Client?wsdl"> <operation name="receive" nsuri="http://example.com/SimpleChoiceBranching/SimpleChoiceBranching" soap-action="http://example.com/SimpleChoiceBranching/SimpleChoiceBranching/ForClient/receive"/> </service> </config> </p:input> <p:input name="call"> <delegation:execute service="single-branch" operation="receive" xsl:version="2.0" xmlns:delegation="http://orbeon.org/oxf/xml/delegation"> <b4p:start>Hello</b4p:start> </delegation:execute> </p:input> <p:output name="data" id="receiveResponse"/> </p:processor> you see "Hello" in that code ? i use static text to test my web-service and it worked properly what i confused is how do i passing parameter from my xhtml ( i have one input text box to fill in in the xhtml ), so that i can use that value in the input text box of xhtml to the model of my xpl here is my pageflow.xml <page id="web-service-ganda" path-info="/xforms-web-service-ganda/starts" model="atom.xpl" view="view.xhtml"/> and here is my view.xhtml ============ <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:xi="http://www.w3.org/2001/XInclude"> <xhtml:head> <xhtml:title>XForms Web-Service-Ganda</xhtml:title> <xforms:model> <xforms:instance id="result-instance"> <xi:include href="input:data"/> </xforms:instance> <xforms:instance id="start-instance"> <start/> </xforms:instance> <xforms:bind nodeset="instance('start-instance')" constraint="true()"/> <xforms:submission id="receive" action="/xforms-web-service-ganda/starts" ref="instance('start-instance')" method="post"> <xforms:message ev:event="xforms-submit-error" level="modal">An error occurred while loading!</xforms:message> </xforms:submission> </xforms:model> </xhtml:head> <xhtml:body> <xforms:group> <xhtml:p> <xforms:output ref="instance('result-instance')"> <xforms:label>The result is: </xforms:label> </xforms:output> </xhtml:p> <xhtml:p> <xforms:group> <xforms:input ref="instance('start-instance')"> <xforms:label>Start : </xforms:label> <xforms:alert>Start must not be empty </xforms:alert> </xforms:input> <xforms:trigger> <xforms:label>Submit</xforms:label> </xforms:trigger> <xforms:send ev:event="DOMActivate" submission="receive"/> </xforms:group> </xhtml:p> </xforms:group> <xhtml:p style="margin-top: 3em"> <xhtml:a href="/xforms-web-service-ganda/">Back</xhtml:a> to web-service-ganda </xhtml:p> </xhtml:body> </html> =================== my question is 1. how do i use that value in xhtml that i input can be used in the xpl as the input for my service 2. how do i return the value (respond) of my service to other page. i mean suppose the input is Hello , and the output is "True" , how do i keep the value from atom.xpl into another xhtml or even same xhtml thanks in advance ganda:)
|
In reply to this post by Erik Bruchez
Hi Erik,
Thanks a lot! It makes me much more clear now. Now I put everything in a instance. Something like: <superroot> xxx xxxx ...... </superroot> All the things inside the superroot. Well, it seems a bit unusual, but it works :-) Thanks! xin Erik Bruchez wrote: > Xin Chen wrote: > >> Hi Erik, >> >> Thanks a lot for your reply :-) >> >> The whole xhtml file is the following:: >> >> "If you use XForms controls though, then the answer is that >> non-relevant nodes won't be submitted. " >> -- does that mean 'hidden html input' won't be submitted. > > > It won't be include in the XForms submission, that's for sure. > > When you do a submission with replace="instance" or replace="none", > the page in the browser is not reloaded. The HTML form that Orbeon > Forms creates is not even submitted to the server, instead Ajax > requests are performed. So your hidden HTML fields won't matter. > > If you use replace="all", Orbeon Forms will cause an HTML form > submission to happen, but then the XForms engine will not look at all > at those extra fields you create, so again they will be ignored. > >> -- The only way to submit content is put them in the xforms:instance? > > > So yes, this is the conclusion. > >> -- What about processor "*Request*", does it can get the value? > > > Not when performing an XForms submission, for the reasons above. > > What you could do though is use a hidden xforms:input control. Then > you can use JavaScript to set values in there, see the doc here: > > http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-javascript > > -Erik > >------------------------------------------------------------------------ > > >-- >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 > > -- 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 |
Free forum by Nabble | Edit this page |