[ http://mc4j.org/jira/browse/STS-267?page=comments#action_10532 ] 
            
Paul Barry commented on STS-267:
--------------------------------

Could we also have the DefaultActionBeanContextFactory inject spring beans into 
the ActionBeanContext?

public class SpringActionBeanContextFactory
        extends DefaultActionBeanContextFactory {

    public ActionBeanContext getContextInstance(HttpServletRequest request, 
HttpServletResponse response) throws ServletException {
        ActionBeanContext context = super.getContextInstance(request, response);
        
SpringHelper.injectBeans(context,request.getSession().getServletContext());
        return context;
    }

}


> SpringTypeConverterFactory
> --------------------------
>
>                 Key: STS-267
>                 URL: http://mc4j.org/jira/browse/STS-267
>             Project: Stripes
>          Issue Type: New Feature
>          Components: Validation
>    Affects Versions: Release 1.4
>            Reporter: Patrick Lightbody
>         Assigned To: Tim Fennell
>            Priority: Minor
>
> import net.sourceforge.stripes.validation.DefaultTypeConverterFactory;
> import net.sourceforge.stripes.validation.TypeConverter;
> import net.sourceforge.stripes.integration.spring.SpringHelper;
> import javax.servlet.ServletContext;
> import java.util.Locale;
> public class SpringTypeConverterFactory extends DefaultTypeConverterFactory {
>     public TypeConverter getInstance(Class<? extends TypeConverter> clazz, 
> Locale locale) throws Exception {
>         TypeConverter tc = super.getInstance(clazz, locale);
>         ServletContext sc = getConfiguration().getServletContext();
>         
>         SpringHelper.injectBeans(tc, sc);
>         
>         return tc;
>     }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://mc4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to