001 package railo.runtime.tag; 002 003 import java.io.IOException; 004 import java.util.Iterator; 005 import java.util.Map.Entry; 006 007 import javax.servlet.jsp.tagext.Tag; 008 009 import railo.commons.lang.HTMLEntities; 010 import railo.commons.lang.StringUtil; 011 import railo.runtime.exp.ApplicationException; 012 import railo.runtime.exp.ExpressionException; 013 import railo.runtime.exp.PageException; 014 import railo.runtime.ext.tag.TagImpl; 015 import railo.runtime.op.Caster; 016 import railo.runtime.op.Decision; 017 import railo.runtime.type.Array; 018 import railo.runtime.type.Collection.Key; 019 import railo.runtime.type.Struct; 020 import railo.runtime.type.StructImpl; 021 import railo.runtime.type.util.KeyConstants; 022 import railo.runtime.type.util.ListUtil; 023 024 // FUTURE tag input 025 //attr validateAt impl tag atrr 026 //attr validate add support for submitOnce 027 // Added support for generating Flash and XML controls (specified in the cfform tag). 028 // Added support for preventing multiple submissions. 029 // attr mask impl. logik dahinter umsetzen 030 031 /** 032 * 033 */ 034 public class Input extends TagImpl { 035 036 public static final short TYPE_SELECT=-1; 037 public static final short TYPE_TEXT=0; 038 public static final short TYPE_RADIO=1; 039 public static final short TYPE_CHECKBOX=2; 040 public static final short TYPE_PASSWORD=3; 041 public static final short TYPE_BUTTON=4; 042 public static final short TYPE_FILE=5; 043 public static final short TYPE_HIDDEN=6; 044 public static final short TYPE_IMAGE=7; 045 public static final short TYPE_RESET=8; 046 public static final short TYPE_SUBMIT=9; 047 public static final short TYPE_DATEFIELD=10; 048 049 public static final short VALIDATE_DATE=4; 050 public static final short VALIDATE_EURODATE=5; 051 public static final short VALIDATE_TIME=6; 052 public static final short VALIDATE_FLOAT=7; 053 public static final short VALIDATE_INTEGER=8; 054 public static final short VALIDATE_TELEPHONE=9; 055 public static final short VALIDATE_ZIPCODE=10; 056 public static final short VALIDATE_CREDITCARD=11; 057 public static final short VALIDATE_SOCIAL_SECURITY_NUMBER=12; 058 public static final short VALIDATE_REGULAR_EXPRESSION=13; 059 public static final short VALIDATE_NONE=14; 060 061 public static final short VALIDATE_USDATE=15; 062 public static final short VALIDATE_RANGE=16; 063 public static final short VALIDATE_BOOLEAN=17; 064 public static final short VALIDATE_EMAIL=18; 065 public static final short VALIDATE_URL=19; 066 public static final short VALIDATE_UUID=20; 067 public static final short VALIDATE_GUID=21; 068 public static final short VALIDATE_MAXLENGTH=22; 069 public static final short VALIDATE_NOBLANKS=23; 070 // TODO SubmitOnce 071 072 /** 073 * @param validate The validate to set. 074 * @throws ApplicationException 075 */ 076 public void setValidate(String validate) throws ApplicationException { 077 validate=validate.toLowerCase().trim(); 078 if(validate.equals("creditcard")) input.setValidate(VALIDATE_CREDITCARD); 079 else if(validate.equals("date")) input.setValidate(VALIDATE_DATE); 080 else if(validate.equals("usdate")) input.setValidate(VALIDATE_USDATE); 081 else if(validate.equals("eurodate")) input.setValidate(VALIDATE_EURODATE); 082 else if(validate.equals("float")) input.setValidate(VALIDATE_FLOAT); 083 else if(validate.equals("numeric")) input.setValidate(VALIDATE_FLOAT); 084 else if(validate.equals("integer")) input.setValidate(VALIDATE_INTEGER); 085 else if(validate.equals("int")) input.setValidate(VALIDATE_INTEGER); 086 else if(validate.equals("regular_expression")) input.setValidate(VALIDATE_REGULAR_EXPRESSION); 087 else if(validate.equals("regex")) input.setValidate(VALIDATE_REGULAR_EXPRESSION); 088 else if(validate.equals("social_security_number"))input.setValidate(VALIDATE_SOCIAL_SECURITY_NUMBER); 089 else if(validate.equals("ssn")) input.setValidate(VALIDATE_SOCIAL_SECURITY_NUMBER); 090 else if(validate.equals("telephone")) input.setValidate(VALIDATE_TELEPHONE); 091 else if(validate.equals("phone")) input.setValidate(VALIDATE_TELEPHONE); 092 else if(validate.equals("time")) input.setValidate(VALIDATE_TIME); 093 else if(validate.equals("zipcode")) input.setValidate(VALIDATE_ZIPCODE); 094 else if(validate.equals("zip")) input.setValidate(VALIDATE_ZIPCODE); 095 096 else if(validate.equals("range")) input.setValidate(VALIDATE_RANGE); 097 else if(validate.equals("boolean")) input.setValidate(VALIDATE_BOOLEAN); 098 else if(validate.equals("email")) input.setValidate(VALIDATE_EMAIL); 099 else if(validate.equals("url")) input.setValidate(VALIDATE_URL); 100 else if(validate.equals("uuid")) input.setValidate(VALIDATE_UUID); 101 else if(validate.equals("guid")) input.setValidate(VALIDATE_GUID); 102 else if(validate.equals("maxlength")) input.setValidate(VALIDATE_MAXLENGTH); 103 else if(validate.equals("noblanks")) input.setValidate(VALIDATE_NOBLANKS); 104 105 else throw new ApplicationException("attribute validate has an invalid value ["+validate+"]", 106 "valid values for attribute validate are [creditcard, date, eurodate, float, integer, regular, social_security_number, telephone, time, zipcode]"); 107 108 } 109 110 111 public static final String[] DAYNAMES_DEFAULT = new String[]{"S", "M", "T", "W", "Th", "F", "S"}; 112 public static final String[] MONTHNAMES_DEFAULT = new String[]{"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; 113 114 115 Struct attributes=new StructImpl(); 116 InputBean input=new InputBean(); 117 String passthrough; 118 119 String[] daynames=DAYNAMES_DEFAULT; 120 String[] monthnames=MONTHNAMES_DEFAULT; 121 122 boolean enabled=true; 123 boolean visible=true; 124 String label; 125 String tooltip; 126 String validateAt; 127 double firstDayOfWeek=0; 128 String mask; 129 130 131 @Override 132 public void release() { 133 super.release(); 134 input=new InputBean(); 135 attributes.clear(); 136 passthrough=null; 137 138 daynames=DAYNAMES_DEFAULT; 139 monthnames=MONTHNAMES_DEFAULT; 140 enabled=true; 141 visible=true; 142 label=null; 143 tooltip=null; 144 validateAt=null; 145 firstDayOfWeek=0; 146 mask=null; 147 } 148 149 /** 150 * @param cssclass The cssclass to set. 151 */ 152 public void setClass(String cssclass) { 153 attributes.setEL("class",cssclass); 154 } 155 /** 156 * @param cssstyle The cssstyle to set. 157 */ 158 public void setStyle(String cssstyle) { 159 attributes.setEL("style",cssstyle); 160 } 161 /** 162 * @param id The id to set. 163 */ 164 public void setId(String id) { 165 attributes.setEL("id",id); 166 } 167 168 public void setAccept(String accept) { 169 attributes.setEL("accept",accept); 170 } 171 172 public void setAccesskey(String accesskey) { 173 attributes.setEL("accesskey",accesskey); 174 } 175 176 public void setAlign(String align) { 177 attributes.setEL("align",align); 178 } 179 180 public void setAlt(String alt) { 181 attributes.setEL("alt",alt); 182 } 183 184 185 public void setAutocomplete(String autocomplete) { 186 attributes.setEL("autocomplete",autocomplete); 187 } 188 public void setAutofocus(String autofocus) { 189 attributes.setEL("autofocus",autofocus); 190 } 191 192 193 public void setBorder(String border) { 194 attributes.setEL("border",border); 195 } 196 197 public void setDatafld(String datafld) { 198 attributes.setEL("datafld",datafld); 199 } 200 201 public void setDatasrc(String datasrc) { 202 attributes.setEL("datasrc",datasrc); 203 } 204 205 public void setForm(String form) { 206 attributes.setEL("form",form); 207 } 208 public void setFormaction(String formAction) { 209 attributes.setEL("formaction",formAction); 210 } 211 public void setFormenctype(String formenctype) { 212 attributes.setEL("formenctype",formenctype); 213 } 214 public void setFormmethod(String formmethod) { 215 attributes.setEL("formmethod",formmethod); 216 } 217 public void setFormnovalidate(String formnovalidate) { 218 attributes.setEL("formnovalidate",formnovalidate); 219 } 220 public void setFormtarget(String formtarget) { 221 attributes.setEL("formtarget",formtarget); 222 } 223 224 225 public void setLang(String lang) { 226 attributes.setEL("lang",lang); 227 } 228 public void setList(String list) { 229 attributes.setEL("list",list); 230 } 231 232 public void setDir(String dir) { 233 //dir=dir.trim(); 234 //String lcDir=dir.toLowerCase(); 235 //if( "ltr".equals(lcDir) || "rtl".equals(lcDir)) 236 attributes.setEL("dir",dir); 237 238 //else throw new ApplicationException("attribute dir for tag input has an invalid value ["+dir+"], valid values are [ltr, rtl]"); 239 } 240 241 public void setDataformatas(String dataformatas) { 242 dataformatas=dataformatas.trim(); 243 //String lcDataformatas=dataformatas.toLowerCase(); 244 //if( "plaintext".equals(lcDataformatas) || "html".equals(lcDataformatas)) 245 attributes.setEL("dataformatas",dataformatas); 246 247 //else throw new ApplicationException("attribute dataformatas for tag input has an invalid value ["+dataformatas+"], valid values are [plaintext, html"); 248 } 249 250 public void setDisabled(String disabled) { 251 // alles ausser false ist true 252 //if(Caster.toBooleanValue(disabled,true)) 253 attributes.setEL("disabled",disabled); 254 } 255 256 public void setEnabled(String enabled) { 257 // alles ausser false ist true 258 //setDisabled(Caster.toString(!Caster.toBooleanValue(enabled,true))); 259 attributes.setEL("enabled",enabled); 260 } 261 262 263 264 265 public void setIsmap(String ismap) { 266 // alles ausser false ist true 267 //if(Caster.toBooleanValue(ismap,true)) attributes.setEL("ismap","ismap"); 268 attributes.setEL("ismap",ismap); 269 } 270 271 public void setReadonly(String readonly) { 272 // alles ausser false ist true 273 //if(Caster.toBooleanValue(readonly,true)) attributes.setEL("readonly","readonly"); 274 attributes.setEL("readonly",readonly); 275 } 276 277 public void setUsemap(String usemap) { 278 attributes.setEL("usemap",usemap); 279 } 280 281 /** 282 * @param onBlur The onBlur to set. 283 */ 284 public void setOnblur(String onBlur) { 285 attributes.setEL("onblur",onBlur); 286 } 287 /** 288 * @param onChange The onChange to set. 289 */ 290 public void setOnchange(String onChange) { 291 attributes.setEL("onchange",onChange); 292 } 293 /** 294 * @param onClick The onClick to set. 295 */ 296 public void setOnclick(String onClick) { 297 attributes.setEL("onclick",onClick); 298 } 299 /** 300 * @param onDblclick The onDblclick to set. 301 */ 302 public void setOndblclick(String onDblclick) { 303 attributes.setEL("ondblclick",onDblclick); 304 } 305 /** 306 * @param onFocus The onFocus to set. 307 */ 308 public void setOnfocus(String onFocus) { 309 attributes.setEL("onfocus",onFocus); 310 } 311 /** 312 * @param onKeyDown The onKeyDown to set. 313 */ 314 public void setOnkeydown(String onKeyDown) { 315 attributes.setEL("onkeydown",onKeyDown); 316 } 317 /** 318 * @param onKeyPress The onKeyPress to set. 319 */ 320 public void setOnkeypress(String onKeyPress) { 321 attributes.setEL("onkeypress",onKeyPress); 322 } 323 /** 324 * @param onKeyUp The onKeyUp to set. 325 */ 326 public void setOnkeyup(String onKeyUp) { 327 attributes.setEL("onKeyUp",onKeyUp); 328 } 329 /** 330 * @param onMouseDown The onMouseDown to set. 331 */ 332 public void setOnmousedown(String onMouseDown) { 333 attributes.setEL("onMouseDown",onMouseDown); 334 } 335 /** 336 * @param onMouseMove The onMouseMove to set. 337 */ 338 public void setOnmousemove(String onMouseMove) { 339 attributes.setEL("onMouseMove",onMouseMove); 340 } 341 /** 342 * @param onMouseUp The onMouseUp to set. 343 */ 344 public void setOnmouseup(String onMouseUp) { 345 attributes.setEL("onMouseUp",onMouseUp); 346 } 347 /** 348 * @param onMouseUp The onMouseUp to set. 349 */ 350 public void setOnselect(String onselect) { 351 attributes.setEL("onselect",onselect); 352 } 353 /** 354 * @param onMouseOut The onMouseOut to set. 355 */ 356 public void setOnmouseout(String onMouseOut) { 357 attributes.setEL("onMouseOut",onMouseOut); 358 } 359 /** 360 * @param onMouseOver The onKeyPress to set. 361 */ 362 public void setOnmouseover(String onMouseOver) { 363 attributes.setEL("onMouseOver",onMouseOver); 364 } 365 /** 366 * @param tabIndex The tabIndex to set. 367 */ 368 public void setTabindex(String tabIndex) { 369 attributes.setEL("tabindex",tabIndex); 370 } 371 /** 372 * @param title The title to set. 373 */ 374 public void setTitle(String title) { 375 attributes.setEL("title",title); 376 } 377 /** 378 * @param value The value to set. 379 */ 380 public void setValue(String value) { 381 attributes.setEL("value",value); 382 } 383 /** 384 * @param size The size to set. 385 */ 386 public void setSize(String size) { 387 attributes.setEL("size",size); 388 } 389 /** 390 * @param maxLength The maxLength to set. 391 */ 392 public void setMaxlength(double maxLength) { 393 input.setMaxLength((int)maxLength); 394 attributes.setEL("maxLength",Caster.toString(maxLength)); 395 } 396 /** 397 * @param checked The checked to set. 398 */ 399 public void setChecked(String checked) { 400 // alles ausser false ist true 401 if(Caster.toBooleanValue(checked,true)) attributes.setEL("checked","checked"); 402 } 403 /** 404 * @param daynames The daynames to set. 405 * @throws ApplicationException 406 */ 407 public void setDaynames(String listDaynames) throws ApplicationException { 408 String[] arr = ListUtil.listToStringArray(listDaynames, ','); 409 if(arr.length==7) 410 throw new ApplicationException("value of attribute [daynames] must contain a string list with 7 values, now there are "+arr.length+" values"); 411 this.daynames=arr; 412 } 413 /** 414 * @param daynames The daynames to set. 415 * @throws ApplicationException 416 */ 417 public void setFirstdayofweek(double firstDayOfWeek) throws ApplicationException { 418 if(firstDayOfWeek<0 || firstDayOfWeek>6) 419 throw new ApplicationException("value of attribute [firstDayOfWeek] must conatin a numeric value between 0-6"); 420 this.firstDayOfWeek=firstDayOfWeek; 421 } 422 /** 423 * @param daynames The daynames to set. 424 * @throws ApplicationException 425 */ 426 public void setMonthnames(String listMonthNames) throws ApplicationException { 427 String[] arr = ListUtil.listToStringArray(listMonthNames, ','); 428 if(arr.length==12) 429 throw new ApplicationException("value of attribute [MonthNames] must contain a string list with 12 values, now there are "+arr.length+" values"); 430 this.monthnames=arr; 431 } 432 433 /** 434 * @param daynames The daynames to set. 435 */ 436 public void setLabel(String label) { 437 this.label=label; 438 } 439 /** 440 * @param daynames The daynames to set. 441 */ 442 public void setMask(String mask) { 443 this.mask=mask; 444 } 445 446 public void setMax(String max) { 447 attributes.setEL("max",max); 448 } 449 public void setMin(String min) { 450 attributes.setEL("min",min); 451 } 452 public void setMultiple(String multiple) { 453 attributes.setEL("multiple",multiple); 454 } 455 public void setPlaceholder(String placeholder) { 456 attributes.setEL("placeholder",placeholder); 457 } 458 459 460 461 /** 462 * @param daynames The daynames to set. 463 */ 464 public void setNotab(String notab) { 465 attributes.setEL("notab",notab); 466 } 467 /** 468 * @param daynames The daynames to set. 469 */ 470 public void setHspace(String hspace) { 471 attributes.setEL("hspace",hspace); 472 } 473 474 /** 475 * @param type The type to set. 476 * @throws ApplicationException 477 */ 478 public void setType(String type) throws ApplicationException { 479 type=type.toLowerCase().trim(); 480 if( "checkbox".equals(type)) input.setType(TYPE_CHECKBOX); 481 else if("password".equals(type)) input.setType(TYPE_PASSWORD); 482 else if("text".equals(type)) input.setType(TYPE_TEXT); 483 else if("radio".equals(type)) input.setType(TYPE_RADIO); 484 else if("button".equals(type)) input.setType(TYPE_BUTTON); 485 else if("file".equals(type)) input.setType(TYPE_FILE); 486 else if("hidden".equals(type)) input.setType(TYPE_HIDDEN); 487 else if("image".equals(type)) input.setType(TYPE_IMAGE); 488 else if("reset".equals(type)) input.setType(TYPE_RESET); 489 else if("submit".equals(type)) input.setType(TYPE_SUBMIT); 490 else if("datefield".equals(type)) input.setType(TYPE_DATEFIELD); 491 492 else throw new ApplicationException("attribute type has an invalid value ["+type+"]","valid values for attribute type are " + 493 "[checkbox, password, text, radio, button, file, hidden, image, reset, submit, datefield]"); 494 495 attributes.setEL("type",type); 496 } 497 498 /** 499 * @param onError The onError to set. 500 */ 501 public void setOnerror(String onError) { 502 input.setOnError(onError); 503 } 504 /** 505 * @param onValidate The onValidate to set. 506 */ 507 public void setOnvalidate(String onValidate) { 508 input.setOnValidate(onValidate); 509 } 510 /** 511 * @param passthrough The passThrough to set. 512 * @throws PageException 513 */ 514 public void setPassthrough(Object passthrough) throws PageException { 515 if(passthrough instanceof Struct) { 516 Struct sct = (Struct) passthrough; 517 Iterator<Entry<Key, Object>> it = sct.entryIterator(); 518 Entry<Key, Object> e; 519 while(it.hasNext()) { 520 e=it.next(); 521 attributes.setEL(e.getKey(),e.getValue()); 522 } 523 } 524 else this.passthrough = Caster.toString(passthrough); 525 526 //input.setPassThrough(passThrough); 527 } 528 /** 529 * @param pattern The pattern to set. 530 * @throws ExpressionException 531 */ 532 public void setPattern(String pattern) throws ExpressionException { 533 input.setPattern(pattern); 534 } 535 /** 536 * @param range The range to set. 537 * @throws PageException 538 */ 539 public void setRange(String range) throws PageException { 540 String errMessage="attribute range has an invalid value ["+range+"], must be string list with numbers"; 541 String errDetail="Example: [number_from,number_to], [number_from], [number_from,], [,number_to]"; 542 543 Array arr=ListUtil.listToArray(range,','); 544 545 if(arr.size()==1) { 546 double from=Caster.toDoubleValue(arr.get(1,null),Double.NaN); 547 if(!Decision.isValid(from))throw new ApplicationException(errMessage,errDetail); 548 input.setRangeMin(from); 549 input.setRangeMax(Double.NaN); 550 } 551 else if(arr.size()==2) { 552 String strFrom=arr.get(1,"").toString().trim(); 553 double from=Caster.toDoubleValue(strFrom,Double.NaN); 554 if(!Decision.isValid(from) && strFrom.length()>0) { 555 throw new ApplicationException(errMessage,errDetail); 556 } 557 input.setRangeMin(from); 558 559 String strTo=arr.get(2,"").toString().trim(); 560 double to=Caster.toDoubleValue(strTo,Double.NaN); 561 if(!Decision.isValid(to) && strTo.length()>0) { 562 throw new ApplicationException(errMessage,errDetail); 563 } 564 input.setRangeMax(to); 565 566 } 567 else throw new ApplicationException(errMessage,errDetail); 568 } 569 /** 570 * @param required The required to set. 571 */ 572 public void setRequired(boolean required) { 573 input.setRequired(required); 574 } 575 /** 576 * @param name The name to set. 577 */ 578 public void setName(String name) { 579 attributes.setEL(KeyConstants._name,name); 580 input.setName(name); 581 } 582 /** 583 * @param message The message to set. 584 */ 585 public void setMessage(String message) { 586 if(!StringUtil.isEmpty(message))input.setMessage(message); 587 } 588 589 @Override 590 public int doEndTag() throws PageException { 591 try { 592 _doEndTag(); 593 } 594 catch (IOException e) { 595 throw Caster.toPageException(e); 596 } 597 return EVAL_PAGE; 598 } 599 600 private void _doEndTag() throws PageException, IOException { 601 // check attributes 602 if(input.getValidate()==VALIDATE_REGULAR_EXPRESSION && input.getPattern()==null) { 603 throw new ApplicationException("when validation type regular_expression is seleted, the pattern attribute is required"); 604 } 605 606 Tag parent = getParent(); 607 while(parent!=null && !(parent instanceof Form)){ 608 parent=parent.getParent(); 609 } 610 if(parent instanceof Form) { 611 Form form = (Form)parent; 612 form.setInput(input); 613 if(input.getType()==TYPE_DATEFIELD && form.getFormat()!=Form.FORMAT_FLASH) 614 throw new ApplicationException("type [datefield] is only allowed if form format is flash"); 615 } 616 else { 617 throw new ApplicationException("Tag must be inside a form tag"); 618 } 619 draw(); 620 } 621 622 void draw() throws IOException, PageException { 623 624 // start output 625 pageContext.forceWrite("<input"); 626 627 //railo.runtime.type.Collection.Key[] keys = attributes.keys(); 628 //railo.runtime.type.Collection.Key key; 629 Iterator<Entry<Key, Object>> it = attributes.entryIterator(); 630 Entry<Key, Object> e; 631 while(it.hasNext()) { 632 e = it.next(); 633 pageContext.forceWrite(" "); 634 pageContext.forceWrite(e.getKey().getString()); 635 pageContext.forceWrite("=\""); 636 pageContext.forceWrite(enc(Caster.toString(e.getValue()))); 637 pageContext.forceWrite("\""); 638 639 } 640 641 if(passthrough!=null) { 642 pageContext.forceWrite(" "); 643 pageContext.forceWrite(passthrough); 644 } 645 pageContext.forceWrite(">"); 646 } 647 648 /** 649 * html encode a string 650 * @param str string to encode 651 * @return encoded string 652 */ 653 String enc(String str) { 654 return HTMLEntities.escapeHTML(str,HTMLEntities.HTMLV20); 655 } 656 657 /** 658 * @return the monthnames 659 */ 660 public String[] getMonthnames() { 661 return monthnames; 662 } 663 664 /** 665 * @param monthnames the monthnames to set 666 */ 667 public void setMonthnames(String[] monthnames) { 668 this.monthnames = monthnames; 669 } 670 671 /** 672 * @param height the height to set 673 */ 674 public void setHeight(String height) { 675 attributes.setEL("height",height); 676 } 677 678 /** 679 * @param input the input to set 680 */ 681 public void setInput(InputBean input) { 682 this.input = input; 683 } 684 685 /** 686 * @param passthrough the passthrough to set 687 */ 688 public void setPassthrough(String passthrough) { 689 this.passthrough = passthrough; 690 } 691 692 /** 693 * @param tooltip the tooltip to set 694 * @throws ApplicationException 695 */ 696 public void setTooltip(String tooltip) { 697 this.tooltip = tooltip; 698 } 699 700 /** 701 * @param validateAt the validateAt to set 702 * @throws ApplicationException 703 */ 704 public void setValidateat(String validateAt) throws ApplicationException { 705 this.validateAt = validateAt; 706 throw new ApplicationException("attribute validateAt is not supportrd for tag input "); 707 708 } 709 710 /** 711 * @param visible the visible to set 712 * @throws ApplicationException 713 */ 714 public void setVisible(boolean visible) { 715 this.visible = visible; 716 } 717 718 /** 719 * @param width the width to set 720 * @throws ApplicationException 721 */ 722 public void setWidth(String width) { 723 attributes.setEL("width", width); 724 } 725 726 727 private ExpressionException notSupported(String label) { 728 return new ExpressionException("attribute ["+label+"] is not supported"); 729 } 730 731 732 733 734 public void setAutosuggest(String autosuggest) throws ExpressionException { 735 throw notSupported("autosuggest"); 736 //attributes.setEL("bind",bind); 737 } 738 public void setAutosuggestbinddelay(double autosuggestBindDelay) throws ExpressionException { 739 throw notSupported("autosuggestBindDelay"); 740 //attributes.setEL("bind",bind); 741 } 742 public void setAutosuggestminlength(double autosuggestMinLength) throws ExpressionException { 743 throw notSupported("autosuggestMinLength"); 744 //attributes.setEL("bind",bind); 745 } 746 747 public void setBind(String bind) throws ExpressionException { 748 throw notSupported("bind"); 749 //attributes.setEL("bind",bind); 750 } 751 752 public void setBindattribute(String bindAttribute) throws ExpressionException { 753 throw notSupported("bindAttribute"); 754 //attributes.setEL("bind",bind); 755 } 756 757 public void setBindonload(boolean bindOnLoad) throws ExpressionException { 758 throw notSupported("bindOnLoad"); 759 //attributes.setEL("bind",bind); 760 } 761 762 public void setDelimiter(String delimiter) throws ExpressionException { 763 throw notSupported("delimiter"); 764 //attributes.setEL("bind",bind); 765 } 766 public void setMaxresultsdisplayed(double maxResultsDisplayed) throws ExpressionException { 767 throw notSupported("maxResultsDisplayed"); 768 //attributes.setEL("bind",bind); 769 } 770 public void setOnbinderror(String onBindError) throws ExpressionException { 771 throw notSupported("onBindError"); 772 //attributes.setEL("bind",bind); 773 } 774 public void setShowautosuggestloadingicon(boolean showAutosuggestLoadingIcon) throws ExpressionException { 775 throw notSupported("showAutosuggestLoadingIcon"); 776 //attributes.setEL("bind",bind); 777 } 778 public void setSourcefortooltip(String sourceForTooltip) throws ExpressionException { 779 throw notSupported("sourceForTooltip"); 780 //attributes.setEL("bind",bind); 781 } 782 783 public void setSrc(String src) { 784 attributes.setEL("src",src); 785 } 786 public void setStep(String step) { 787 attributes.setEL("step",step); 788 } 789 public void setTypeahead(boolean typeahead) throws ExpressionException { 790 throw notSupported("typeahead"); 791 //attributes.setEL("src",src); 792 } 793 794 795 796 }