eXist - Help me please! No time left!

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

eXist - Help me please! No time left!

Paul Saxelby
Hi all,

I did, until today, have another 9 days to get this form working.
I've now been told I have just 2...

I'm in deep...  you know what.

I gave up on the range control, used the select1 instead.
The form is complete (content wise), now all I have to do is get it
saving to the exist database.

The tutorial shows this as being really easy - but guess what  :(

When I use a path equivalent to the one in the tutorial for the
submission (but substituting my app name in the path I get an orbeon
error saying that the file could not be loaded.
Apparently eXist is bundled with Orbeon - is it set to go? How do you
get to the admin if not running linux?

I downloaded the eXist .war file & put it in the webapps directory,
ran up the admin page, and loaded in an xml file containing an
un-filled form.
This shows up in the 'browse collections' page & I can view the xml file.

I can not however get a submission to write anything to the database.
I have tried all sorts of things as the path for the submission.
Should the file be created by eXist if it's the first record to be saved?
How do I get it to add a record instead of overwriting the old one
(which the example seems to do)?

I am one stop short of having this exercise done and I am completely
stumped & starting to panic.

Please, please, please can anyone tell me where I am going wrong?

You guys have been great so far & I really appreciate all of the help
that you have given me.

I have attached a couple of screenshots of the exist admin & xml to
show the path to each, a quick little css file, and the xhtml form
file.

Help me Obi-Wan Kenobi - You're my only hope....

Regards,
Paul Saxelby


--
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

existadmin.jpg (199K) Download Attachment
existxml.jpg (280K) Download Attachment
view.xhtml (85K) Download Attachment
quick.css (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Saving data to local files and reusing later

Markku Laine
Hi mates,


I am trying to add a new feature to my web application, which allows
users to save unfinished forms to local files and to load those files
later.

I found this example:
http://www-128.ibm.com/developerworks/xml/library/x-xformstiplocal/index.html

It works great when using, e.g. Mozilla XFroms, but when I tried to use it
with Orbeon Forms it did not work anymore.

To make the form work with Orbeon Forms, I modified the web.xml file by
adding "put" to the list of http accept methods:
<!-- Set supported methods -->
<init-param>
   <param-name>oxf.http.accept-methods</param-name>
   <param-value>get,post,put,head</param-value>
</init-param>


However, it still does not work and I am getting the following exception:

2007-06-30 14:27:42,702 http-8080-Processor23 INFO
webapp.ProcessorService null - /xforms-server - Received request
2007-06-30 14:27:42,742 http-8080-Processor23 ERROR processor.XFormsServer
null - XForms - submission - xforms-submit-error throwable:
org.orbeon.oxf.common.OXFException: xforms:submission: submission URL
scheme not yet implemented: file
  at
org.orbeon.oxf.xforms.XFormsSubmissionUtils.doRegular(XFormsSubmissionUtils.java:266)
  at
org.orbeon.oxf.xforms.XFormsSubmissionUtils.doRegular(XFormsSubmissionUtils.java:152)
  at
org.orbeon.oxf.xforms.XFormsModelSubmission.performDefaultAction(XFormsModelSubmission.java:649)
  at
org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:920)
  at
org.orbeon.oxf.xforms.control.controls.XFormsSubmitControl.performDefaultAction(XFormsSubmitControl.java:48)
  at
org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:920)
  at
org.orbeon.oxf.xforms.XFormsContainingDocument.executeExternalEvent(XFormsContainingDocument.java:749)
  at
org.orbeon.oxf.xforms.processor.XFormsServer.executeExternalEventPrepareIfNecessary(XFormsServer.java:289)
  at
org.orbeon.oxf.xforms.processor.XFormsServer.doIt(XFormsServer.java:244)
  at
org.orbeon.oxf.xforms.processor.XFormsServer.access$000(XFormsServer.java:49)
  at
org.orbeon.oxf.xforms.processor.XFormsServer$1.readImpl(XFormsServer.java:78)
  at
org.orbeon.oxf.processor.ProcessorImpl$7.read(ProcessorImpl.java:1031)
  at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$ConcreteProcessorFilter$ForwarderProcessorOutput.read(ProcessorImpl.java:985)
  at
org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
  at
org.orbeon.oxf.processor.validation.MSVValidationProcessor.access$700(MSVValidationProcessor.java:44)
  at
org.orbeon.oxf.processor.validation.MSVValidationProcessor$5.readImpl(MSVValidationProcessor.java:219)
  at
org.orbeon.oxf.processor.ProcessorImpl$7.read(ProcessorImpl.java:1031)
  at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1214)
  at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$ConcreteProcessorFilter.read(ProcessorImpl.java:1009)
  at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1214)
  at
org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
  at
org.orbeon.oxf.processor.serializer.legacy.XMLSerializer.readInput(XMLSerializer.java:58)
  at
org.orbeon.oxf.processor.serializer.HttpTextSerializer.readInput(HttpTextSerializer.java:54)
  at
org.orbeon.oxf.processor.serializer.HttpSerializerBase$1.read(HttpSerializerBase.java:147)
  at
org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsObject(ProcessorImpl.java:489)
  at
org.orbeon.oxf.processor.serializer.HttpSerializerBase.start(HttpSerializerBase.java:138)
  at
org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcessor.java:652)
  at
org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:555)
  at
org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:649)
  at
org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:230)
  at
org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcessor.java:652)
  at
org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:555)
  at
org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:649)
  at
org.orbeon.oxf.pipeline.InitUtils.runProcessor(InitUtils.java:88)
  at
org.orbeon.oxf.webapp.ProcessorService.service(ProcessorService.java:96)
  at
org.orbeon.oxf.servlet.OPSServletDelegate.service(OPSServletDelegate.java:148)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  at org.orbeon.oxf.servlet.OPSServlet.service(OPSServlet.java:75)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
  at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
  at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
  at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
  at
org.orbeon.oxf.servlet.OPSXFormsFilter.doFilter(OPSXFormsFilter.java:59)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
  at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
  at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
  at java.lang.Thread.run(Thread.java:619)

2007-06-30 14:27:42,752 http-8080-Processor23 INFO
webapp.ProcessorService null - /xforms-server - Timing: 50 - Cache hits:
32, fault: 1, adds: 0, success rate: 96%


As you can see, the error message says that the submisson URL scheme
"file" has not been implemented yet. Will this be implemented at some
point in the future and if yes, appr. when or is it even possible to
implement this feature for Orbeon Forms?

Best Regards


-Markku Laine



--
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
Reply | Threaded
Open this post in threaded view
|

Re: eXist - Help me please! No time left!

Marcus-2
In reply to this post by Paul Saxelby
Hi Paul,
while i myself am a newby and some others helped me a lot the last weeks, i try to give some short answers, while i have not much time left for my own webapp - sorry for that! Most of the people on this list are very helpful and even more friendly than i expected - this is a great mailinglist!
 
I try to give some answers, but i'm sure, i can't answer all your questions in short, hope someone else will have some time too.
 
