pelletk
Apr 16th, 2006, 01:06 AM
I'm working on converting portions of a large Struts app to SWF.
There is one minor sticky bit I've run into.
The application uses tiles, and there is a common errors jsp tile for all page layouts. This page currently renders any errors and messages exposed by a Struts form.
Being that this application now has a mixture of SWF (I'm using no Struts forms for the SWF parts - all Spring binding and validation), I'd like to be able to render the Spring errors in a similar fashion on the same page. This way all of the surrounding tiles layout remains the same, and errors from whichever underlying binding/validation appear uniformly.
Is there a recommended way to make it possible to refer to the error messages for the form generically; in a way that the errors tile needn't know what the fbo name is to bind to in order to get the ${status.errorMessage} into scope for rendering?
If this were in a common tile for all page layouts, how could I avoid knowing the fbo by name for binding?
<spring:bind path="aParticularFormBackingObject">
<c:forEach items="${status.errorMessages}">
... render the errors list ...
</c:forEach>
</spring:bind>
There is one minor sticky bit I've run into.
The application uses tiles, and there is a common errors jsp tile for all page layouts. This page currently renders any errors and messages exposed by a Struts form.
Being that this application now has a mixture of SWF (I'm using no Struts forms for the SWF parts - all Spring binding and validation), I'd like to be able to render the Spring errors in a similar fashion on the same page. This way all of the surrounding tiles layout remains the same, and errors from whichever underlying binding/validation appear uniformly.
Is there a recommended way to make it possible to refer to the error messages for the form generically; in a way that the errors tile needn't know what the fbo name is to bind to in order to get the ${status.errorMessage} into scope for rendering?
If this were in a common tile for all page layouts, how could I avoid knowing the fbo by name for binding?
<spring:bind path="aParticularFormBackingObject">
<c:forEach items="${status.errorMessages}">
... render the errors list ...
</c:forEach>
</spring:bind>