I have a form where user can download XML doc. After clicking the "Download" button a XPL produces the XML and sends it to the browser (this works fine). However I have the "Loading..." indicator being shown even after the download is complete. Not sure what is the magic combination of submission/@replace, page definition in the page-flow and configuration of the XPL that would result in the loading indicator to disappear after the operation is over. Below are some details of my setup.
the form page submission: <xforms:submission id="export" instance="main-instance" ref="instance('main-instance')" method="post" action="/users/export" replace="all"/> the xpl: <p:param type="input" name="instance"/> <p:param type="output" name="data"/> <p:choose href="#instance"> <!-- XML format --> <p:when test="//form/@export-trigger='send-xml'"> .... XML-producing logic <p:processor name="oxf:xml-converter"> <p:input name="data" href="#instance-mod"/> <p:input name="config"> <config> <content-type>application/xml</content-type> <encoding>utf-8</encoding> <version>1.0</version> </config> </p:input> <p:output name="data" id="converted-output"/> </p:processor> <p:processor name="oxf:http-serializer"> <p:input name="data" href="#converted-output"/> <p:input name="config"> <config> <header> <name>Content-Disposition</name> <value>attachment; filename=export.xml</value> </header> </config> </p:input> </p:processor> <p:processor name="oxf:identity"> <p:input name="data" href="#converted-output"/> <p:output name="data" id="transfer"/> </p:processor> </p:when> <!--other output format --> <p:otherwise> </p:choose> <p:processor name="oxf:identity"> <p:input name="data" href="#transfer"/> <p:output name="data" ref="data"/> </p:processor> the page flow page element: <page id="export" path-info="/users/export" model="/users/export.xpl" view="/users/view.xhtml"/> Alex. -- 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
|
Alex,
In this particular case, the issue is that there is no way for anybody (except the user of the application) to now that the indicator must be cleared! We solved this issue by simply adding an attribute xxforms:show-progress="false", on submissions that you know, as a developer, will cause files to be downloaded. It causes the indicator to simply not be displayed at all for that submission. -Erik Alexander Zatko wrote: > I have a form where user can download XML doc. After clicking the > "Download" button a XPL produces the XML and sends it to the browser > (this works fine). However I have the "Loading..." indicator being shown > even after the download is complete. Not sure what is the magic > combination of submission/@replace, page definition in the page-flow and > configuration of the XPL that would result in the loading indicator to > disappear after the operation is over. Below are some details of my setup. > > *the form page submission:* > > <xforms:submission id="export" instance="main-instance" > ref="instance('main-instance')" method="post" action="/users/export" > replace="all"/> > > *the xpl:* > > <p:param type="input" name="instance"/> > <p:param type="output" name="data"/> > > <p:choose href="#instance"> > <!-- XML format --> > <p:when test="//form/@export-trigger='send-xml'"> > > .... XML-producing logic > > <p:processor name="oxf:xml-converter"> > <p:input name="data" href="#instance-mod"/> > <p:input name="config"> > <config> > <content-type>application/xml</content-type> > <encoding>utf-8</encoding> > <version>1.0</version> > </config> > </p:input> > <p:output name="data" id="converted-output"/> > </p:processor> > > <p:processor name="oxf:http-serializer"> > <p:input name="data" href="#converted-output"/> > <p:input name="config"> > <config> > <header> > <name>Content-Disposition</name> > <value>attachment; filename=export.xml</value> > </header> > </config> > </p:input> > </p:processor> > > <p:processor name="oxf:identity"> > <p:input name="data" href="#converted-output"/> > <p:output name="data" id="transfer"/> > </p:processor> > > </p:when> > <!--other output format --> > <p:otherwise> > </p:choose> > > <p:processor name="oxf:identity"> > <p:input name="data" href="#transfer"/> > <p:output name="data" ref="data"/> > </p:processor> > > *the page flow page element:* > > <page id="export" path-info="/users/export" model="/users/export.xpl" > view="/users/view.xhtml"/> > > Alex. > > > ------------------------------------------------------------------------ > > > -- > 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 - XForms Everywhere http://www.orbeon.com/blog/ -- 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 |
Erik,
<xforms:submission id="export" instance="main-instance" ref="instance ('main-instance')" method="post" action="/users/export" replace="all" xxforms:show-progress="false"/> ..does not remove the indicator in version 3.5.M1.200610021548 Also - just not showing the indicator will probably not help with a related problem - that clicking the "Download" button again after the file is downloaded does nothing. I guess the XForms engine just queues that request to be executed after the first operation ends but that is not happening? A. On Nov 10, 2006, at 12:36 AM, Erik Bruchez wrote: > Alex, > > In this particular case, the issue is that there is no way for > anybody (except the user of the application) to now that the > indicator must be cleared! > > We solved this issue by simply adding an attribute xxforms:show- > progress="false", on submissions that you know, as a developer, > will cause files to be downloaded. It causes the indicator to > simply not be displayed at all for that submission. > > -Erik > > Alexander Zatko wrote: >> I have a form where user can download XML doc. After clicking the >> "Download" button a XPL produces the XML and sends it to the >> browser (this works fine). However I have the "Loading..." >> indicator being shown even after the download is complete. Not >> sure what is the magic combination of submission/@replace, page >> definition in the page-flow and configuration of the XPL that >> would result in the loading indicator to disappear after the >> operation is over. Below are some details of my setup. >> *the form page submission:* >> <xforms:submission id="export" instance="main-instance" >> ref="instance('main-instance')" method="post" action="/users/ >> export" replace="all"/> >> *the xpl:* >> <p:param type="input" name="instance"/> >> <p:param type="output" name="data"/> >> <p:choose href="#instance"> >> <!-- XML format --> >> <p:when test="//form/@export-trigger='send-xml'"> >> .... XML-producing logic >> <p:processor name="oxf:xml-converter"> >> <p:input name="data" href="#instance-mod"/> >> <p:input name="config"> >> <config> >> <content-type>application/xml</content-type> >> <encoding>utf-8</encoding> >> <version>1.0</version> >> </config> >> </p:input> >> <p:output name="data" id="converted-output"/> >> </p:processor> >> <p:processor name="oxf:http-serializer"> >> <p:input name="data" href="#converted-output"/> >> <p:input name="config"> >> <config> >> <header> >> <name>Content-Disposition</name> >> <value>attachment; >> filename=export.xml</value> >> </header> >> </config> >> </p:input> >> </p:processor> >> <p:processor name="oxf:identity"> >> <p:input name="data" href="#converted-output"/> >> <p:output name="data" id="transfer"/> >> </p:processor> >> </p:when> >> <!--other output format --> >> <p:otherwise> >> </p:choose> >> <p:processor name="oxf:identity"> >> <p:input name="data" href="#transfer"/> >> <p:output name="data" ref="data"/> >> </p:processor> >> *the page flow page element:* >> <page id="export" path-info="/users/export" model="/users/ >> export.xpl" view="/users/view.xhtml"/> >> Alex. >> --------------------------------------------------------------------- >> --- >> -- >> 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 > > > -- > Orbeon Forms - XForms Everywhere > http://www.orbeon.com/blog/ > > > -- > 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
|
Alexander Zatko wrote:
> Erik, > > <xforms:submission id="export" instance="main-instance" > ref="instance('main-instance')" method="post" action="/users/export" > replace="all" xxforms:show-progress="false"/> > > ..does not remove the indicator in version 3.5.M1.200610021548 I see in the logs that this was implemented on 2006-10-18, so after your build. > Also - just not showing the indicator will probably not help with a > related problem - that clicking the "Download" button again after the > file is downloaded does nothing. I guess the XForms engine just queues > that request to be executed after the first operation ends but that is > not happening? The DMV Forms allows you to download PDF files, for example, and it seems to work just fine. I am not sure what's happening in your case. -Erik -- Orbeon Forms - XForms Everywhere http://www.orbeon.com/blog/ -- 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 |