HTML-FormFu-ExtJS

 view release on metacpan or  search on metacpan

examples/html/select-html.html  view on Meta::CPAN

<option value="1">one</option>
<option value="2">two</option>
</optgroup>
<option value="3">non-optgroup</option>
<optgroup label="opt2">
<option value="4">four</option>
<option value="5">five</option>
</optgroup>
</select>
</div>
<div class="combobox label">
<label>a ComboBox with optgroups</label>
<span class="elements">
<select name="combo_select">
<option value=""></option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
<input name="combo_text" type="text" />
</span>
</div>

lib/HTML/FormFu/ExtJS/Element/Select.pm  view on Meta::CPAN

                    //multiselect.reset();
                    if (value) {
                        if (Ext.version = '3.0') {
                            multiselect.setValue(value);
                        }
                        else if (record = store.getById(value)) {
                            multiselect.setValue(record.data.text);
                        }
                    }";
            $load_exception_function = "
                    var combobox = Ext.getCmp('$super->{id}');
                    combobox.markInvalid(error || response.statusText);";
        }
        else {
            $load_function = "
                    var combobox = Ext.getCmp('$super->{id}');
                    var value = combobox.hiddenValue;
                    combobox.clearValue();
                    if (value) {
                        if (Ext.version = '3.0') {
                            combobox.setValue(value);
                        }
                        else if (record = store.getById(value)) {
                            combobox.setValue(record.data.text);
                        }
                    }";
            $load_exception_function = "
                    var combobox = Ext.getCmp('$super->{id}');
                    combobox.clearValue();
                    combobox.markInvalid(error || response.statusText);";
        }
        $super->{store} = \"new Ext.data.SimpleStore({
            fields:['value','text'],
            id:0,
            autoLoad:true,
            proxy:new Ext.data.HttpProxy({
                url:'$url',
                method:'GET',
                disableCaching:false
            }),



( run in 2.035 seconds using v1.01-cache-2.11-cpan-8dfa8b56332 )