> When I use a path equivalent to the one in the tutorial for the
> submission (but substituting my app name in the path I get an orbeon
> error saying that the file could not be loaded.
> Apparently eXist is bundled with Orbeon - is it set to go? How do you
> get to the admin if not running linux?
Using the embedded eXist leeds to some problems, like not having an admin-page or be able to use the JavaGUI as standard. So you have to choises, integrate the JavaGUI yourself to work with the embedded eXist more comfortable or use an external eXist, just like you did at last! But than you have to change your saving path from the internal to the external eXist-DB! See below!
 
Some more path information on your own webapp would be helpful, but lets guess you have build your app upon the orbeon app and placed it into tomcat i.e. with
/Tomcat-Home/webapps/myapp
and you have inside your webapp the typical orbeon structure
/myapp/WEB-INF/resources/apps/yourapp/xyz.xhtml
 
OK, here we go, just took a look at your page and tested it myself.
To be honest, it is very big and that slows done the app! Perhaps you'll find a way to use <xform:repeat> that will make your code more friendly to view. Don't know if it will have some influence on the performance!?
 
I changed the path in your submission to:
<xforms:submission id="save-submission" ref="instance('questionnaires-instance')" action="/exist/rest//db/orbeon/questionnaire/questionnaires.xml" method="put" replace="none" >
    <xforms:message ev:event="xforms-submit-error" level="modal">An error occurred while saving!</xforms:message>
</xforms:submission>
Embedded eXist-DB in OPS: --> action="/exist/rest//db/orbeon/questionnaire/questionnaires.xml"
 
Be sure to use the double // as your screenshot also are showing that path to your files!
Don't know if it should work with one less, but i think that depends on your settings in web.xml. No matter at the moment, a double // does it for me and your app works and saves the file perfectly.!
 
Just for using purpose i deletet Group2 to Group12 - i don't know if there will be any other mistakes, but i think so, will my log shows, that your instance is invalid!
I'm not sure what you want with "visible-false", but perhaps some of your selects are not displayed, but required, that would leed to an invalid instance too! So be careful!  <div class="slider" visible="false">
OK, that wasn't the problem, but!!!
In your Group[10] there are 4 Statements missing (5-8) so, you bind them as required, but you don't set them, while there is no select1 for them!!! That's another reason why your form is invalid for saving!!!
 
As i siad, try to use the repeat function, than something like that should not happen again, but while your form is that big and confusing, such mistakes are hard to find, but too fast made!!!
 
Perhaps another idea for better displaying would be to use different pages!? Take a look to:
For such questionaires, that would be a way to prefer. While i'm working long enough in the marketing-research sector, the way you do it is too blind bend! Sorry!
 
> I downloaded the eXist .war file & put it in the webapps directory,
> ran up the admin page, and loaded in an xml file containing an
> un-filled form.
> This shows up in the 'browse collections' page & I can view the xml file.
As you can see above, if you wanna work with the external DB you have to change your saving path!

> I can not however get a submission to write anything to the database.
> I have tried all sorts of things as the path for the submission.
 
When you first try to save something, be sure that your instance is valid. The Goverment-Forms gave you an impression on custom error-management! And there you'll find a way to display the errors leading to invalid status.
In your case i think it was because of the invalid form, after correcting this, it should work using one of the paths above! GL
 
> Should the file be created by eXist if it's the first record to be saved?
> How do I get it to add a record instead of overwriting the old one
> (which the example seems to do)?
No, you need not to save a blank file first!
But to get new docs instead of overwriting the old ones, you must give them different names - perhaps add a counter to your form-name. One more time, take a look to the Gov-Forms Example. There each doc gets an own name.
 
 
HTH and perhaps you'll find some help by another person, while i have trouble to finish my own webapp in time and this is my last exam that will be graded, so i have to take a look at myself. Sorry
 
Regards, Marcus
 
 
PS: You have luck with people here helping each other, in other Mailinglists, the way you did it, would be the wrongest i can imagine. While this is a free support, normaly people won't the work for you only while you have time-trouble :-( But here i'm glad to be able to say, most users are very friendly and helpful! One of the best mailinglists i ever used. So this is a way it makes fun to learn new things, helping each other and at last spending time to help other users and also the developers to find bugs and test new functions! A shame that so few List work like here. This is how it should work!!!


--
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
Reply | Threaded
Open this post in threaded view
|

Re: eXist - Help me please! No time left!

fl.schmitt(ops-users)
In reply to this post by Paul Saxelby
Hi Paul,

> I can not however get a submission to write anything to the database.
> I have tried all sorts of things as the path for the submission.

Maybe it's a matter of permissions. Your screenshot shows that
"questionnaires" (i suppose it's "questionnaires.xml") is owned by user
admin, group dba. As far as i know, REST actions are handled by eXist as
being executed by user guest, group guest (but i'm not sure!). This user
maybe isn't permittet to write that file - i suppose that he's not
allowed to do any write access to the /db directory. He may have the
right to update that file, but i think HTTP PUT/POST results in a
deletion/recreation of that file if you're not using xupdate.

So you could try different things:
- create a subcollection inside eXist and modify it so guest.guest has
write access to it;
- in addition to creating a subcollection, create a new user inside
eXist, set the permissions as needed and implement the HTTP
authentication mechanism as described here:
http://www.orbeon.com/ops/doc/processors-submission#authentication

Personally, i prefer to use the web start java client for administration
puposes of eXist. It allows to easily create users and groups,
collections and so on, and to assign permissions to collections and
resources. If you have depoyed eXist into tomcat, you will find a link
to the Webstart Client on the left of the index page of eXist (open
http://localhost:8080/exist with your browser) under "administration",
or use a direct URL: http://localhost:8080/exist/webstart/exist.jnlp
(assuming tomcat is listening on standard port 8080 on localhost).


HTH and good luck
florian



--
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
Reply | Threaded
Open this post in threaded view
|

Re: Saving data to local files and reusing later

Daniel E. Renfer
In reply to this post by Markku Laine
Markku,

As a workaround, you could have your instance submitted to a pipeline that will simply echo it back out with the "Content-Disposition:  attachment" header. [1] That way, when your user hits the "save as file" button, they'll be presented with a download option. You can even suggest the filename it should be named as.

[1]: http://www.ietf.org/rfc/rfc2183.txt
--
Daniel E. Renfer
http://kronkltd.net/

On 6/30/07, .::: Markku :::. <[hidden email]> wrote:
Hi mates,


I am trying to add a new feature to my web application, which allows
users to save unfinished forms to local files and to load those files
later.

I found this example:
http://www-128.ibm.com/developerworks/xml/library/x-xformstiplocal/index.html

It works great when using, e.g. Mozilla XFroms, but when I tried to use it
with Orbeon Forms it did not work anymore.

To make the form work with Orbeon Forms, I modified the web.xml file by
adding "put" to the list of http accept methods:
<!-- Set supported methods -->
<init-param>
   <param-name>oxf.http.accept-methods</param-name>
   <param-value>get,post,put,head</param-value>
</init-param>


However, it still does not work and I am getting the following exception:

2007-06-30 14:27:42,702 http-8080-Processor23 INFO
webapp.ProcessorService null - /xforms-server - Received request
2007-06-30 14:27:42,742 http-8080-Processor23 ERROR processor.XFormsServer
null - XForms - submission - xforms-submit-error throwable:
org.orbeon.oxf.common.OXFException: xforms:submission: submission URL
scheme not yet implemented: file
        at
org.orbeon.oxf.xforms.XFormsSubmissionUtils.doRegular(XFormsSubmissionUtils.java:266)
        at
org.orbeon.oxf.xforms.XFormsSubmissionUtils.doRegular(XFormsSubmissionUtils.java:152)
        at
org.orbeon.oxf.xforms.XFormsModelSubmission.performDefaultAction(XFormsModelSubmission.java:649)
        at
org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:920)
        at
org.orbeon.oxf.xforms.control.controls.XFormsSubmitControl.performDefaultAction(XFormsSubmitControl.java:48)
        at
org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:920)
        at
org.orbeon.oxf.xforms.XFormsContainingDocument.executeExternalEvent(XFormsContainingDocument.java:749)
        at
org.orbeon.oxf.xforms.processor.XFormsServer.executeExternalEventPrepareIfNecessary (XFormsServer.java:289)
        at
org.orbeon.oxf.xforms.processor.XFormsServer.doIt(XFormsServer.java:244)
        at
org.orbeon.oxf.xforms.processor.XFormsServer.access$000(XFormsServer.java:49)
        at
org.orbeon.oxf.xforms.processor.XFormsServer$1.readImpl(XFormsServer.java:78)
        at
org.orbeon.oxf.processor.ProcessorImpl$7.read(ProcessorImpl.java:1031)
        at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$ConcreteProcessorFilter$ForwarderProcessorOutput.read (ProcessorImpl.java:985)
        at
org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at
org.orbeon.oxf.processor.validation.MSVValidationProcessor.access$700(MSVValidationProcessor.java :44)
        at
org.orbeon.oxf.processor.validation.MSVValidationProcessor$5.readImpl(MSVValidationProcessor.java:219)
        at
org.orbeon.oxf.processor.ProcessorImpl$7.read(ProcessorImpl.java:1031)
        at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1214)
        at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$ConcreteProcessorFilter.read(ProcessorImpl.java:1009)
        at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1214)
        at
