"Save Locally" option

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

"Save Locally" option

Alexey Vasyukov
Hello folks.


I added in properties-local.xml this string
<property as="xs:string"  name="oxf.fr.detail.buttons.*.*" value="close save-locally save"/>

Now the button is here but after I press it nothing happens. I tried to debug it myself but failed. Logging information is below.

Could anybody help me? What should I do to make save-locally option working?


Best regards,
Alexey

================================
Logging information
================================

I have a lot of warnings in orbeon.log:
2010-12-05 20:14:44,229 WARN  XFormsServer  -  xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}


Debugging options set:
<property as="xs:NMTOKENS" name="oxf.xforms.logging.debug" value="document analysis model submission control event action server html"/>
<property as="xs:NMTOKENS" name="oxf.xforms.logging.error" value="submission-error-body"/>

Here is my orbeon.log. These strings appear in the log after I press "Save Locally" button.

========================
2010-12-05 20:06:46,833 INFO  ProcessorService  - /xforms-server - Received request
2010-12-05 20:06:46,878 DEBUG XFormsServer  - start handling external events
2010-12-05 20:06:46,879 DEBUG XFormsServer  -   executeExternalEvent - start handling external event {target id: "save-locally-button$xf-622", event name: "DOMFocusIn"}
2010-12-05 20:06:46,879 DEBUG XFormsServer  -     dispatchEvent - start dispatching {name: "DOMFocusIn", id: "save-locally-button$xf-622"}
2010-12-05 20:06:46,879 DEBUG XFormsServer  -       dispatchEvent - retargeting {name: "DOMFocusIn", original id: "save-locally-button$xf-622", new id: "save-locally-button$xf-622"}
2010-12-05 20:06:46,879 DEBUG XFormsServer  -       dispatchEvent - retargeting {name: "DOMFocusIn", original id: "save-locally-button$xf-622", new id: "save-locally-button"}
2010-12-05 20:06:46,879 DEBUG XFormsServer  -       dispatchEvent - start bubble handler
2010-12-05 20:06:46,883 DEBUG XFormsServer  -         evaluated model variables {count: "4"}
2010-12-05 20:06:46,884 DEBUG XFormsServer  -         interpreter - start executing {action name: "action"}
2010-12-05 20:06:46,884 DEBUG XFormsServer  -           interpreter - start executing {action name: "toggle"}
2010-12-05 20:06:46,884 DEBUG XFormsServer  -           interpreter - end executing {time (ms): "0", action name: "toggle"}
2010-12-05 20:06:46,885 DEBUG XFormsServer  -           interpreter - start executing {action name: "setvalue"}
2010-12-05 20:06:46,885 DEBUG XFormsServer  -             xforms:setvalue - setting instance value {value: "", changed: "false", instance: "fr-persistence-instance"}
2010-12-05 20:06:46,886 DEBUG XFormsServer  -           interpreter - end executing {time (ms): "1", action name: "setvalue"}
2010-12-05 20:06:46,886 DEBUG XFormsServer  -           interpreter - start executing {action name: "setvalue"}
2010-12-05 20:06:46,887 DEBUG XFormsServer  -             xforms:setvalue - setting instance value {value: "", changed: "false", instance: "fr-persistence-instance"}
2010-12-05 20:06:46,887 DEBUG XFormsServer  -           interpreter - end executing {time (ms): "1", action name: "setvalue"}
2010-12-05 20:06:46,887 DEBUG XFormsServer  -         interpreter - end executing {time (ms): "4", action name: "action"}
2010-12-05 20:06:46,887 DEBUG XFormsServer  -       dispatchEvent - end bubble handler {time (ms): "8"}
2010-12-05 20:06:46,887 DEBUG XFormsServer  -       dispatchEvent - start default action handler
2010-12-05 20:06:46,887 DEBUG XFormsServer  -       dispatchEvent - end default action handler {time (ms): "0"}
2010-12-05 20:06:46,887 DEBUG XFormsServer  -     dispatchEvent - end dispatching {time (ms): "8", name: "DOMFocusIn", id: "save-locally-button$xf-622"}
2010-12-05 20:06:46,887 DEBUG XFormsServer  -   executeExternalEvent - end handling external event {time (ms): "8"}
2010-12-05 20:06:46,887 DEBUG XFormsServer  -   executeExternalEvent - start handling external event {target id: "save-locally-button$xf-622", event name: "DOMActivate"}
2010-12-05 20:06:46,887 DEBUG XFormsServer  -     dispatchEvent - start dispatching {name: "DOMActivate", id: "save-locally-button$xf-622"}
2010-12-05 20:06:46,888 DEBUG XFormsServer  -       dispatchEvent - retargeting {name: "DOMActivate", original id: "save-locally-button$xf-622", new id: "save-locally-button$xf-622"}
2010-12-05 20:06:46,888 DEBUG XFormsServer  -       dispatchEvent - retargeting {name: "DOMActivate", original id: "save-locally-button$xf-622", new id: "save-locally-button"}
2010-12-05 20:06:46,888 DEBUG XFormsServer  -       dispatchEvent - start default action handler
2010-12-05 20:06:46,888 DEBUG XFormsServer  -       dispatchEvent - end default action handler {time (ms): "0"}
2010-12-05 20:06:46,888 DEBUG XFormsServer  -     dispatchEvent - end dispatching {time (ms): "1", name: "DOMActivate", id: "save-locally-button$xf-622"}
2010-12-05 20:06:46,888 DEBUG XFormsServer  -   executeExternalEvent - end handling external event {time (ms): "1"}
2010-12-05 20:06:46,888 DEBUG XFormsServer  - end handling external events {time (ms): "10"}
2010-12-05 20:06:46,888 DEBUG XFormsServer  - response - start handling regular Ajax response
2010-12-05 20:06:46,890 DEBUG XFormsServer  - response - end handling regular Ajax response {time (ms): "2"}
2010-12-05 20:06:46,899 INFO  ProcessorService  - /xforms-server - Timing: 65 - Cache hits for cache.main: 24, fault: 1, adds: 0, expirations: 0, success rate: 96%
========================


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

