Package com.ocpsoft.pretty.faces.url

Examples of com.ocpsoft.pretty.faces.url.URL.toURL()


                  REWRITE_MAPPING_ID_KEY + ":" + mapping.getId());

         URL url = context.getRequestURL();
         if (context.shouldProcessDynaview())
         {
            log.trace("Forwarding mapped request [" + url.toURL() + "] to dynaviewId [" + context.getDynaViewId() + "]");
            ((HttpInboundServletRewrite) event).forward(context.getDynaViewId());
         }
         else
         {
            String viewId = mapping.getViewId();
View Full Code Here


            ((HttpInboundServletRewrite) event).forward(context.getDynaViewId());
         }
         else
         {
            String viewId = mapping.getViewId();
            log.trace("Forwarding mapped request [" + url.toURL() + "] to resource [" + viewId + "]");
            if (url.decode().toURL().equals(viewId))
            {
               ((HttpServletRewrite) event).proceed();
            }
            else
View Full Code Here

               if (((firstParam.getValue() != null)) && (firstParam.getName() == null))
               {
                  if (firstParam.getValue() instanceof List<?>)
                  {
                     URL url = parser.getMappedURL(firstParam.getValue());
                     return url.toURL();
                  }
                  else if (firstParam.getValue().getClass().isArray())
                  {
                     // The Object[] cast here is required, otherwise Java treats
                     // getValue() as a single Object.
View Full Code Here

                  {
                     // The Object[] cast here is required, otherwise Java treats
                     // getValue() as a single Object.
                     List<Object> list = Arrays.asList((Object[]) firstParam.getValue());
                     URL url = parser.getMappedURL(list);
                     return url.toURL();
                  }
               }
            }
  
            for (UIParameter parameter : parameters)
View Full Code Here

         // build URL object for given path parameter set
         URL mappedURL = parser.getMappedURL(pathParams.toArray());
        
         // create encoded/unicode URL
         String url = encodeUrl ? mappedURL.encode().toURL() : mappedURL.toURL();
        
         // append query string
         result = url + QueryString.build(queryParams).toQueryString();
        
      }
View Full Code Here

            String viewId = context.getCurrentViewId();
            if (!response.isCommitted())
            {
               if (context.shouldProcessDynaview())
               {
                  log.trace("Forwarding mapped request [" + url.toURL() + "] to dynaviewId [" + viewId + "]");
                  req.getRequestDispatcher(context.getDynaViewId()).forward(req, response);
               }
               else
               {
                  List<PathParameter> params = context.getCurrentMapping().getPatternParser().parse(url);
View Full Code Here

                  QueryString query = QueryString.build(params);

                  ServletRequest wrappedRequest = new PrettyFacesWrappedRequest(request,
                              query.getParameterMap());

                  log.trace("Sending mapped request [" + url.toURL() + "] to resource [" + viewId + "]");
                  if (url.decode().toURL().matches(viewId))
                  {
                     chain.doFilter(wrappedRequest, response);
                  }
                  else
View Full Code Here

            {
               queryString = "";
            }

            // TODO test this now that query string is included in rewrites
            String originalUrl = url.toURL() + queryString;
            String newUrl = originalUrl;
            for (RewriteRule rule : getConfig().getGlobalRewriteRules())
            {
               if (rule.matches(newUrl))
               {
View Full Code Here

               if (((firstParam.getValue() != null)) && (firstParam.getName() == null))
               {
                  if (firstParam.getValue() instanceof List<?>)
                  {
                     URL url = parser.getMappedURL(firstParam.getValue());
                     return url.toURL();
                  }
                  else if (firstParam.getValue().getClass().isArray())
                  {
                     // The Object[] cast here is required, otherwise Java treats
                     // getValue() as a single Object.
View Full Code Here

                  {
                     // The Object[] cast here is required, otherwise Java treats
                     // getValue() as a single Object.
                     List<Object> list = Arrays.asList((Object[]) firstParam.getValue());
                     URL url = parser.getMappedURL(list);
                     return url.toURL();
                  }
               }
            }
  
            for (UIParameter parameter : parameters)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.