org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at
org.orbeon.oxf.processor.serializer.legacy.XMLSerializer.readInput (XMLSerializer.java:58)
        at
org.orbeon.oxf.processor.serializer.HttpTextSerializer.readInput(HttpTextSerializer.java:54)
        at
org.orbeon.oxf.processor.serializer.HttpSerializerBase$1.read(HttpSerializerBase.java :147)
        at
org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsObject(ProcessorImpl.java:489)
        at
org.orbeon.oxf.processor.serializer.HttpSerializerBase.start(HttpSerializerBase.java:138)
        at
org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcessor.java:652)
        at
org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:555)
        at
org.orbeon.oxf.processor.pipeline.PipelineProcessor.start (PipelineProcessor.java:649)
        at
org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:230)
        at
org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run (PipelineProcessor.java:652)
        at
org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:555)
        at
org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java :649)
        at
org.orbeon.oxf.pipeline.InitUtils.runProcessor(InitUtils.java:88)
        at
org.orbeon.oxf.webapp.ProcessorService.service(ProcessorService.java:96)
        at
org.orbeon.oxf.servlet.OPSServletDelegate.service (OPSServletDelegate.java:148)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.orbeon.oxf.servlet.OPSServlet.service(OPSServlet.java:75)
        at javax.servlet.http.HttpServlet.service (HttpServlet.java:802)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java :173)
        at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
        at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
        at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
        at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
        at
org.orbeon.oxf.servlet.OPSXFormsFilter.doFilter(OPSXFormsFilter.java:59)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java :178)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java :664)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:619)

2007-06-30 14:27:42,752 http-8080-Processor23 INFO
webapp.ProcessorService null - /xforms-server - Timing: 50 - Cache hits:
32, fault: 1, adds: 0, success rate: 96%


As you can see, the error message says that the submisson URL scheme
"file" has not been implemented yet. Will this be implemented at some
point in the future and if yes, appr. when or is it even possible to
implement this feature for Orbeon Forms?

Best Regards


-Markku Laine



--
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
Reply | Threaded
Open this post in threaded view
|

Re: Saving data to local files and reusing later

Marcus-2

Hi,
i tried to understand that text-file you send the link, but to be honest, i have no idea how to realize your hint.
It would be great to find a way to provide the user the possibility to download the actual file as html or xml - perhaps through a XPL so that one can first use also an XSLT to tranform the data!
That would be a great thing to have, while at the moment, when i try to send to user the xml it is shown in the browser, but not available to download :-((
 
A sample XPL would be very helpful!!!
Regards, Marcus
 
 
----- Original Message -----
Sent: Saturday, June 30, 2007 10:46 PM
Subject: Re: [ops-users] Saving data to local files and reusing later

Markku,

As a workaround, you could have your instance submitted to a pipeline that will simply echo it back out with the "Content-Disposition:  attachment" header. [1] That way, when your user hits the "save as file" button, they'll be presented with a download option. You can even suggest the filename it should be named as.

[1]: http://www.ietf.org/rfc/rfc2183.txt
--
Daniel E. Renfer
http://kronkltd.net/

On 6/30/07, .::: Markku :::. <[hidden email]> wrote:
Hi mates,


I am trying to add a new feature to my web application, which allows
users to save unfinished forms to local files and to load those files
later.

I found this example:
http://www-128.ibm.com/developerworks/xml/library/x-xformstiplocal/index.html

It works great when using, e.g. Mozilla XFroms, but when I tried to use it
with Orbeon Forms it did not work anymore.

To make the form work with Orbeon Forms, I modified the web.xml file by
adding "put" to the list of http accept methods:
<!-- Set supported methods -->
<init-param>
   <param-name>oxf.http.accept-methods</param-name>
   <param-value>get,post,put,head</param-value>
</init-param>


However, it still does not work and I am getting the following exception:

2007-06-30 14:27:42,702 http-8080-Processor23 INFO
webapp.ProcessorService null - /xforms-server - Received request
2007-06-30 14:27:42,742 http-8080-Processor23 ERROR processor.XFormsServer
null - XForms - submission - xforms-submit-error throwable:
org.orbeon.oxf.common.OXFException: xforms:submission: submission URL
scheme not yet implemented: file
        at
org.orbeon.oxf.xforms.XFormsSubmissionUtils.doRegular(XFormsSubmissionUtils.java:266)
        at
org.orbeon.oxf.xforms.XFormsSubmissionUtils.doRegular(XFormsSubmissionUtils.java:152)
        at
org.orbeon.oxf.xforms.XFormsModelSubmission.performDefaultAction(XFormsModelSubmission.java:649)
        at
org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:920)
        at
org.orbeon.oxf.xforms.control.controls.XFormsSubmitControl.performDefaultAction(XFormsSubmitControl.java:48)
        at
org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:920)
        at
org.orbeon.oxf.xforms.XFormsContainingDocument.executeExternalEvent(XFormsContainingDocument.java:749)
        at
org.orbeon.oxf.xforms.processor.XFormsServer.executeExternalEventPrepareIfNecessary (XFormsServer.java:289)
        at
org.orbeon.oxf.xforms.processor.XFormsServer.doIt(XFormsServer.java:244)
        at
org.orbeon.oxf.xforms.processor.XFormsServer.access$000(XFormsServer.java:49)
        at
org.orbeon.oxf.xforms.processor.XFormsServer$1.readImpl(XFormsServer.java:78)
        at
org.orbeon.oxf.processor.ProcessorImpl$7.read(ProcessorImpl.java:1031)
        at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$ConcreteProcessorFilter$ForwarderProcessorOutput.read (ProcessorImpl.java:985)
        at