Re: "Save Locally" option

Alessandro  Vernet
Administrator
Hi Alexey,

This is now fixed. The fix will be in the next nightly builds, and for reference here are the commit and bug:

https://github.com/orbeon/orbeon-forms/commit/3af69f7a63f17a9020aef18709740ecba89f9f89
http://forge.ow2.org/tracker/index.php?func=detail&aid=315930&group_id=168&atid=350207

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: "Save Locally" option

Lyle Sidor
I've never been able to get save-locally to work.

It has failed to work on all the versions that I've used - 3.9.0 CE, 3.9.0 PE, and 3.9.1 PE.

The error can be easily reproduced by adding the following to a new form:
            <fr:buttons>
                <fr:save-locally-button/>
                <fr:save-button/>
                <fr:close-button/>
            </fr:buttons>

The button appears as it should. And when clicked, it adds a disk icon just like the save button does when clicked. But it does nothing else, such as present the file for download to the client browser. There are no errors in the Orbeon log file.

I have the following in my properties-local.xml file (although I guess this is only relevant if the save had worked and I was trying to load the saved data):
<property as="xs:boolean" name="oxf.fr.detail.new.accept-post.*.*"      value="true"/>

Lyle
Reply | Threaded
Open this post in threaded view
|

Re: "Save Locally" option

Lyle Sidor
My bad - I said there were no errors in the log file.
In fact, there are some warnings that are probably a clue to solving the problem.

2012-02-27 13:17:09,143 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2012-02-27 13:17:09,143 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
2012-02-27 13:17:09,410 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
2012-02-27 13:17:09,411 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
Reply | Threaded
Open this post in threaded view
|

Re: "Save Locally" option

Alessandro  Vernet
Administrator
In reply to this post by Lyle Sidor
Hi Lyle,

Instead of editing the form source, just set the
oxf.fr.detail.buttons.*.* property in your properties-local.xml, for
instance with:

<property as="xs:string"  name="oxf.fr.detail.buttons.*.*"
value="close clear print pdf save save-locally submit"/>

I just tried this now, and it is working fine here.

You can see the buttons you can use at:
http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties/configuration-properties-form-runner#TOC-Buttons-on-the-detail-page

And for more on overriding properties in your properties-local.xml, see:
http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties#TOC-Overriding-properties

Alex

On Mon, Feb 27, 2012 at 12:10 PM, lylesidor [via Orbeon Forms
(ops-users)] <[hidden email]> wrote:

