All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.myfaces.custom.dojoextensions.resource.ComboBox.js Maven / Gradle / Ivy

Go to download

JSF components and utilities that can be used with any JSF implementation. This library is compatible with both JSF1.1 and JSF1.2; however for JSF1.2 users there is an alternative build of Tomahawk available that takes advantage of JSF1.2 features to offer some additional benefits.

There is a newer version: 1.1.14
Show newest version
dojo.provide("extensions.ComboBox");
dojo.require("dojo.widget.html.ComboBox");
dojo.require("dojo.widget.*");

dojo.lang.extend(dojo.widget.html.ComboBox, {
    original_startSearchFromInput: dojo.widget.html.ComboBox.prototype.startSearchFromInput,
    original_showResultList: dojo.widget.html.ComboBox.prototype.showResultList,
    original_hideResultList: dojo.widget.html.ComboBox.prototype.hideResultList,

    templatePath: dojo.uri.dojoUri("../dojoextensions.ResourceLoader/templates/HtmlComboBox.html"),

    showResultList: function(results) {
        this.hideThrobber();
        this.original_showResultList.call(this, results);
    },

    hideResultList: function() {
        this.hideThrobber();
        this.original_hideResultList.call(this);
    },

    startSearchFromInput: function() {
        if (this.textInputNode.value != "")
            this.showThrobber();
        this.original_startSearchFromInput.call(this);
    },

    showThrobber: function() {
        this.downArrowNode.style.backgroundPosition = '-18px center';
    },

    hideThrobber: function() {
        this.downArrowNode.style.backgroundPosition = '2px center';
    }
});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy