From: Leif H. <le...@ub...> - 2008-10-09 19:23:46
|
Apologies in advance for what may be stupid questions... I have a few spots in my app where I'm using an AjaxSubmitButton within an AjaxModalContainer (possibly to be converted to AjaxModalDialog - thanks Chuck!), which up until now has worked fine. Now, however, I've been working on adding some validation to my objects, which, hopefully, will leave the modal container "open" if the validation fails, but can't quite figure out how to get this to work. For some reason, I was presuming I could use the "onSuccess" binding to only close the ibox if the validation succeeded. I've discovered, though, that I really have no idea how the onSuccess/onFailure bindings work. What defines "success" (or failure) for a Component action Ajax request? And what do I need to implement in my component action (or in my component/application) to cause a "failure" in the Ajax request? I was poking around in the Ajax examples, but couldn't find anything appropriate in AjaxExample. And I haven't been able to get AjaxExample2 to run yet (the exception I'm getting is "Exception caught: wo:str {null={value=$^title}} has no WOElement " for the curious). So...any chance someone could enlighten me a bit on how to properly use onSuccess/onFailure when performing component actions? Thanks, - Leif ---------- Leif Harrison Senior Engineer - Ubermind, Inc. le...@ub... |