This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * AppController.j | |
| * nibapptest | |
| * | |
| * Created by You on November 20, 2011. | |
| * Copyright 2011, Your Company All rights reserved. | |
| */ | |
| @import <Foundation/CPObject.j> | |
| @import <AppKit/CPOutlineView.j> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * AppController.j | |
| * nibapptest | |
| * | |
| * Created by You on November 20, 2011. | |
| * Copyright 2011, Your Company All rights reserved. | |
| */ | |
| @import <Foundation/CPObject.j> | |
| @import <AppKit/CPOutlineView.j> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| I have the following template: | |
| <script type="text/x-handlebars" data-template-name="header-template"> | |
| <ul id="menu"> | |
| {{#each KR.MenuItemController.content }} <li><a href="#">{{ menuName }}</a> | |
| {{#if hasSubItems}} | |
| <ul> | |
| {{#each subItems}} | |
| <li><a href="#" onclick='KR.MenuItemController.set("clickedItem", {{ menuAction}})'>{{ menuName }}</a></li> | |
| {{/each}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| For some reason I am unable to get the bindings to work as they are supposed to... | |
| index.html: | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
| "http://www.w3.org/TR/html4/strict.dtd"> | |
| <html lang="en"> | |
| <head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Handlebars.registerHelper('disqus', function(property) { | |
| var value = '<script type="text/javascript" src="http://joachimhs.disqus.com/combination_widget.js?num_items=5&hide_mods=0&color=blue&default_tab=people&excerpt_length=200"></script><a href="http://disqus.com/">Powered by Disqus</a>'; | |
| console.log(value); | |
| return new Handlebars.SafeString(value); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.eurekaj.manager.data; | |
| import org.vertx.java.core.Handler; | |
| import org.vertx.java.core.buffer.Buffer; | |
| import org.vertx.java.core.http.HttpServerRequest; | |
| public class HandleInstrumentationMenuRequest implements Handler<Buffer> { | |
| private HttpServerRequest req; | |
| public HandleInstrumentationMenuRequest(HttpServerRequest req) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Model: | |
| MyApp.Photo = DS.Model.extend({ | |
| primaryKey: 'id', | |
| id: DS.attr('string'), | |
| photoName: DS.attr('string'), | |
| photoDescription: DS.attr('string'), | |
| photoFullSizeURL: DS.attr('string'), | |
| photoThumbnailURL: DS.attr('string') | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Problem: The JSON is received from the server, but only the "id" property have a value. The GUI only displays the String "2 1", an the {{photoName}} is ignored. Manually calling MyApp.PhotoController.get('content').objectAt(0).get('photoName') returns "undefined", whereas MyApp.PhotoController.get('content').objectAt(0).get('id') returns the correct ID. | |
| Any Sugggestions ? | |
| //My Model: | |
| MyApp.Photo = DS.Model.extend({ | |
| id: DS.attr('number'), | |
| photoName: DS.attr('string'), | |
| photoDescription: DS.attr('string'), | |
| photoFullSizeURL: DS.attr('string'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| HS.router = Ember.Router.create({ | |
| rootElement: '#emberArea', | |
| start: Ember.ViewState.extend({ | |
| route: "/", | |
| setupControllers: function(manager) { | |
| if (window.console) console.log('setupControllers: /'); | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Controller: | |
| HS.BlogPostsListController = Em.ArrayController.create({ | |
| content: [], | |
| sortAscending: true, | |
| sortProperties: ['postDate'], | |
| ... | |
| }); | |
| Populated with: |
OlderNewer