org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at
org.orbeon.oxf.processor.validation.MSVValidationProcessor.access$700(MSVValidationProcessor.java :44)
        at
org.orbeon.oxf.processor.validation.MSVValidationProcessor$5.readImpl(MSVValidationProcessor.java:219)
        at
org.orbeon.oxf.processor.ProcessorImpl$7.read(ProcessorImpl.java:1031)
        at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1214)
        at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$ConcreteProcessorFilter.read(ProcessorImpl.java:1009)
        at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1214)
        at
org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at
org.orbeon.oxf.processor.serializer.legacy.XMLSerializer.readInput (XMLSerializer.java:58)
        at
org.orbeon.oxf.processor.serializer.HttpTextSerializer.readInput(HttpTextSerializer.java:54)
        at
org.orbeon.oxf.processor.serializer.HttpSerializerBase$1.read(HttpSerializerBase.java :147)
        at
org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsObject(ProcessorImpl.java:489)
        at
org.orbeon.oxf.processor.serializer.HttpSerializerBase.start(HttpSerializerBase.java:138)
        at
org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcessor.java:652)
        at
org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:555)
        at
org.orbeon.oxf.processor.pipeline.PipelineProcessor.start (PipelineProcessor.java:649)
        at
org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:230)
        at
org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run (PipelineProcessor.java:652)
        at
org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:555)
        at
org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java :649)
        at
org.orbeon.oxf.pipeline.InitUtils.runProcessor(InitUtils.java:88)
        at
org.orbeon.oxf.webapp.ProcessorService.service(ProcessorService.java:96)
        at
org.orbeon.oxf.servlet.OPSServletDelegate.service (OPSServletDelegate.java:148)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.orbeon.oxf.servlet.OPSServlet.service(OPSServlet.java:75)
        at javax.servlet.http.HttpServlet.service (HttpServlet.java:802)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java :173)
        at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
        at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
        at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
        at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
        at
org.orbeon.oxf.servlet.OPSXFormsFilter.doFilter(OPSXFormsFilter.java:59)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java :178)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java :664)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:619)

2007-06-30 14:27:42,752 http-8080-Processor23 INFO
webapp.ProcessorService null - /xforms-server - Timing: 50 - Cache hits:
32, fault: 1, adds: 0, success rate: 96%


As you can see, the error message says that the submisson URL scheme
"file" has not been implemented yet. Will this be implemented at some
point in the future and if yes, appr. when or is it even possible to
implement this feature for Orbeon Forms?

Best Regards


-Markku Laine



--
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


--
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
Reply | Threaded
Open this post in threaded view
|

Re: eXist - Help me please! No time left!

Erik Bruchez
Administrator
In reply to this post by Paul Saxelby
Paul,

You got some responses already, but I wanted to mention that I tried
your view.xhtml and it saved into the embedded eXist just fine.

As pointed out, you my just be hitting a problem of permissions.

-Erik

Paul Saxelby wrote:

> Hi all,
>
> I did, until today, have another 9 days to get this form working.
> I've now been told I have just 2...
>
> I'm in deep...  you know what.
>
> I gave up on the range control, used the select1 instead.
> The form is complete (content wise), now all I have to do is get it
> saving to the exist database.
>
> The tutorial shows this as being really easy - but guess what  :(
>
> When I use a path equivalent to the one in the tutorial for the
> submission (but substituting my app name in the path I get an orbeon
> error saying that the file could not be loaded.
> Apparently eXist is bundled with Orbeon - is it set to go? How do you
> get to the admin if not running linux?
>
> I downloaded the eXist .war file & put it in the webapps directory,
> ran up the admin page, and loaded in an xml file containing an
> un-filled form.
> This shows up in the 'browse collections' page & I can view the xml file.
>
> I can not however get a submission to write anything to the database.
> I have tried all sorts of things as the path for the submission.
> Should the file be created by eXist if it's the first record to be saved?
> How do I get it to add a record instead of overwriting the old one
> (which the example seems to do)?
>
> I am one stop short of having this exercise done and I am completely
> stumped & starting to panic.
>
> Please, please, please can anyone tell me where I am going wrong?
>
> You guys have been great so far & I really appreciate all of the help
> that you have given me.
>
> I have attached a couple of screenshots of the exist admin & xml to
> show the path to each, a quick little css file, and the xhtml form
> file.
>
> Help me Obi-Wan Kenobi - You're my only hope....
>
> Regards,
> Paul Saxelby
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>

--
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
Reply | Threaded
Open this post in threaded view
|

Re: Saving data to local files and reusing later

Erik Bruchez
Administrator
In reply to this post by Markku Laine
Markku,

That's right, "file:" is not implemented. One reason is that Orbeon
Forms being implemented mainly server-side, reading and writing from and
to files would happen on the server, and we haven't had many use cases
for that. I am not sure if this is what you intend to do, but it would
certainly not work like the Firefox implementation which, I assume,
writes files on the client.

Saving files on the client is not possible without, at best, going
through security dialogs.

If you just want to save temporary work, you could use the eXist
database, which can be accessed through XForms submissions.

-Erik

.::: Markku :::. wrote:

> Hi mates,
>
>
> I am trying to add a new feature to my web application, which allows
> users to save unfinished forms to local files and to load those files
> later.
>
> I found this example:
> http://www-128.ibm.com/developerworks/xml/library/x-xformstiplocal/index.html 
>
>
> It works great when using, e.g. Mozilla XFroms, but when I tried to use
> it with Orbeon Forms it did not work anymore.
>
> To make the form work with Orbeon Forms, I modified the web.xml file by
> adding "put" to the list of http accept methods:
> <!-- Set supported methods -->
> <init-param>
>   <param-name>oxf.http.accept-methods</param-name>
>   <param-value>get,post,put,head</param-value>
> </init-param>
>
>
> However, it still does not work and I am getting the following exception:
>
> 2007-06-30 14:27:42,702 http-8080-Processor23 INFO
> webapp.ProcessorService null - /xforms-server - Received request
> 2007-06-30 14:27:42,742 http-8080-Processor23 ERROR
> processor.XFormsServer null - XForms - submission - xforms-submit-error
> throwable: org.orbeon.oxf.common.OXFException: xforms:submission:
> submission URL scheme not yet implemented: file
>     at
> org.orbeon.oxf.xforms.XFormsSubmissionUtils.doRegular(XFormsSubmissionUtils.java:266)
>
>     at
> org.orbeon.oxf.xforms.XFormsSubmissionUtils.doRegular(XFormsSubmissionUtils.java:152)
>
>     at
> org.orbeon.oxf.xforms.XFormsModelSubmission.performDefaultAction(XFormsModelSubmission.java:649)
>
>     at
> org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:920)
>
>     at
> org.orbeon.oxf.xforms.control.controls.XFormsSubmitControl.performDefaultAction(XFormsSubmitControl.java:48)
>
>     at
> org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:920)
>
>     at
> org.orbeon.oxf.xforms.XFormsContainingDocument.executeExternalEvent(XFormsContainingDocument.java:749)
>
>     at
> org.orbeon.oxf.xforms.processor.XFormsServer.executeExternalEventPrepareIfNecessary(XFormsServer.java:289)
>
>     at
> org.orbeon.oxf.xforms.processor.XFormsServer.doIt(XFormsServer.java:244)
>     at
> org.orbeon.oxf.xforms.processor.XFormsServer.access$000(XFormsServer.java:49)
>
>     at
> org.orbeon.oxf.xforms.processor.XFormsServer$1.readImpl(XFormsServer.java:78)
>
>     at
> org.orbeon.oxf.processor.ProcessorImpl$7.read(ProcessorImpl.java:1031)
>     at
> org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$ConcreteProcessorFilter$ForwarderProcessorOutput.read(ProcessorImpl.java:985)
>
>     at
> org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
>
>     at
> org.orbeon.oxf.processor.validation.MSVValidationProcessor.access$700(MSVValidationProcessor.java:44)
>
>     at
> org.orbeon.oxf.processor.validation.MSVValidationProcessor$5.readImpl(MSVValidationProcessor.java:219)
>
>     at
> org.orbeon.oxf.processor.ProcessorImpl$7.read(ProcessorImpl.java:1031)
>     at
> org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1214)
>
>     at
> org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$ConcreteProcessorFilter.read(ProcessorImpl.java:1009)
>
>     at
> org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1214)
>
>     at
> org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
>
>     at
> org.orbeon.oxf.processor.serializer.legacy.XMLSerializer.readInput(XMLSerializer.java:58)
>
>     at
> org.orbeon.oxf.processor.serializer.HttpTextSerializer.readInput(HttpTextSerializer.java:54)
>
>     at
> org.orbeon.oxf.processor.serializer.HttpSerializerBase$1.read(HttpSerializerBase.java:147)
>
>     at
> org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsObject(ProcessorImpl.java:489)
>
>     at
> org.orbeon.oxf.processor.serializer.HttpSerializerBase.start(HttpSerializerBase.java:138)
>
>     at
> org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcessor.java:652)
>
>     at
> org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:555)
>
>     at
> org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:649)
>
>     at
> org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:230)
>
>     at
> org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcessor.java:652)
>
>     at
> org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:555)
>
>     at
> org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:649)
>
>     at org.orbeon.oxf.pipeline.InitUtils.runProcessor(InitUtils.java:88)
>     at
> org.orbeon.oxf.webapp.ProcessorService.service(ProcessorService.java:96)
>     at
> org.orbeon.oxf.servlet.OPSServletDelegate.service(OPSServletDelegate.java:148)
>
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>     at org.orbeon.oxf.servlet.OPSServlet.service(OPSServlet.java:75)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>
>     at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
>
>     at
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
>
>     at
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
>
>     at
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
>
>     at
> org.orbeon.oxf.servlet.OPSXFormsFilter.doFilter(OPSXFormsFilter.java:59)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
>
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>
>     at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>
>     at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>
>     at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
>
>     at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>
>     at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>
>     at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>
>     at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>     at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>     at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
>
>     at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>
>     at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>
>     at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>
>     at java.lang.Thread.run(Thread.java:619)
>
> 2007-06-30 14:27:42,752 http-8080-Processor23 INFO
> webapp.ProcessorService null - /xforms-server - Timing: 50 - Cache hits:
> 32, fault: 1, adds: 0, success rate: 96%
>
>
> As you can see, the error message says that the submisson URL scheme
> "file" has not been implemented yet. Will this be implemented at some
> point in the future and if yes, appr. when or is it even possible to
> implement this feature for Orbeon Forms?
>
> Best Regards
>
>
> -Markku Laine
>

