Package railo.runtime.exp

Examples of railo.runtime.exp.ApplicationException


     * @throws ApplicationException
     */
    public void setMonthnames(String listMonthNames) throws ApplicationException {
      String[] arr = ListUtil.listToStringArray(listMonthNames, ',');
      if(arr.length==12)
        throw new ApplicationException("value of attribute [MonthNames] must contain a string list with 12 values, now there are "+arr.length+" values");
      this.monthnames=arr;
    }
View Full Code Here


        else if("image".equals(type))    input.setType(TYPE_IMAGE);
        else if("reset".equals(type))    input.setType(TYPE_RESET);
        else if("submit".equals(type))    input.setType(TYPE_SUBMIT);
        else if("datefield".equals(type))  input.setType(TYPE_DATEFIELD);
       
        else throw new ApplicationException("attribute type has an invalid value ["+type+"]","valid values for attribute type are " +
            "[checkbox, password, text, radio, button, file, hidden, image, reset, submit, datefield]");

        attributes.setEL("type",type);
    }
View Full Code Here

       
        Array arr=ListUtil.listToArray(range,',');
       
        if(arr.size()==1) {
            double from=Caster.toDoubleValue(arr.get(1,null),Double.NaN);
            if(!Decision.isValid(from))throw new ApplicationException(errMessage,errDetail);
            input.setRangeMin(from);
            input.setRangeMax(Double.NaN);
        }
        else if(arr.size()==2) {
            String strFrom=arr.get(1,"").toString().trim();
            double from=Caster.toDoubleValue(strFrom,Double.NaN);
            if(!Decision.isValid(from) && strFrom.length()>0) {
                throw new ApplicationException(errMessage,errDetail);
            }
            input.setRangeMin(from);
           
            String strTo=arr.get(2,"").toString().trim();
            double to=Caster.toDoubleValue(strTo,Double.NaN);
            if(!Decision.isValid(to) && strTo.length()>0) {
                throw new ApplicationException(errMessage,errDetail);
            }
            input.setRangeMax(to);
           
        }
        else throw new ApplicationException(errMessage,errDetail);
    }
View Full Code Here

  }

  private void _doEndTag() throws PageException, IOException {
        // check attributes
      if(input.getValidate()==VALIDATE_REGULAR_EXPRESSION && input.getPattern()==null) {
            throw new ApplicationException("when validation type regular_expression is seleted, the pattern attribute is required");
        }

      Tag parent = getParent();
        while(parent!=null && !(parent instanceof Form)){
      parent=parent.getParent();
    }
        if(parent instanceof Form) {
        Form form = (Form)parent;
        form.setInput(input);
        if(input.getType()==TYPE_DATEFIELD && form.getFormat()!=Form.FORMAT_FLASH)
          throw new ApplicationException("type [datefield] is only allowed if form format is flash");
    }
    else {
        throw new ApplicationException("Tag must be inside a form tag");
    }
        draw();
    }
View Full Code Here

   * @param validateAt the validateAt to set
   * @throws ApplicationException
   */
  public void setValidateat(String validateAt) throws ApplicationException {
    this.validateAt = validateAt;
    throw new ApplicationException("attribute validateAt is not supportrd for tag input ");

  }
View Full Code Here

      if(!StringUtil.isEmpty(preview))vppb.setImage(pageContext,preview);
      params.add(vppb);
    }
    else {
      if(!StringUtil.isEmpty(preview))
        throw new ApplicationException("attribute [preview] is only allowed when attribute [video] is used");
    }
   
    if(params.size()==0)
      throw new ApplicationException("you have to define at least one video source");
   
   
   
   
   
View Full Code Here

    strAlign=strAlign.trim().toLowerCase();
    if("right".equals(strAlign)) this.align = "right";
    else if("center".equals(strAlign)) this.align = "center";
    else if("left".equals(strAlign)) this.align = "left";
    else
      throw new ApplicationException("invalid value for attribute align ["+strAlign+"], valid values are [left,center,right]");
  }
View Full Code Here

  /**
   * @param playlistSize the playlistSize to set
   */
  public void setPlaylistsize(double playlistSize) throws ApplicationException {
    if(playlistSize<=40) throw new ApplicationException("playlist size has to be a positive number, at least 41px");
    this.playlistSize = (int) playlistSize;
  }
View Full Code Here

    else if("bottom".equals(strPlaylist))   playlist=PLAYLIST_BOTTOM;
    else if("none".equals(strPlaylist))   playlist=PLAYLIST_NONE;
    else if(Decision.isBoolean(strPlaylist)) {
      playlist=Caster.toBooleanValue(strPlaylist)?PLAYLIST_BOTTOM:PLAYLIST_NONE;
    }
    else throw new ApplicationException("invalid playlist definition ["+strPlaylist+"], valid values are [right,bottom,none]");
  }
View Full Code Here

    else if("none".equals(overstretch)) overstretch="none";
    else if("proportion".equals(overstretch)) overstretch="true";
    else if(Decision.isBoolean(overstretch)) {
      overstretch=Caster.toString(Caster.toBooleanValue(overstretch));
    }
    else throw new ApplicationException("invalid overstretch definition ["+overstretch+"], valid values are [fit,none,true,false]");
   
    this.overstretch = overstretch;
  }
View Full Code Here

TOP

Related Classes of railo.runtime.exp.ApplicationException

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.