struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Ström (JIRA) <>
Subject [jira] Created: (WW-1990) Scheme attribute for form tag
Date Wed, 13 Jun 2007 08:27:26 GMT
Scheme attribute for form tag

                 Key: WW-1990
             Project: Struts 2
          Issue Type: Improvement
          Components: Views
    Affects Versions: 2.0.8
            Reporter: Johan Ström

There is currently no way to set the scheme for a <s:form > tag (like you can with for
example the s:url tag)

If a protected String scheme; is added and relevant setters (and tld changes) this can be
used (components/

269          String result = UrlHelper.buildUrl(actionMapper.getUriFromActionMapping(mapping),
request, response, null, scheme, true, true);

This would do the same as the old code but make it respect the schema parameter.

Currently I have to subclass the form tag and override the evaluateExtraParamsServletRequest,
copying all the code in it.. Also, since its a private function i have to subclass the populateComponentHtmlId
(which is protected) in order to be able to call my own evaluateExtraParamsServletRequest
at all.. Make it protected instead, or is there some reason to have it private?

Also, it would be nice to have the UrlHelper.buildUrl function "replaced" with something like

protected static String buildUrl(String action, HttpServletRequest request, HttpServletResponse
response, Map params, String scheme, boolean includeContext, boolean encodeResult)
    return UrlHelper.buildUrl(action, request, response, params, scheme, true, true);

and then, in evaluateExtraParamsServletRequest (and i guess the portlet variant too), call
this local buildUrl instead. This would allow me to override (or extend) the URL building
easier. I would want this to implement "restifying" my URLs (ie inject "restfull" parameters
for useage with the Restful2ActionMapper).

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message