--
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
Reply | Threaded
Open this post in threaded view
|

Re: Saving data to local files and reusing later

Daniel E. Renfer
In reply to this post by Marcus-2
Sorry about not properly explaining the process. The link I sent was
to the official spec. No one has ever claimed that RFCs are easy or
fun to read. The end result is, to use it, you need to use the
http-serializer to attach that header with your output.

<p:config
        xmlns:oxf="http://www.orbeon.com/oxf/processors"
        xmlns:p="http://www.orbeon.com/oxf/pipeline">

        <p:param name="instance" type="input" debug="instance" />
       
        <p:processor name="oxf:xml-converter">
                <p:input name="config">
                        <config>
                                <content-type>application/xml</content-type>
                                <encoding>utf-8</encoding>
                                <version>1.0</version>
                        </config>
                </p:input>
                <p:input name="data" href="#instance"/>
                <p:output name="data" id="xml-document"/>
        </p:processor>
       
        <p:processor name="oxf:http-serializer">
                <p:input name="data" href="#xml-document"/>
                <p:input name="config">
                        <config>
                                <status-code>200</status-code>
                                <header>
                                        <name>Content-Disposition</name>
                                        <value>attachment;filename=save.xml</value>
                                </header>
                        </config>
                </p:input>
        </p:processor>

</p:config>

If you post an instance to a URL with that as the model (no view) it
will prompt you to save it as a file called "save.xml" instead of
displaying it in your browser. You can transform the config ahead of
time to give it a more meaningful name. (possibly adding a timestamp
to the name)

--
Daniel E. Renfer
http://kronkltd.net/


On 6/30/07, Marcus <[hidden email]> wrote:

