[
http://www.stripesframework.org/jira/browse/STS-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12149#comment-12149
]
Samuel Santos commented on STS-780:
-----------------------------------
I've just tested the code against a XHTML app that uses SiteMesh and it works
great.
Thanks again Ben!
> ValidationErrorReportResolution error with XHTML
> ------------------------------------------------
>
> Key: STS-780
> URL: http://www.stripesframework.org/jira/browse/STS-780
> Project: Stripes
> Issue Type: Bug
> Components: Context Management
> Affects Versions: Release 1.5.4
> Reporter: Samuel Santos
> Assignee: Ben Gunter
> Fix For: Release 1.5.5, Release 1.6
>
>
> When you click on a link that causes a validation error, and don't have a
> sourcePage parameter in the query string, you'll get the nasty error returned
> on the ActionBeanContext#getSourcePageResolution method line 228.
> The problem is that ValidationErrorReportResolution writes directly to the
> HttpServletResponse writer.
> If you use a decoration framework like SiteMesh, you end up with malformed
> HTML (e.g. two <html> tag elements).
> That along may not be that severe as long as you don't use XHTML and its
> draconian error handling, which will immediately cause your site to break.
> Since mobile best practices dictate that mobile web applications should
> always use the content-type application/xhtml+xml, we need to implement our
> own ActionBeanContext and override the method getSourcePageResolution in each
> new mobile application we develop:
> @Override
> public Resolution getSourcePageResolution() {
> if (getSourcePage() == null) {
> throw new IllegalStateException("Here's how it is. Someone (quite
> possibly the Stripes Dispatcher) needed "
> + "to get the source page resolution. But no source page was
> supplied in the "
> + "request, and unless you override
> ActionBeanContext.getSourcePageResolution() "
> + "you're going to need that value. When you use a
> <stripes:form> tag a hidden " + "field called '"
> + StripesConstants.URL_KEY_SOURCE_PAGE + "' is included. "
> + "If you write your own forms or links that could generate
> validation errors, "
> + "you must include a value for this parameter. This can be
> done by calling "
> + "request.getServletPath().");
> } else {
> return new ForwardResolution(getSourcePage());
> }
> }
> This really needs to be fixed in order to fully support XHTML.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development