On Wed, 2005-08-31 at 13:58 -0500, Joe Germuska wrote:
> You can't really intervene in the form population process on the
> Struts side right now (although arguably that's something which
> should be exposed for user customization better).
We already have a BaseProcessor class which extends
TilesRequestProcessor. I added the following code there and it
seems to work:
protected void processPopulate(HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse, ActionForm actionForm,
ActionMapping actionMapping) throws ServletException
{
super.processPopulate(httpServletRequest, httpServletResponse,
actionForm, actionMapping);
if (actionForm instanceof DynaActionForm)
{
DynaActionForm dynaActionForm = (DynaActionForm)actionForm;
for (Iterator<Map.Entry> iterator =
dynaActionForm.getMap().entrySet().iterator();
iterator.hasNext();)
{
Map.Entry entry = iterator.next();
if (entry.getValue() instanceof String)
dynaActionForm.set((String)entry.getKey(),
((String)entry.getValue()).trim());
}
}
}
Is there something I'm missing?
Thanks,
--Amos
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]