Package com.ocpsoft.pretty

Examples of com.ocpsoft.pretty.PrettyException


            // read value of the path parameter
            expression = injection.getExpression().getELExpression();
            value = elUtils.getValue(context, expression);
            if (value == null)
            {
               throw new PrettyException("PrettyFaces: Exception occurred while building URL for MappingId < "
                        + mapping.getId() + " >, Required value " + " < " + expression + " > was null");
            }

            // convert the value to a string using the correct converter
            Converter converter = context.getApplication().createConverter(value.getClass());
            if (converter != null)
            {
               String valueAsString = converter.getAsString(context, new NullComponent(), value);
               if (valueAsString == null)
               {
                  throw new PrettyException("PrettyFaces: The converter <" + converter.getClass().getName()
                        + "> returned null while converting the object <" + value.toString() + ">!");
               }
               parameterValues.add(valueAsString);
            }
            else
            {
               parameterValues.add(value.toString());
            }
           
         }

         result = parser.getMappedURL(parameterValues);
      }
      catch (ELException e)
      {
         throw new PrettyException("PrettyFaces: Exception occurred while building URL for MappingId < "
                  + mapping.getId() + " >, Error occurred while extracting values from backing bean" + " < "
                  + expression + ":" + value + " >", e);
      }

      return result;
View Full Code Here


         result = QueryString.build(queryParameterValues);
      }
      catch (ELException e)
      {
         throw new PrettyException("PrettyFaces: Exception occurred while building QueryString for MappingId < "
                  + mapping.getId() + " >, Error occurred while extracting values from backing bean" + " < "
                  + expression + ":" + value + " >", e);
      }

      return result;
View Full Code Here

            response.sendError(HttpServletResponse.SC_NOT_FOUND);
            context.responseComplete();
         }
         catch (IOException e1)
         {
            throw new PrettyException(e1);
         }
      }
   }
View Full Code Here

      String var = (String) urlBuffer.getAttributes().get("var");

      String mappingId = (String) component.getAttributes().get("mappingId");
      if (mappingId == null)
      {
         throw new PrettyException("Mapping id was null when attempting to build URL for component: "
                  + component.toString() + " <" + component.getClientId(context) + ">");
      }

      PrettyContext prettyContext = PrettyContext.getCurrentInstance(context);
      PrettyConfig prettyConfig = prettyContext.getConfig();
View Full Code Here

TOP

Related Classes of com.ocpsoft.pretty.PrettyException

Copyright © 2018 www.massapicom. 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.