> I've never been able to get save-locally to work.
>
> It has failed to work on all the versions that I've used - 3.9.0 CE, 3.9.0
> PE, and 3.9.1 PE.
>
> The error can be easily reproduced by adding the following to a new form:
>             <fr:buttons>
>                 <fr:save-locally-button/>
>                 <fr:save-button/>
>                 <fr:close-button/>
>             </fr:buttons>
>
> The button appears as it should. And when clicked, it adds a disk icon just
> like the save button does when clicked. But it does nothing else, such as
> present the file for download to the client browser. There are no errors in
> the Orbeon log file.
>
> I have the following in my properties-local.xml file (although I guess this
> is only relevant if the save had worked and I was trying to load the saved
> data):
> <property as="xs:boolean" name="oxf.fr.detail.new.accept-post.*.*"
>  value="true"/>
>
> Lyle
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://orbeon-forms-ops-users.24843.n4.nabble.com/Save-Locally-option-tp3073443p4425887.html
> To unsubscribe from "Save Locally" option, click here.
> NAML



--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: "Save Locally" option

Lyle Sidor
Hi Alex,

I would have set the property as you suggested, but I have additional custom buttons defined in my form, so I believe I have no choice but to set the standard buttons in the form as well. The example I had given was just to reproduce the problem.

Lyle
Reply | Threaded
Open this post in threaded view
|

Re: "Save Locally" option

Lyle Sidor
In reply to this post by Alessandro Vernet
Alex,

I tried your method, but it still failed to do anything. It didn't even add the disk icon.

I also tried turning on debugging by adding the following to tomcat/webapps/orbeon/WEB-INF/resources/config/properties-local.xml, but it didn't have any effect.

<property as="xs:NMTOKENS"
      name="oxf.xforms.logging.debug"
      value="document model submission submission-details control event action analysis server html"/>

The first time that I press the save locally button after pressing the save button the log file has these lines added:
  2012-02-28 12:25:09,722 INFO  ProcessorService  - /xforms-server - Received request
  2012-02-28 12:25:09,754 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-uuid"}
  2012-02-28 12:25:09,755 WARN  XFormsServer  - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"}
  2012-02-28 12:25:09,761 INFO  ProcessorService  - /xforms-server - Timing: 39 - Cache hits for cache.main: 24, fault: 1, adds: 0, expirations: 0, success rate: 96%

Each time thereafter that I press the save locally button, it produces the following in the log file:
  2012-02-28 12:25:46,495 INFO  ProcessorService  - /xforms-server - Received request
  2012-02-28 12:25:46,503 INFO  ProcessorService  - /xforms-server - Timing: 8 - Cache hits for cache.main: 24, fault: 1, adds: 0, expirations: 0, success rate: 96%

The problem seems to be caused by fr-uuid and fr-save-locally-file-name not existing.
Do you get these errors?
Reply | Threaded
Open this post in threaded view
|

Re: "Save Locally" option

Alessandro  Vernet
Administrator
Hi Lyle,

If you are not seeing the "Save locally" button in "new" pages by adding the property to your properties-local.xml, I suspect Orbeon Forms doesn't take your change to properties-local.xml into account. After you made that change, the file should contain something along the lines of what I have below.


<properties xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:oxf="http://www.orbeon.com/oxf/processors">
        <property as="xs:string"  name="oxf.fr.detail.buttons.*.*"
                value="close clear print pdf save save-locally submit"/>
</properties>

Now, testing this on the 3.9 release, I notice that this feature was apparently broken in the release: the button did show up, but didn't do what it was supposed to do. However things are working fine in nightly builds. So if you can, I would encourage you to get nightly. And if you are using Orbeon Forms PE, you might want to contact support to get a patch.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: "Save Locally" option

Erik Bruchez
Administrator
Good news: this feature is now fixed, both in our local 3.9.1 PE branch
and in the nightly builds.

For reference:

https://github.com/orbeon/orbeon-forms/issues/65

-Erik

On Thu, Mar 1, 2012 at 5:37 PM, Alessandro  Vernet <[hidden email]> wrote:

> Hi Lyle,
>
> If you are not seeing the "Save locally" button in "new" pages by adding the
> property to your properties-local.xml, I suspect Orbeon Forms doesn't take
> your change to properties-local.xml into account. After you made that
> change, the file should contain something along the lines of what I have
> below.
>
>
> <properties xmlns:xs="http://www.w3.org/2001/XMLSchema"
>            xmlns:oxf="http://www.orbeon.com/oxf/processors">
>        <property as="xs:string"  name="oxf.fr.detail.buttons.*.*"
>                value="close clear print pdf save save-locally submit"/>
> </properties>
>
> Now, testing this on the 3.9 release, I notice that this feature was
> apparently broken in the release: the button did show up, but didn't do what
> it was supposed to do. However things are working fine in nightly builds. So
> if you can, I would encourage you to get nightly. And if you are using
> Orbeon Forms PE, you might want to contact support to get a patch.
>
> Alex
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Save-Locally-option-tp3073443p4437150.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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
>


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