23 $this->options=array();
26 public function addOption($element,$value=
"",$selected=
false){
30 $option=
new HtmlOption($this->identifier.
"-".count($this->options), $element,$value);
32 if($selected || $option->getValue()==$this->getProperty(
"value")){
35 $this->options[]=$option;
39 foreach ( $this->options as $option ) {
40 if (strcasecmp($option->getValue(),$value)===0) {
41 $option->setProperty(
"selected",
"");
52 $this->content=array();
53 if(isset($this->
default)){
57 foreach ($this->options as $option){
58 $this->content[]=$option;
60 return parent::compile($js, $view);
64 if(JArray::isAssociative($array)){
65 foreach ($array as $k=>$v){
69 foreach ($array as $v){
82 $this->_bsComponent=$js->
bootstrap()->generic(
"#".$this->identifier);
88 return $this->
on(
"change", $jsCode);
92 return $this->
on(
"keypress", $jsCode);
bootstrap(Bootstrap $bootstrap=NULL)
getter or setter of the Twitter Bootstrap variable
run(JsUtils $js)
SimpleExtComponent\Ajax\common\html\BaseHtmlrun()\Ajax\common\html\BaseHtmlrun()
addOption($element, $value="", $selected=false)
compile(JsUtils $js=NULL, &$view=NULL)
__construct($identifier, $caption="", $default=NULL)
fromDatabaseObject($object, $function)
addEventsOnRun(JsUtils $js=NULL)
on($event, $jsCode, $stopPropagation=false, $preventDefault=false)
setProperty($name, $value)