source: [view]
if(this._started){return;}
console.log(this.id + " -> startup");
this.inherited(arguments);
if(!this.portlet){
throw Error(this.declaredClass + ": A PortletFeedSettings widget cannot exist without a Portlet.");
}
if(this.text.tagName == "SELECT"){
// Set the initial selected option.
dojo.forEach(this.text.options, dojo.hitch(this, function(opt, index){
dojo.attr(opt, "selected", index == this.selectedIndex);
}));
}
var url = this.portlet.attr("url");
if(url){
// If a SELECT node is used to choose a URL, ensure that the Portlet's URL
// is one of the options.
if(this.text.tagName == "SELECT"){
if(!this.urls && dojo.query("option[value='" + url + "']", this.text).length < 1){
dojo.place(dojo.create("option", {
value: url,
innerHTML: url,
selected: "true"
}), this.text, "first");
}
}else{
this.text.attr("value", url);
}
}else{
this.portlet.attr("url", this.get("feedPortletUrl"));
}