iam getting the
values of a instance using xforms:get-request-parameter()
but when i try to edit the values and click save
button following message being displayed
xforms:get-request-parameter() can only be called during XForms
initialization
<body>
<xforms:variable name="qrystring" select="xxforms:get-request-parameter('id')" /> <h1> Edit <xforms:output ref="instance('programs-instance')/program[id=$qrystring]/id"/></h1> <a href="<A href='http://localhost:8080/orbeon/program-demo/">Homehttp://localhost:8080/orbeon/program-demo/">Home</a> <xforms:group
ref="instance('programs-instance')/program[id=$qrystring]">
<xforms:input
ref="programname">
<xforms:label>ProgramName</xforms:label>
</xforms:input><br/>
<xforms:textarea ref="programdescription"
appearance="xxforms:autosize">
<xforms:label>Program
Description</xforms:label>
</xforms:textarea>
<br/>
<xforms:select1 ref="datasourcetype">
<xforms:label>DataSourceType</xforms:label>
<xforms:item>
<xforms:label>Choose one...</xforms:label>
<xforms:value/>
</xforms:item>
<xforms:itemset
nodeset="instance('datasources-instance')/datasourcetype">
<xforms:label ref="name"/>
<xforms:value ref="value"/>
</xforms:itemset>
</xforms:select1>
<br/>
<xforms:submit submission="update-submission"><xforms:label>Save</xforms:label></xforms:submit> </xforms:group>
</body> -- 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
|
This is a known limitation. The idea is that you want to retrieve the
request parameters at the time the page is initially loaded. However, if you call this later, the current request will be an Ajax request, with different parameters. So we have decided to throw an exception in those cases. Ideally, parameters would be stored as part of the state of the XForms page, so they can be read at any time. You can work around this by storing the value of the parameters into an instance upon xforms-model-construct-done. -Erik On Nov 19, 2008, at 9:01 PM, Srikanth A wrote: > iam getting the values of a instance using xforms:get-request- > parameter() > but when i try to edit the values and click save button following > message being displayed > xforms:get-request-parameter() can only be called during XForms > initialization > > <body> > <xforms:variable name="qrystring" select="xxforms:get-request- > parameter('id')" /> > <h1> Edit <xforms:output ref="instance('programs-instance')/ > program[id=$qrystring]/id"/></h1> > <a href="http://localhost:8080/orbeon/program-demo/">Home</a> > <xforms:group ref="instance('programs-instance')/program[id= > $qrystring]"> > <xforms:input ref="programname"> > <xforms:label>ProgramName</xforms:label> > </xforms:input><br/> > <xforms:textarea ref="programdescription" > appearance="xxforms:autosize"> > <xforms:label>Program Description</xforms:label> > </xforms:textarea> > <br/> > <xforms:select1 ref="datasourcetype"> > <xforms:label>DataSourceType</xforms:label> > <xforms:item> > <xforms:label>Choose one...</xforms:label> > <xforms:value/> > </xforms:item> > <xforms:itemset nodeset="instance('datasources- > instance')/datasourcetype"> > <xforms:label ref="name"/> > <xforms:value ref="value"/> > </xforms:itemset> > </xforms:select1> > <br/> > <xforms:submit submission="update-submission"><xforms:label>Save</ > xforms:label></xforms:submit> > </xforms:group> > </body> > > -- > 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 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 |
-----Original Message----- From: Erik Bruchez [mailto:[hidden email]] Sent: Thursday, November 20, 2008 11:24 AM To: [hidden email] Subject: [ops-users] Re: xforms:get-request-parameter() can only be called during XForms initialization This is a known limitation. The idea is that you want to retrieve the request parameters at the time the page is initially loaded. However, if you call this later, the current request will be an Ajax request, with different parameters. So we have decided to throw an exception in those cases. Ideally, parameters would be stored as part of the state of the XForms page, so they can be read at any time. You can work around this by storing the value of the parameters into an instance upon xforms-model-construct-done. -Erik On Nov 19, 2008, at 9:01 PM, Srikanth A wrote: > iam getting the values of a instance using xforms:get-request- > parameter() > but when i try to edit the values and click save button following > message being displayed > xforms:get-request-parameter() can only be called during XForms > initialization > > <body> > <xforms:variable name="qrystring" select="xxforms:get-request- > parameter('id')" /> <h1> Edit <xforms:output > ref="instance('programs-instance')/ > program[id=$qrystring]/id"/></h1> > <a href="http://localhost:8080/orbeon/program-demo/">Home</a> > <xforms:group ref="instance('programs-instance')/program[id= > $qrystring]"> > <xforms:input ref="programname"> > <xforms:label>ProgramName</xforms:label> > </xforms:input><br/> > <xforms:textarea ref="programdescription" > appearance="xxforms:autosize"> > <xforms:label>Program Description</xforms:label> > </xforms:textarea> > <br/> > <xforms:select1 ref="datasourcetype"> > <xforms:label>DataSourceType</xforms:label> > <xforms:item> > <xforms:label>Choose one...</xforms:label> > <xforms:value/> > </xforms:item> > <xforms:itemset nodeset="instance('datasources- > instance')/datasourcetype"> > <xforms:label ref="name"/> > <xforms:value ref="value"/> > </xforms:itemset> > </xforms:select1> > <br/> > <xforms:submit submission="update-submission"><xforms:label>Save</ > xforms:label></xforms:submit> > </xforms:group> > </body> > > -- > 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 Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ Iam getting the same exception when I store the value of the parameter in a instance <xforms:instance id="query-string"> <id1/> </xforms:instance> <xforms:bind nodeset="id1" /> <xforms:variable name="qrystring" select="xxforms:get-request-parameter('id')"/> <xforms:setvalue ev:event="xforms-model-construct-done" value="$qrystring" ref="instance('query-string')"/> </xforms:model> </head> <body> <h1> Edit <xforms:output ref="instance('programs-instance')/program[id=instance('query-string')]/id" /></h1> <a href="http://localhost:8080/orbeon/program-demo/">Home</a> <xforms:group ref="instance('programs-instance')/program[id=instance('query-string')]"> -- 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
|
Variables are re-evaluated regularly, so you can't write this either:
<xforms:variable name="qrystring" select="xxforms:get-request- parameter('id')"/> -Erik On Nov 19, 2008, at 11:20 PM, Srikanth A wrote: > > > -----Original Message----- > From: Erik Bruchez [mailto:[hidden email]] > Sent: Thursday, November 20, 2008 11:24 AM > To: [hidden email] > Subject: [ops-users] Re: xforms:get-request-parameter() can only be > called > during XForms initialization > > This is a known limitation. The idea is that you want to retrieve the > request parameters at the time the page is initially loaded. > However, if you > call this later, the current request will be an Ajax request, with > different > parameters. So we have decided to throw an exception in those cases. > Ideally, parameters would be stored as part of the state of the > XForms page, > so they can be read at any time. > > You can work around this by storing the value of the parameters into > an > instance upon xforms-model-construct-done. > > -Erik > > On Nov 19, 2008, at 9:01 PM, Srikanth A wrote: > >> iam getting the values of a instance using xforms:get-request- >> parameter() >> but when i try to edit the values and click save button following >> message being displayed >> xforms:get-request-parameter() can only be called during XForms >> initialization >> >> <body> >> <xforms:variable name="qrystring" select="xxforms:get-request- >> parameter('id')" /> <h1> Edit <xforms:output >> ref="instance('programs-instance')/ >> program[id=$qrystring]/id"/></h1> >> <a href="http://localhost:8080/orbeon/program-demo/">Home</a> >> <xforms:group ref="instance('programs-instance')/program[id= >> $qrystring]"> >> <xforms:input ref="programname"> >> <xforms:label>ProgramName</xforms:label> >> </xforms:input><br/> >> <xforms:textarea ref="programdescription" >> appearance="xxforms:autosize"> >> <xforms:label>Program Description</xforms:label> >> </xforms:textarea> >> <br/> >> <xforms:select1 ref="datasourcetype"> >> <xforms:label>DataSourceType</xforms:label> >> <xforms:item> >> <xforms:label>Choose one...</xforms:label> >> <xforms:value/> >> </xforms:item> >> <xforms:itemset nodeset="instance('datasources- >> instance')/datasourcetype"> >> <xforms:label ref="name"/> >> <xforms:value ref="value"/> >> </xforms:itemset> >> </xforms:select1> >> <br/> >> <xforms:submit submission="update-submission"><xforms:label>Save</ >> xforms:label></xforms:submit> >> </xforms:group> >> </body> >> >> -- >> 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 > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > > Iam getting the same exception when I store the value of the > parameter in a > instance > > <xforms:instance id="query-string"> > <id1/> > </xforms:instance> > <xforms:bind nodeset="id1" /> > <xforms:variable name="qrystring" > select="xxforms:get-request-parameter('id')"/> > <xforms:setvalue ev:event="xforms-model-construct-done" > value="$qrystring" > ref="instance('query-string')"/> > </xforms:model> > </head> > <body> > <h1> Edit <xforms:output > ref="instance('programs-instance')/program[id=instance('query- > string')]/id" > /></h1> > <a href="http://localhost:8080/orbeon/program-demo/">Home</a> > > > <xforms:group > ref="instance('programs-instance')/program[id=instance('query- > string')]"> > > > > > -- > 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 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 |
Is it possible to use the following java script with a control inside a repeat block ?
ORBEON.xforms.Document.getValue("myControl") I have a map on my screen and when I click on the map I want to the current coordinate adding to a list. And vice-versa if I add a coordinate to the list I want to update the map. The worked fine when I only had two items because each had its own ID on the form, but I'm stuck now that I have a list. Richard Shaw ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤ Richard Shaw Technical Design Authority - Information Solutions Consultancy Intelligent Transport Systems Atkins Highways and Transportation Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW Tel: +44 (0) 1372 756407 Fax: +44 (0) 1372 740055 Mob: 07740 817586 E-mail: [hidden email] www.atkinsglobal.com/its -----Original Message----- From: Erik Bruchez [mailto:[hidden email]] Sent: 20 November 2008 07:31 To: [hidden email] Subject: [ops-users] Re: RE: Re: xforms:get-request-parameter() can only be called during XForms initialization Variables are re-evaluated regularly, so you can't write this either: <xforms:variable name="qrystring" select="xxforms:get-request- parameter('id')"/> -Erik On Nov 19, 2008, at 11:20 PM, Srikanth A wrote: > > > -----Original Message----- > From: Erik Bruchez [mailto:[hidden email]] > Sent: Thursday, November 20, 2008 11:24 AM > To: [hidden email] > Subject: [ops-users] Re: xforms:get-request-parameter() can only be > called during XForms initialization > > This is a known limitation. The idea is that you want to retrieve the > request parameters at the time the page is initially loaded. > However, if you > call this later, the current request will be an Ajax request, with > different parameters. So we have decided to throw an exception in > those cases. > Ideally, parameters would be stored as part of the state of the XForms > page, so they can be read at any time. > > You can work around this by storing the value of the parameters into > an instance upon xforms-model-construct-done. > > -Erik > > On Nov 19, 2008, at 9:01 PM, Srikanth A wrote: > >> iam getting the values of a instance using xforms:get-request- >> parameter() >> but when i try to edit the values and click save button following >> message being displayed >> xforms:get-request-parameter() can only be called during XForms >> initialization >> >> <body> >> <xforms:variable name="qrystring" select="xxforms:get-request- >> parameter('id')" /> <h1> Edit <xforms:output >> ref="instance('programs-instance')/ >> program[id=$qrystring]/id"/></h1> >> <a href="http://localhost:8080/orbeon/program-demo/">Home</a> >> <xforms:group ref="instance('programs-instance')/program[id= >> $qrystring]"> >> <xforms:input ref="programname"> >> <xforms:label>ProgramName</xforms:label> >> </xforms:input><br/> >> <xforms:textarea ref="programdescription" >> appearance="xxforms:autosize"> >> <xforms:label>Program Description</xforms:label> </xforms:textarea> >> <br/> >> <xforms:select1 ref="datasourcetype"> >> <xforms:label>DataSourceType</xforms:label> >> <xforms:item> >> <xforms:label>Choose one...</xforms:label> >> <xforms:value/> >> </xforms:item> >> <xforms:itemset nodeset="instance('datasources- >> instance')/datasourcetype"> >> <xforms:label ref="name"/> >> <xforms:value ref="value"/> >> </xforms:itemset> >> </xforms:select1> >> <br/> >> <xforms:submit submission="update-submission"><xforms:label>Save</ >> xforms:label></xforms:submit> >> </xforms:group> >> </body> >> >> -- >> 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 > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > > Iam getting the same exception when I store the value of the parameter > in a instance > > <xforms:instance id="query-string"> > <id1/> > </xforms:instance> > <xforms:bind nodeset="id1" /> <xforms:variable > name="qrystring" > select="xxforms:get-request-parameter('id')"/> > <xforms:setvalue ev:event="xforms-model-construct-done" > value="$qrystring" > ref="instance('query-string')"/> > </xforms:model> > </head> > <body> > <h1> Edit <xforms:output > ref="instance('programs-instance')/program[id=instance('query- > string')]/id" > /></h1> > <a href="http://localhost:8080/orbeon/program-demo/">Home</a> > > > <xforms:group > ref="instance('programs-instance')/program[id=instance('query- > string')]"> > > > > > -- > 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 Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ This message has been scanned for viruses by MailControl - (see http://axis.eu.atkinsglobal.com/workinghere/itservices/Pages/dataandemailmgt.aspx#mailcontrol) This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding. The ultimate parent company of the Atkins Group is WS Atkins plc. Registered in England No. 1885586. Registered Office Woodcote Grove, Ashley Road, Epsom, Surrey KT18 5BW. A list of wholly owned Atkins Group companies registered in the United Kingdom can be found at http://www.atkinsglobal.com/terms_and_conditions/index.aspx Consider the environment. Please don't print this e-mail unless you really need to. -- 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
|
Richard,
Yes you can, provided you pass the "effective id" of the control, that is the id as is present in the generated HTML. There is some information about effective ids at the bottom of this page: http://wiki.orbeon.com/forms/doc/contributor-guide/xforms-engine-architecture The API should probably support directly passing repeat iterations, but as a workaround this will work. -Erik On Nov 20, 2008, at 6:40 AM, Shaw, Richard A wrote: > Is it possible to use the following java script with a control > inside a repeat block ? > > ORBEON.xforms.Document.getValue("myControl") > > I have a map on my screen and when I click on the map I want to the > current coordinate adding to a list. And vice-versa if I add a > coordinate to the list I want to update the map. > > The worked fine when I only had two items because each had its own > ID on the form, but I'm stuck now that I have a list. > > Richard Shaw > > ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤ > > Richard Shaw > Technical Design Authority - Information Solutions Consultancy > Intelligent Transport Systems > > Atkins Highways and Transportation > Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW > > Tel: +44 (0) 1372 756407 > Fax: +44 (0) 1372 740055 > Mob: 07740 817586 > E-mail: [hidden email] > > www.atkinsglobal.com/its > > -----Original Message----- > From: Erik Bruchez [mailto:[hidden email]] > Sent: 20 November 2008 07:31 > To: [hidden email] > Subject: [ops-users] Re: RE: Re: xforms:get-request-parameter() can > only be called during XForms initialization > > Variables are re-evaluated regularly, so you can't write this either: > > <xforms:variable name="qrystring" select="xxforms:get-request- > parameter('id')"/> > > -Erik > > On Nov 19, 2008, at 11:20 PM, Srikanth A wrote: > >> >> >> -----Original Message----- >> From: Erik Bruchez [mailto:[hidden email]] >> Sent: Thursday, November 20, 2008 11:24 AM >> To: [hidden email] >> Subject: [ops-users] Re: xforms:get-request-parameter() can only be >> called during XForms initialization >> >> This is a known limitation. The idea is that you want to retrieve the >> request parameters at the time the page is initially loaded. >> However, if you >> call this later, the current request will be an Ajax request, with >> different parameters. So we have decided to throw an exception in >> those cases. >> Ideally, parameters would be stored as part of the state of the >> XForms >> page, so they can be read at any time. >> >> You can work around this by storing the value of the parameters into >> an instance upon xforms-model-construct-done. >> >> -Erik >> >> On Nov 19, 2008, at 9:01 PM, Srikanth A wrote: >> >>> iam getting the values of a instance using xforms:get-request- >>> parameter() >>> but when i try to edit the values and click save button following >>> message being displayed >>> xforms:get-request-parameter() can only be called during XForms >>> initialization >>> >>> <body> >>> <xforms:variable name="qrystring" select="xxforms:get-request- >>> parameter('id')" /> <h1> Edit <xforms:output >>> ref="instance('programs-instance')/ >>> program[id=$qrystring]/id"/></h1> >>> <a href="http://localhost:8080/orbeon/program-demo/">Home</a> >>> <xforms:group ref="instance('programs-instance')/program[id= >>> $qrystring]"> >>> <xforms:input ref="programname"> >>> <xforms:label>ProgramName</xforms:label> >>> </xforms:input><br/> >>> <xforms:textarea ref="programdescription" >>> appearance="xxforms:autosize"> >>> <xforms:label>Program Description</xforms:label> </xforms:textarea> >>> <br/> >>> <xforms:select1 ref="datasourcetype"> >>> <xforms:label>DataSourceType</xforms:label> >>> <xforms:item> >>> <xforms:label>Choose one...</xforms:label> >>> <xforms:value/> >>> </xforms:item> >>> <xforms:itemset nodeset="instance('datasources- >>> instance')/datasourcetype"> >>> <xforms:label ref="name"/> >>> <xforms:value ref="value"/> >>> </xforms:itemset> >>> </xforms:select1> >>> <br/> >>> <xforms:submit submission="update-submission"><xforms:label>Save</ >>> xforms:label></xforms:submit> >>> </xforms:group> >>> </body> >>> >>> -- >>> 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 >> >> -- >> Orbeon Forms - Web Forms for the Enterprise Done the Right Way >> http://www.orbeon.com/ >> >> Iam getting the same exception when I store the value of the >> parameter >> in a instance >> >> <xforms:instance id="query-string"> >> <id1/> >> </xforms:instance> >> <xforms:bind nodeset="id1" /> <xforms:variable >> name="qrystring" >> select="xxforms:get-request-parameter('id')"/> >> <xforms:setvalue ev:event="xforms-model-construct-done" >> value="$qrystring" >> ref="instance('query-string')"/> >> </xforms:model> >> </head> >> <body> >> <h1> Edit <xforms:output >> ref="instance('programs-instance')/program[id=instance('query- >> string')]/id" >> /></h1> >> <a href="http://localhost:8080/orbeon/program-demo/">Home</a> >> >> >> <xforms:group >> ref="instance('programs-instance')/program[id=instance('query- >> string')]"> >> >> >> >> >> -- >> 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 > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ > > > > This message has been scanned for viruses by MailControl - (see http://axis.eu.atkinsglobal.com/workinghere/itservices/Pages/dataandemailmgt.aspx#mailcontrol) > > > This email and any attached files are confidential and copyright > protected. If you are not the addressee, any dissemination of this > communication is strictly prohibited. Unless otherwise expressly > agreed in writing, nothing stated in this communication shall be > legally binding. > > The ultimate parent company of the Atkins Group is WS Atkins plc. > Registered in England No. 1885586. Registered Office Woodcote > Grove, Ashley Road, Epsom, Surrey KT18 5BW. A list of wholly owned > Atkins Group companies registered in the United Kingdom can be found > at http://www.atkinsglobal.com/terms_and_conditions/index.aspx > > Consider the environment. Please don't print this e-mail unless you > really need to. > > -- > 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 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 |
Free forum by Nabble | Edit this page |