>
>
> Hi,
> i tried to understand that text-file you send the link, but to be honest, i
> have no idea how to realize your hint.
> It would be great to find a way to provide the user the possibility to
> download the actual file as html or xml - perhaps through a XPL so that one
> can first use also an XSLT to tranform the data!
> That would be a great thing to have, while at the moment, when i try to send
> to user the xml it is shown in the browser, but not available to download
> :-((
>
> A sample XPL would be very helpful!!!
> Regards, Marcus
>
>
>
> ----- Original Message -----
> From: Daniel E. Renfer
> To: [hidden email]
> Sent: Saturday, June 30, 2007 10:46 PM
> Subject: Re: [ops-users] Saving data to local files and reusing later
>
> Markku,
>
> As a workaround, you could have your instance submitted to a pipeline that
> will simply echo it back out with the "Content-Disposition:  attachment"
> header. [1] That way, when your user hits the "save as file" button, they'll
> be presented with a download option. You can even suggest the filename it
> should be named as.
>
> [1]: http://www.ietf.org/rfc/rfc2183.txt
> --
> Daniel E. Renfer
> http://kronkltd.net/


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Saving data to local files and reusing later

Markku Laine
In reply to this post by Erik Bruchez
Hi Erik,


> That's right, "file:" is not implemented. One reason is that Orbeon Forms
> being implemented mainly server-side, reading and writing from and to files
> would happen on the server, and we haven't had many use cases for that. I am
> not sure if this is what you intend to do, but it would certainly not work
> like the Firefox implementation which, I assume, writes files on the client.
>
> Saving files on the client is not possible without, at best, going through
> security dialogs.

What I am trying to achieve, is to give a user an option to save a form to
a local file on the client computer and to load the form later from the
local file on the client computer. Basically, I am trying to implement the
same example by using Orbeon Forms' XForms Filter only.

Is this technically even possible? I know that normally it is not due to
security reasons. If it would, websites could read/write your local files
as they want, e.g. delete all your files or read sentitive data! But, is
there a plugin to Firefox to allow certain website to do this or a
workaround (even through dialog boxes) to implement this feature?


> If you just want to save temporary work, you could use the eXist database,
> which can be accessed through XForms submissions.

Yes, you are correct. But what I would like to do is to simulate
online/offline work. Use case: At offine, a user visits a website
containing a form, e.g. job application (online). At some point, the
computer gets disconnected from the network (offline). The user has
already filled in the form for 30 minutes and does not want to loose all
the data. In addition, the user does not have time to wait the network to
be fixed so he/she leaves from the office. By utilizing the work already
done, there has to be an option to save the data on the client machine
from where it can be loaded later. Therefore, saving temporary work to a
database is not on option.

Does my intensions now make any sense?


-Markku




--
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
Reply | Threaded
Open this post in threaded view
|

Re: eXist - Help me please! No time left!

Paul Saxelby
In reply to this post by Erik Bruchez
Hi Erik,

Firstly, many thanks to all that have replied.

Erik, I have adjusted the permissions on the resource & on the
physical directories.
I'm not getting an error message now, but I can't find where it's been stored.

I feel like a complete idiot here, but where does the embedded eXist put things?

If the action on the submission is
'/exist/rest//db/orbeon/questionnaire/questionnaires.xml', where is
the physical xml file?


Also, looking at creating a seperate xml file for each submission, the
documentation gives this example code...;




2.2.2. Create a Named File with the REST API
With the REST API, to create a "file" /db/myCollection/myFile.xml, you
PUT the XML data for you file to the URL /db/myCollection/myFile.xml.
You can do this with an XForms submission, directly from XForms, or by
calling the XForms submission processor, as in the example below:

<p:config>
<p:processor name="oxf:xforms-submission">
<p:input name="submission">
<xforms:submission method="put"
action="/exist/rest/db/myCollection/myFile.xml"/>
</p:input>
<p:input name="request">
<gaga/>
</p:input>
<p:output name="response" id="dummy"/>
</p:processor>
<p:processor name="oxf:null-serializer">
<p:input name="data" href="#dummy"/>
</p:processor>
</p:config>



The question is, where is this postioned in the view file, and how is
it linked to the submit button?


Many thanks,

Paul



On 30/06/07, Erik Bruchez <[hidden email]> wrote:

> Paul,
>
> You got some responses already, but I wanted to mention that I tried
> your view.xhtml and it saved into the embedded eXist just fine.
>
> As pointed out, you my just be hitting a problem of permissions.
>
> -Erik
>
> Paul Saxelby wrote:
> > Hi all,
> >
> > I did, until today, have another 9 days to get this form working.
> > I've now been told I have just 2...
> >
> > I'm in deep...  you know what.
> >
> > I gave up on the range control, used the select1 instead.
> > The form is complete (content wise), now all I have to do is get it
> > saving to the exist database.
> >
> > The tutorial shows this as being really easy - but guess what  :(
> >
> > When I use a path equivalent to the one in the tutorial for the
> > submission (but substituting my app name in the path I get an orbeon
> > error saying that the file could not be loaded.
> > Apparently eXist is bundled with Orbeon - is it set to go? How do you
> > get to the admin if not running linux?
> >
> > I downloaded the eXist .war file & put it in the webapps directory,
> > ran up the admin page, and loaded in an xml file containing an
> > un-filled form.
> > This shows up in the 'browse collections' page & I can view the xml file.
> >
> > I can not however get a submission to write anything to the database.
> > I have tried all sorts of things as the path for the submission.
> > Should the file be created by eXist if it's the first record to be saved?
> > How do I get it to add a record instead of overwriting the old one
> > (which the example seems to do)?
> >
> > I am one stop short of having this exercise done and I am completely
> > stumped & starting to panic.
> >
> > Please, please, please can anyone tell me where I am going wrong?
> >
> > You guys have been great so far & I really appreciate all of the help
> > that you have given me.
> >
> > I have attached a couple of screenshots of the exist admin & xml to
> > show the path to each, a quick little css file, and the xhtml form
> > file.
> >
> > Help me Obi-Wan Kenobi - You're my only hope....
> >
> > Regards,
> > Paul Saxelby
> >
> > ------------------------------------------------------------------------
> >
> >
> > ------------------------------------------------------------------------
> >
>
>
> --
> 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
>
>


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Saving data to local files and reusing later

Erik Bruchez
Administrator
In reply to this post by Markku Laine
Markku,

I understand better. I think that the option, proposed in another reply
in this thread, to allow the user to download the file, would be a
relatively easy way to achieve this. Then the user would have to upload
the file to resume the work.

-Erik

.::: Markku :::. wrote:

> Hi Erik,
>
>
>> That's right, "file:" is not implemented. One reason is that Orbeon
>> Forms being implemented mainly server-side, reading and writing from
>> and to files would happen on the server, and we haven't had many use
>> cases for that. I am not sure if this is what you intend to do, but it
>> would certainly not work like the Firefox implementation which, I
>> assume, writes files on the client.
>>
>> Saving files on the client is not possible without, at best, going
>> through security dialogs.
>
> What I am trying to achieve, is to give a user an option to save a form
> to a local file on the client computer and to load the form later from
> the local file on the client computer. Basically, I am trying to
> implement the same example by using Orbeon Forms' XForms Filter only.
>
> Is this technically even possible? I know that normally it is not due to
> security reasons. If it would, websites could read/write your local
> files as they want, e.g. delete all your files or read sentitive data!
> But, is there a plugin to Firefox to allow certain website to do this or
> a workaround (even through dialog boxes) to implement this feature?
>
>
>> If you just want to save temporary work, you could use the eXist
>> database, which can be accessed through XForms submissions.
>
> Yes, you are correct. But what I would like to do is to simulate
> online/offline work. Use case: At offine, a user visits a website
> containing a form, e.g. job application (online). At some point, the
> computer gets disconnected from the network (offline). The user has
> already filled in the form for 30 minutes and does not want to loose all
> the data. In addition, the user does not have time to wait the network
> to be fixed so he/she leaves from the office. By utilizing the work
> already done, there has to be an option to save the data on the client
> machine from where it can be loaded later. Therefore, saving temporary
> work to a database is not on option.
>
> Does my intensions now make any sense?
>
>
> -Markku
>
>

--
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
Reply | Threaded
Open this post in threaded view
|

Re: eXist - Help me please! No time left!

Erik Bruchez
Administrator
In reply to this post by Paul Saxelby
Paul Saxelby wrote:

> Hi Erik,
>
> Firstly, many thanks to all that have replied.
>
> Erik, I have adjusted the permissions on the resource & on the
> physical directories.
> I'm not getting an error message now, but I can't find where it's been
> stored.
>
> I feel like a complete idiot here, but where does the embedded eXist put
> things?
>
> If the action on the submission is
> '/exist/rest//db/orbeon/questionnaire/questionnaires.xml', where is
> the physical xml file?
There is no physical XML file, in the same way that there are no
physical columns or rows of data in a relational database. The XML data
stored into eXist is stored in database files which you will find by
default under WEB-INF/exist-data in your web application.

> Also, looking at creating a seperate xml file for each submission, the
> documentation gives this example code...;
>
>
>
>
> 2.2.2. Create a Named File with the REST API
> With the REST API, to create a "file" /db/myCollection/myFile.xml, you
> PUT the XML data for you file to the URL /db/myCollection/myFile.xml.
> You can do this with an XForms submission, directly from XForms, or by
> calling the XForms submission processor, as in the example below:
>
> <p:config>
> <p:processor name="oxf:xforms-submission">
> <p:input name="submission">
> <xforms:submission method="put"
> action="/exist/rest/db/myCollection/myFile.xml"/>
> </p:input>
> <p:input name="request">
> <gaga/>
> </p:input>
> <p:output name="response" id="dummy"/>
> </p:processor>
> <p:processor name="oxf:null-serializer">
> <p:input name="data" href="#dummy"/>
> </p:processor>
> </p:config>
>
>
>
> The question is, where is this postioned in the view file, and how is
> it linked to the submit button?
The example above uses a pipeline, which I don't think you need. You
already have an xforms:submission element in your view, which should do
just fine, and in fact creates a named file called questionnaires.xml.

What you may want to do is use attribute value templates (AVTs) to
configure your file name, e.g. in your submission:

<xforms:submission ...
   action="/exist/rest/db/myCollection/{XPath expression returning file
name}.xml"/>

-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
Reply | Threaded
Open this post in threaded view
|

Re: eXist - Help me please! No time left!

f_pace
Hi Paul,
Hope this helps a bit.
you can download Exist as a standalone product. If you do you get a
small utility called
the eXist Admin Client shell. This allows you to browse the collections
stored within the DB
When you start the utility simply point it to the instance running under
ops.
On my system I just change the URL from:

xmldb:exist://localhost:8080/exist/xmlrpc

to:
xmldb:exist://localhost:8080/ops/exist/xmlrpc

Franco

Quoting Erik Bruchez <[hidden email]>:

> Paul Saxelby wrote:
> > Hi Erik,
> >
> > Firstly, many thanks to all that have replied.
> >
> > Erik, I have adjusted the permissions on the resource & on the
> > physical directories.
> > I'm not getting an error message now, but I can't find where it's
> been
> > stored.
> >
> > I feel like a complete idiot here, but where does the embedded
> eXist put
> > things?
> >
> > If the action on the submission is
> > '/exist/rest//db/orbeon/questionnaire/questionnaires.xml', where
> is
> > the physical xml file?
>
> There is no physical XML file, in the same way that there are no
> physical columns or rows of data in a relational database. The XML
> data
> stored into eXist is stored in database files which you will find by
>
> default under WEB-INF/exist-data in your web application.
>
> > Also, looking at creating a seperate xml file for each submission,
> the
> > documentation gives this example code...;
> >
> >
> >
> >
> > 2.2.2. Create a Named File with the REST API
> > With the REST API, to create a "file" /db/myCollection/myFile.xml,
> you
> > PUT the XML data for you file to the URL
> /db/myCollection/myFile.xml.
> > You can do this with an XForms submission, directly from XForms, or
> by
> > calling the XForms submission processor, as in the example below:
> >
> > <p:config>
> > <p:processor name="oxf:xforms-submission">
> > <p:input name="submission">
> > <xforms:submission method="put"
> > action="/exist/rest/db/myCollection/myFile.xml"/>
> > </p:input>
> > <p:input name="request">
> > <gaga/>
> > </p:input>
> > <p:output name="response" id="dummy"/>
> > </p:processor>
> > <p:processor name="oxf:null-serializer">
> > <p:input name="data" href="#dummy"/>
> > </p:processor>
> > </p:config>
> >
> >
> >
> > The question is, where is this postioned in the view file, and how
> is
> > it linked to the submit button?
>
> The example above uses a pipeline, which I don't think you need. You
>
> already have an xforms:submission element in your view, which should
> do
> just fine, and in fact creates a named file called
> questionnaires.xml.
>
> What you may want to do is use attribute value templates (AVTs) to
> configure your file name, e.g. in your submission:
>
> <xforms:submission ...
>    action="/exist/rest/db/myCollection/{XPath expression returning
> file
> name}.xml"/>
>
> -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
Reply | Threaded
Open this post in threaded view
|

Re: Saving data to local files and reusing later

Markku Laine
In reply to this post by Erik Bruchez
Hey,


> I understand better. I think that the option, proposed in another reply in
> this thread, to allow the user to download the file, would be a relatively
> easy way to achieve this. Then the user would have to upload the file to
> resume the work.

Both options, suggested by Erik and Daniel, were very good but require a
client computer to be connected to the Internet, whereas using pure XForms
does not.

Anyway, I managed to write files on the client computer by using
ActiveXObject (IE only) and Firefox has its own ways to achieve this as
well. The solution is either pretty/usable nor browser independent but do
the job for my demo.

Thanks for all the ideas and your help!



--
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
Reply | Threaded
Open this post in threaded view
|

Re: eXist - Help me please! No time left!

Frank
In reply to this post by f_pace
Sorry Paul,
Totally misunderstood your current problem - Missed some of the previous
emails and thought you
simply couldn't find the submitted documents. Hope I haven't wasted your
time.

Regards,
Franco

[hidden email] wrote:

> Hi Paul,
> Hope this helps a bit.
> you can download Exist as a standalone product. If you do you get a
> small utility called
> the eXist Admin Client shell. This allows you to browse the collections
> stored within the DB
> When you start the utility simply point it to the instance running under
> ops.
> On my system I just change the URL from:
>
> xmldb:exist://localhost:8080/exist/xmlrpc
>
> to:
> xmldb:exist://localhost:8080/ops/exist/xmlrpc
>
> Franco
>
> Quoting Erik Bruchez <[hidden email]>:
>
>  
>> Paul Saxelby wrote:
>>    
>>> Hi Erik,
>>>
>>> Firstly, many thanks to all that have replied.
>>>
>>> Erik, I have adjusted the permissions on the resource & on the
>>> physical directories.
>>> I'm not getting an error message now, but I can't find where it's
>>>      
>> been
>>    
>>> stored.
>>>
>>> I feel like a complete idiot here, but where does the embedded
>>>      
>> eXist put
>>    
>>> things?
>>>
>>> If the action on the submission is
>>> '/exist/rest//db/orbeon/questionnaire/questionnaires.xml', where
>>>      
>> is
>>    
>>> the physical xml file?
>>>      
>> There is no physical XML file, in the same way that there are no
>> physical columns or rows of data in a relational database. The XML
>> data
>> stored into eXist is stored in database files which you will find by
>>
>> default under WEB-INF/exist-data in your web application.
>>
>>    
>>> Also, looking at creating a seperate xml file for each submission,
>>>      
>> the
>>    
>>> documentation gives this example code...;
>>>
>>>
>>>
>>>
>>> 2.2.2. Create a Named File with the REST API
>>> With the REST API, to create a "file" /db/myCollection/myFile.xml,
>>>      
>> you
>>    
>>> PUT the XML data for you file to the URL
>>>      
>> /db/myCollection/myFile.xml.
>>    
>>> You can do this with an XForms submission, directly from XForms, or
>>>      
>> by
>>    
>>> calling the XForms submission processor, as in the example below:
>>>
>>> <p:config>
>>> <p:processor name="oxf:xforms-submission">
>>> <p:input name="submission">
>>> <xforms:submission method="put"
>>> action="/exist/rest/db/myCollection/myFile.xml"/>
>>> </p:input>
>>> <p:input name="request">
>>> <gaga/>
>>> </p:input>
>>> <p:output name="response" id="dummy"/>
>>> </p:processor>
>>> <p:processor name="oxf:null-serializer">
>>> <p:input name="data" href="#dummy"/>
>>> </p:processor>
>>> </p:config>
>>>
>>>
>>>
>>> The question is, where is this postioned in the view file, and how
>>>      
>> is
>>    
>>> it linked to the submit button?
>>>      
>> The example above uses a pipeline, which I don't think you need. You
>>
>> already have an xforms:submission element in your view, which should
>> do
>> just fine, and in fact creates a named file called
>> questionnaires.xml.
>>
>> What you may want to do is use attribute value templates (AVTs) to
>> configure your file name, e.g. in your submission:
>>
>> <xforms:submission ...
>>    action="/exist/rest/db/myCollection/{XPath expression returning
>> file
>> name}.xml"/>
>>
>> -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
>  


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Saving data to local files and reusing later

Daniel E. Renfer
In reply to this post by Markku Laine
The difference between Orbeon and client side implementations such as Mozilla XForms and FormsPlayer is that Orbeon is server side. The actual instance isn't stored on the client at all, so unfortunately, if your connection goes down, there is no way to recreate or access that instance. (Erik, correct me if I'm wrong)

