Skip to content

Instantly share code, notes, and snippets.

@ttdonovan
Created April 7, 2009 17:37
Show Gist options
  • Select an option

  • Save ttdonovan/91350 to your computer and use it in GitHub Desktop.

Select an option

Save ttdonovan/91350 to your computer and use it in GitHub Desktop.
// ==========================================================================
// CDWeb.ObjectSelectorController
// ==========================================================================
require('core');
/** @class
(Document Your View Here)
@extends SC.Object
@author AuthorName
@version 0.1
@static
*/
CDWeb.objectSelectorController = SC.Object.create(
/** @scope CDWeb.objectSelectorController */ {
dataViewGuidBinding: 'CDWeb.pageController*page.objectSelectorDataViewGuid',
/**
computed url properties
*/
requestUrl: function() {
var dataView = this.get('dataViewGuid'), url ;
if (!SC.none(dataView) && SC.typeOf(dataView) === SC.T_STRING) {
dataView = dataView.replace(':', '/') ;
url = CDWeb.dataViewUrl.fmt(dataView) ;
this.propertyDidChange('requestUrl') ;
return url ;
}
}.property('dataViewGuid').cacheable(),
requestParams: function() {
var params = {} ;
this.propertyDidChange('requestParams') ;
return params ;
}.property().cacheable()
}) ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment