opensubscriber
   Find in this group all groups
 
Unknown more information…

o : ops-users@objectweb.org 31 May 2006 • 12:37PM -0400

Re: [ops-users] elaborating on xforms-submit-error
by Adrian Baker

REPLY TO AUTHOR
 
REPLY TO GROUP




<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I finally got around to doing this, since we couldn't deploy to
production environments with the
org.orbeon.oxf.xforms.processor.XFormsServer logger set to debug (far
too verbose), but yet we were missing xforms-submit-error events which
were silently causing forms to behave badly.<br>
<br>
What I've done is split out some of the XFormsServer debug calls to two
other loggers:<br>
<br>
- org.orbeon.oxf.xforms.event.events.XFormsSubmitErrorEvent<br>
By default logs the *message only* of the exception causing an
xforms-submit-error at INFO level.  Setting to DEBUG will log the
entire stack trace of the exception.<br>
<br>
- org.orbeon.oxf.xforms.XFormsModelSubmission<br>
By default logs nothing. Setting this to DEBUG will debug invalid
instance documents.<br>
<br>
So this gives slightly finer control over logging & debugging
XForms. The default settings should be roughly suitable for a
production environment where you still want errors like a 404 (eg a
remote server is down etc) logged, but little more. If you want to
debug validation problems in a form the XFormsModelSubmission logger
can be used for this, without necessarily having to go to the level of
XFormsServer, which logs every instance document every time there's an
interaction (useful in it's on right, but makes it hard to pick stuff
out of the noise).<br>
<br>
The downside is is that by default you will get a INFO message every
time someone tries to submit a form with invalid data, but this comes
back to the general XForms issue of detecting whether
xforms-submit-error is caused by a remote server issue or a validation
issue.<br>
<br>
Adrian<br>
<br>
Alessandro Vernet wrote:
<blockquote
cite="mid4828ceec0603011629q42c45175k3cceae5fd317b74@mail..."
type="cite">
  <pre wrap="">Adrian,

I also think it is reasonable to have submission error logged by
default, that is: in "info" priority. And as you say, we could log
them with a separate logger, so one could disable those if needed.
Erik what is your take on this?

Alex

On 2/27/06, Adrian Baker <a class="moz-txt-link-rfc2396E" href="mailto:adrian.baker@orio..."><adrian.baker@orio...></a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap=""> Option [2] (enabling debugging for
org.orbeon.oxf.xforms.processor.XFormsServer) is certainly
helpful.

But it's pretty imprecise, because of the screeds of other debugging output
which results from having this class set to debug (eg dumping of all
instance documents). Sure this is all useful in it's own right, but it's a
bit heavyweight just to find out you've misspelt a URL in your submission
target. Certainly I couldn't turn this on by default in a production
environment, whereas I do really need submission errors logged as standard
in production.

How about logging submission errors to a more specific logger (eg
org.orbeon.oxf.xforms.event.events.XFormsSubmitErrorEvent)?
This could then be reasonably enabled full-time.

Personally I'd argue this logger be turned on by default because it's flat
out impossible to determine the cause of an xforms-submit-error any other
way. And there's nothing more frustrating - particularly for first time
XForms authors - than watching absolutely nothing happen when you click on a
'Save' button: no errors displayed, no errors logged.

Adrian

Erik Bruchez wrote:
Duane,

This is an excellent question.

From the XForms spec's point of view, if submission fails, an
xforms-submit-error event is thrown and that's it, which is not extremely
helpful. Some tips:

1. If you are using XML schema for instance validation and suspect that
validation may be failing because validation doesn't pass, try using an
online schema validator with your submitted XForms instance.

2. You can enable server-side logging for XForms with:

<category
name="org.orbeon.oxf.xforms.processor.XFormsServer">
   <priority value="debug"/>
</category>

in log4j.xml, the XForms instance that failed to be saved will be logged
with some annotations.

This can help a little bit, but I agree that this is not enough. We have an
RFE for a client-side XForms console, which would be the right place to
provide useful information about submission:

<a class="moz-txt-link-freetext" href="http://forge.objectweb.org/tracker/index.php?func=detail&aid=304142&group_id=168&atid=350210">http://forge.objectweb.org/tracker/index.php?func=detail&aid=304142&group_id=168&atid=350210</a>

This will be post-3.0 however.

-Erik

Duane Gran wrote:

Is there anyway to get a more elaborate error message for an xforms-
submit-error event?  I find that I spend a lot of time feeling in the  dark
for simple mistakes I make which prevent the form from saving.   Although I
capture the event successfully, I'm often at a loss about  the cause of the
error.

Duane


________________________________


--
You receive this message as a subscriber of the <a class="moz-txt-link-abbreviated" href="mailto:ops-users@obje...">ops-users@obje...</a>
mailing list.
To unsubscribe: <a class="moz-txt-link-freetext" href="mailto:ops-users-unsubscribe@obje...">mailto:ops-users-unsubscribe@obje...</a>
For general help: <a class="moz-txt-link-freetext" href="mailto:sympa@obje...?subject=help">mailto:sympa@obje...?subject=help</a>
ObjectWeb mailing lists service home page: <a class="moz-txt-link-freetext" href="http://www.objectweb.org/wws">http://www.objectweb.org/wws</a>




--
You receive this message as a subscriber of the <a class="moz-txt-link-abbreviated" href="mailto:ops-users@obje...">ops-users@obje...</a>
mailing list.
To unsubscribe: <a class="moz-txt-link-freetext" href="mailto:ops-users-unsubscribe@obje...">mailto:ops-users-unsubscribe@obje...</a>
For general help: <a class="moz-txt-link-freetext" href="mailto:sympa@obje...?subject=help">mailto:sympa@obje...?subject=help</a>
ObjectWeb mailing lists service home page: <a class="moz-txt-link-freetext" href="http://www.objectweb.org/wws">http://www.objectweb.org/wws</a>



    </pre>
  </blockquote>
  <pre wrap=""><!---->

--
Blog (XML, Web apps, Open Source):
<a class="moz-txt-link-freetext" href="http://www.orbeon.com/blog/">http://www.orbeon.com/blog/</a>

  </pre>
  <pre wrap="">
<hr size="4" width="90%">

--
You receive this message as a subscriber of the <a class="moz-txt-link-abbreviated" href="mailto:ops-users@obje...">ops-users@obje...</a> mailing list.
To unsubscribe: <a class="moz-txt-link-freetext" href="mailto:ops-users-unsubscribe@obje...">mailto:ops-users-unsubscribe@obje...</a>
For general help: <a class="moz-txt-link-freetext" href="mailto:sympa@obje...?subject=help">mailto:sympa@obje...?subject=help</a>
ObjectWeb mailing lists service home page: <a class="moz-txt-link-freetext" href="http://www.objectweb.org/wws">http://www.objectweb.org/wws</a>
  </pre>
</blockquote>
<br>
</body>
</html>

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.