That means that if you want the ability to work in "Offline Mode" you would need to choose a client side implementation. sorry.

Actually, I think the javascript access to the value of form controls might continue to work in the absence of a server connection. (I haven't tested, Erik?) You might possibly be able to recreate an instance working off of the values bound to controls. It would be very fragile and require a lot of work, but if all your important data is bound to controls already and you really want to do it, you could probably make it work... It would be easier to just work client-side from the beginning though.

--
Daniel E. Renfer
http://kronkltd.net/

On 7/2/07, .::: Markku :::. <[hidden email]> wrote:
Hey,


> I understand better. I think that the option, proposed in another reply in
> this thread, to allow the user to download the file, would be a relatively
> easy way to achieve this. Then the user would have to upload the file to
> resume the work.

Both options, suggested by Erik and Daniel, were very good but require a
client computer to be connected to the Internet, whereas using pure XForms
does not.

Anyway, I managed to write files on the client computer by using
ActiveXObject (IE only) and Firefox has its own ways to achieve this as
well. The solution is either pretty/usable nor browser independent but do
the job for my demo.

Thanks for all the ideas and your help!



--
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
Reply | Threaded
Open this post in threaded view
|

Re: Saving data to local files and reusing later

Erik Bruchez
Administrator
Daniel E. Renfer wrote:
> The difference between Orbeon and client side implementations such as
> Mozilla XForms and FormsPlayer is that Orbeon is server side. The actual
> instance isn't stored on the client at all, so unfortunately, if your
> connection goes down, there is no way to recreate or access that
> instance. (Erik, correct me if I'm wrong)

That's right.

As a side note, if you choose client-side state handling, instances are
stored on the client, but they are encrypted so even in that case you
can't access them unless you have the password and run the decryption
algorithm.

> That means that if you want the ability to work in "Offline Mode" you
> would need to choose a client side implementation. sorry.
>
> Actually, I think the javascript access to the value of form controls
> might continue to work in the absence of a server connection. (I haven't
> tested, Erik?)

Yes I think that's the case.

-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
Reply | Threaded
Open this post in threaded view
|

Re: Saving data to local files and reusing later

Marcus-2
In reply to this post by Daniel E. Renfer
Hi,
i have an aditional Question to the XPL processors:

When i use Firefox, that 2 processors work very fine, but when i use IE, it
displays the xml in browser and not giving the oprotunity to save the file
directly :-( Of course i can save the displayed file with IE "File save
as..." but i was hoping to get a normal "Save option" without changing the
content of my browser - just like in Firefox :-)

Any additional lines i have to add, that the IE won't display the file, but
supports the download?
Thanks for that, Marcus


----- Original Message -----
From: "Daniel E. Renfer" <[hidden email]>
To: <[hidden email]>
Sent: Sunday, July 01, 2007 5:14 AM
Subject: Re: [ops-users] Saving data to local files and reusing later


> Sorry about not properly explaining the process. The link I sent was
> to the official spec. No one has ever claimed that RFCs are easy or
> fun to read. The end result is, to use it, you need to use the
> http-serializer to attach that header with your output.
>
> <p:config
> xmlns:oxf="http://www.orbeon.com/oxf/processors"
> xmlns:p="http://www.orbeon.com/oxf/pipeline">
>
> <p:param name="instance" type="input" debug="instance" />
>
> <p:processor name="oxf:xml-converter">
> <p:input name="config">
> <config>
> <content-type>application/xml</content-type>
> <encoding>utf-8</encoding>
> <version>1.0</version>
> </config>
> </p:input>
> <p:input name="data" href="#instance"/>
> <p:output name="data" id="xml-document"/>
> </p:processor>
>
> <p:processor name="oxf:http-serializer">
> <p:input name="data" href="#xml-document"/>
> <p:input name="config">
> <config>
> <status-code>200</status-code>
> <header>
> <name>Content-Disposition</name>
> <value>attachment;filename=save.xml</value>
> </header>
> </config>
> </p:input>
> </p:processor>
>
> </p:config>
>
> If you post an instance to a URL with that as the model (no view) it
> will prompt you to save it as a file called "save.xml" instead of
> displaying it in your browser. You can transform the config ahead of
> time to give it a more meaningful name. (possibly adding a timestamp
> to the name)
>
> --
> Daniel E. Renfer
> http://kronkltd.net/
>
>
> On 6/30/07, Marcus <[hidden email]> wrote:
>>
>>
>> Hi,
>> i tried to understand that text-file you send the link, but to be honest,
>> i
>> have no idea how to realize your hint.
>> It would be great to find a way to provide the user the possibility to
>> download the actual file as html or xml - perhaps through a XPL so that
>> one
>> can first use also an XSLT to tranform the data!
>> That would be a great thing to have, while at the moment, when i try to
>> send
>> to user the xml it is shown in the browser, but not available to download
>> :-((
>>
>> A sample XPL would be very helpful!!!
>> Regards, Marcus
>>
>>
>>
>> ----- Original Message -----
>> From: Daniel E. Renfer
>> To: [hidden email]
>> Sent: Saturday, June 30, 2007 10:46 PM
>> Subject: Re: [ops-users] Saving data to local files and reusing later
>>
>> Markku,
>>
>> As a workaround, you could have your instance submitted to a pipeline
>> that
>> will simply echo it back out with the "Content-Disposition:  attachment"
>> header. [1] That way, when your user hits the "save as file" button,
>> they'll
>> be presented with a download option. You can even suggest the filename it
>> should be named as.
>>
>> [1]: http://www.ietf.org/rfc/rfc2183.txt
>> --
>> Daniel E. Renfer
>> http://kronkltd.net/
>
>

--------------------------------------------------------------------------------


>
> --
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Saving data to local files and reusing later

Erik Bruchez
Administrator
Marcus wrote:

> Hi,
> i have an aditional Question to the XPL processors:
>
> When i use Firefox, that 2 processors work very fine, but when i use IE,
> it displays the xml in browser and not giving the oprotunity to save the
> file directly :-( Of course i can save the displayed file with IE "File
> save as..." but i was hoping to get a normal "Save option" without
> changing the content of my browser - just like in Firefox :-)
>
> Any additional lines i have to add, that the IE won't display the file,
> but supports the download?
Not sure what you can do. Content disposition as attachement should do
the trick but as we know IE is a bitch. Maybe try changing the extension
of the filename parameter to see if that changes something.

-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