public class StripesUrlBuilder {

        public StripesUrlBuilder() {
        }

        public String buildUrl(HttpServletRequest request, Class<? extends
ActionBean> clazz, String event) {
                return buildUrl(request, clazz, event, new HashMap<String, 
String>(0));
        }
        
        public String buildUrl(HttpServletRequest request, Class<? extends
ActionBean> clazz, String event, Map<String, String> parameters) {
                String baseUrl = getBaseUrl(clazz);
                UrlBuilder builder = new UrlBuilder(request.getLocale(), 
baseUrl, false);
                builder.setEvent(event);
                for(String key : parameters.keySet())
                        builder.addParameter(key, parameters.get(key));
                return request.getContextPath() + builder.toString();
        }

        public String buildUrl(HttpServletRequest request, Class<? extends
ActionBean> clazz) {
                String baseUrl = getBaseUrl(clazz);
                return request.getContextPath() + baseUrl;
        }
        
        String getBaseUrl(Class<? extends ActionBean> clazz) {
                return 
StripesFilter.getConfiguration().getActionResolver().getUrlBinding(clazz);
        }

}

On Tue, Jan 12, 2010 at 6:02 PM, Jay Paulson <[email protected]> wrote:
> I've been looking at the Stripes API documentation and I can't quite figure
> out if this is even possible.  I have a need to create an <s:link> in our
> java code and then be out put in our jsp through a loop.
> Can this be done?  If so where would I start?
> Thanks,
> Jay
>
> --
> "Innovation is the enemy of the status quo - it puts people out of
> business."
> --John Piña Craven
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>



-- 
Richard Hauswald
Blog: http://tnfstacc.blogspot.com/
LinkedIn: http://www.linkedin.com/in/richardhauswald
Xing: http://www.xing.com/profile/Richard_Hauswald

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to