|
Struts example source code file (DropdownContainer.js)
The Struts DropdownContainer.js source code/* Copyright (c) 2004-2006, The Dojo Foundation All Rights Reserved. Licensed under the Academic Free License version 2.1 or above OR the modified BSD license. For more information on Dojo licensing, see: http://dojotoolkit.org/community/licensing.shtml */ dojo.provide("dojo.widget.DropdownContainer"); dojo.require("dojo.widget.*"); dojo.require("dojo.widget.HtmlWidget"); dojo.require("dojo.widget.PopupContainer"); dojo.require("dojo.event.*"); dojo.require("dojo.html.layout"); dojo.require("dojo.html.display"); dojo.require("dojo.html.iframe"); dojo.require("dojo.html.util"); dojo.widget.defineWidget("dojo.widget.DropdownContainer", dojo.widget.HtmlWidget, {inputWidth:"7em", id:"", inputId:"", inputName:"", iconURL:dojo.uri.moduleUri("dojo.widget", "templates/images/combo_box_arrow.png"), copyClasses:false, iconAlt:"", containerToggle:"plain", containerToggleDuration:150, templateString:"<span style=\"white-space:nowrap\"> ", templateCssPath:"", isContainer:true, attachTemplateNodes:function () { dojo.widget.DropdownContainer.superclass.attachTemplateNodes.apply(this, arguments); this.popup = dojo.widget.createWidget("PopupContainer", {toggle:this.containerToggle, toggleDuration:this.containerToggleDuration}); this.containerNode = this.popup.domNode; }, fillInTemplate:function (args, frag) { this.domNode.appendChild(this.popup.domNode); if (this.id) { this.domNode.id = this.id; } if (this.inputId) { this.inputNode.id = this.inputId; } if (this.inputName) { this.inputNode.name = this.inputName; } this.inputNode.style.width = this.inputWidth; this.inputNode.disabled = this.disabled; if (this.copyClasses) { this.inputNode.style = ""; this.inputNode.className = this.getFragNodeRef(frag).className; } dojo.event.connect(this.inputNode, "onchange", this, "onInputChange"); }, onIconClick:function (evt) { if (this.disabled) { return; } if (!this.popup.isShowingNow) { this.popup.open(this.inputNode, this, this.buttonNode); } else { this.popup.close(); } }, hideContainer:function () { if (this.popup.isShowingNow) { this.popup.close(); } }, onInputChange:function () { }, enable:function () { this.inputNode.disabled = false; dojo.widget.DropdownContainer.superclass.enable.apply(this, arguments); }, disable:function () { this.inputNode.disabled = true; dojo.widget.DropdownContainer.superclass.disable.apply(this, arguments); }}); Other Struts examples (source code examples)Here is a short list of links related to this Struts DropdownContainer.js source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.