hi adrian,
Adrian Baker wrote:
Well the first problem with this approach is that if you have an error
in your getErrors submission, you end up with a stack overflow, because
it will generate another xforms-submit-error event, causing getErrors to
be called again, and so on.
The fix for this would be to introduce an ev:target attribute onto my
action :
<action ev:event="xforms-submit-error" ev:target="save">
<send submission="getErrors"/>
</action>
So that a further xforms-submit-error from the getErrors submission
won't end up in this block. But, it seems the target & observer
attributes are not used in Chiba, only the event attribute...
besides target and observer being unsupported by Chiba currently, keep
in mind that the target of xforms-submit-error is the model and not the
offending submission. please ask the w3c folks for the rationale behind
this, i didn't ever understand this.
regards,
uli.
Adrian
-----Original Message-----
From: Adrian Baker
Sent: Monday, 28 February 2005 5:33 p.m.
To: chiba-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
Subject: RE : Accessing xforms-submit-error
As a workaround I was planning to store the errors on the
'real' server in the session, and then have a handler on the
xforms-submit-error element which would retrieve this with a
'server-side' lookup. Something like :
<xforms:instance id="notifications" xmlns="">
<notifications>
<errors>
<error>(template error notification
message)</error>
</errors>
<messages>
<message>(template notification
message)</message>
</messages>
</notifications>
</xforms:instance>
...
<submission id="getErrors" replace="instance"
ref="instance('notifications')/errors" .../> ... <action
ev:event="xforms-submit-error">
<send submission="getErrors"/>
</action>
The notifications instance data is then bound to a nice
pretty repeating notifications area on the top of the form :)
All that remains is getting the server to provide the error
messages as the submit reply... I guess the proper portable
way to do this is XMLRPC? Could I run into any session issues
using this?
Adrian
(sorry for 'fake' reply - this message never made it to my
client, so I had to cut & paste from sourceforge).
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Chiba-developer mailing list
Chiba-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/chiba-developer
--
Ulrich Nicolas Lissé
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
|