problem with xforms-reset Event

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

problem with xforms-reset Event

juan.sabastizagal
Hello
I am new with Orbeon , and I have a simple form and I need to implement a Reset button, and I am trying to use xforms-reset event, but my form is not responding to this.

When a "Reset" button is clicked I amd doing this:

ORBEON.xforms.Document.dispatchEvent( { targetId: 'fr-form-model', eventName: 'xforms-reset' } );


As Request Payload I have this:
<!DOCTYPE xxf:event-request [<!ENTITY nbsp "&#160;">]> <xxf:event-request xmlns:xxf="http://orbeon.org/oxf/xml/xforms"> <xxf:uuid>e981c1a92cbdd46afd2c3007b1215b93e92e6c61</xxf:uuid> <xxf:sequence>3</xxf:sequence> <xxf:action> <xxf:event name="xforms-reset" source-control-id="fr-form-model"></xxf:event> </xxf:action> </xxf:event-request>


On Orbeon Server I have this:

2018-05-17 18:17:23,786 INFO  lifecycle  - event: {"request": "4322", "session": "FEB33DAD83852A3F853731FCC3315D06", "source": "limiter", "message": "start: filter", "path": "/xforms-server", "method": "POST"}
2018-05-17 18:17:23,786 INFO  lifecycle  - event: {"request": "4322", "session": "FEB33DAD83852A3F853731FCC3315D06", "source": "limiter", "message": "start: chain", "path": "/xforms-server", "method": "POST", "wait": "0"}
2018-05-17 18:17:23,786 WARN  auth  - not setting credentials headers because credentials are not found
2018-05-17 18:17:23,786 INFO  lifecycle  - event: {"request": "4322", "session": "FEB33DAD83852A3F853731FCC3315D06", "source": "service", "message": "start: handle"}
2018-05-17 18:17:23,786 INFO  ProcessorService  - /xforms-server - Received request
2018-05-17 18:17:23,789 INFO  lifecycle  - event: {"request": "4322", "session": "FEB33DAD83852A3F853731FCC3315D06", "source": "xforms", "message": "ajax with update events", "uuid": "e981c1a92cbdd46afd2c3007b1215b93e92e6c61"}
2018-05-17 18:17:23,789 INFO  lifecycle  - event: {"request": "4322", "session": "FEB33DAD83852A3F853731FCC3315D06", "source": "xforms", "message": "before document lock", "uuid": "e981c1a92cbdd46afd2c3007b1215b93e92e6c61"}
2018-05-17 18:17:23,789 INFO  lifecycle  - event: {"request": "4322", "session": "FEB33DAD83852A3F853731FCC3315D06", "source": "xforms", "message": "got document lock", "path": "/xforms-server", "method": "POST", "uuid": "e981c1a92cbdd46afd2c3007b1215b93e92e6c61", "wait": "0"}
2018-05-17 18:17:23,790 INFO  lifecycle  - event: {"request": "4322", "session": "FEB33DAD83852A3F853731FCC3315D06", "source": "xforms", "message": "after cacheOrStore", "document cache current size": "19", "document cache max size": "50"}
2018-05-17 18:17:23,790 INFO  ProcessorService  - /xforms-server - Timing: 4
2018-05-17 18:17:23,790 INFO  lifecycle  - event: {"request": "4322", "session": "FEB33DAD83852A3F853731FCC3315D06", "source": "service", "message": "end: handle", "time": "4 ms"}
2018-05-17 18:17:23,790 INFO  lifecycle  - event: {"request": "4322", "session": "FEB33DAD83852A3F853731FCC3315D06", "source": "limiter", "message": "end: chain", "time": "4 ms"}
2018-05-17 18:17:23,790 INFO  lifecycle  - event: {"request": "4322", "session": "FEB33DAD83852A3F853731FCC3315D06", "source": "limiter", "message": "end: filter", "time": "4 ms"}

And as Response I have

<xxf:event-response xmlns:xxf="http://orbeon.org/oxf/xml/xforms"><xxf:action><xxf:control-values/></xxf:action></xxf:event-response>

My questions:

1. I am using 2017.1.1.201709122316-PE version, I have verified that doReset() method is implemented with:

  private void doReset()
  {
    Dispatch.dispatchEvent(new XFormsRebuildEvent(this));
    Dispatch.dispatchEvent(new XFormsRecalculateEvent(this));
    Dispatch.dispatchEvent(new XFormsRefreshEvent(this));
  }

is there something that I am not doing? or doReset is not working?

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: problem with xforms-reset Event

Alessandro  Vernet
Administrator
Hi Juan,

I think that the `clear` button might just do what you're looking for
out-of-the-box. Did you get a change trying to add it to the buttons at the
bottom of the form, through the `oxf.fr.detail.buttons.*.*` property?

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: problem with xforms-reset Event

juan.sabastizagal
Hi Alex,
I have tried Clear button, but it cleans controls, that I looking for is a reset behavior (like reset() of HTML DOM Form ), I mean, when I clic the reset button, all controls values return back original loaded values if I previously changed them.
Is it possible?

Thanks a lot for your reply.


On Sat, May 19, 2018 at 5:44 PM, Alessandro Vernet <[hidden email]> wrote:
Hi Juan,

I think that the `clear` button might just do what you're looking for
out-of-the-box. Did you get a change trying to add it to the buttons at the
bottom of the form, through the `oxf.fr.detail.buttons.*.*` property?

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: problem with xforms-reset Event

Alessandro  Vernet
Administrator
Hi Juan,

Got it, and unfortunately we don't have this feature now, but I can see how
it could make sense in some cases. I created an RFE to track this (see link
below). Also note that with most browsers (except Firefox), you can get this
by reloading the page.

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

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: problem with xforms-reset Event

juan.sabastizagal
Hi Alex,
thank you so much, I will be aware for updates of this topic.

Regards

On Mon, May 21, 2018 at 4:00 PM, Alessandro Vernet <[hidden email]> wrote:
Hi Juan,

Got it, and unfortunately we don't have this feature now, but I can see how
it could make sense in some cases. I created an RFE to track this (see link
below). Also note that with most browsers (except Firefox), you can get this
by reloading the page.

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

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].