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
| public List<Recipe> search(RecipeCriteria recipeCriteria) { | |
| Criteria c = this.getSessionFactory().getCurrentSession().createCriteria(Recipe.class); | |
| // | |
| //Property restrictions | |
| if (recipeCriteria.getQuery() != null) { | |
| Disjunction d = Restrictions.disjunction(); | |
| d.add(Restrictions.like("name", recipeCriteria.getQuery().trim(), MatchMode.ANYWHERE)); |
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
| // Publish complete set of lists to all clients. | |
| Meteor.publish('lists', function () { | |
| return Lists.find(); | |
| }); | |
| // Publish all items for requested list_id. | |
| Meteor.publish('things', function (id) { | |
| return Things.find({list_id: id}); | |
| }); |
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
| // collection contains a list of things | |
| Things = new Meteor.Collection("things"); | |
| Lists = new Meteor.Collection("lists"); | |
| Things.allow({ | |
| insert: function() { | |
| return true; | |
| }, | |
| update: function() { | |
| return true; |
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
| // Subscribe to 'lists' collection on startup. | |
| // Select a list once data has arrived. | |
| var listsHandle = Meteor.subscribe('lists', function () { | |
| // | |
| //Check for our show guide token | |
| if (Session.get('list_id')){ | |
| var l = Lists.findOne(Session.get('list_id')); | |
| if (l && l.showGuide && l.showGuide == true){ | |
| Session.set('showGuide', true); |
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
| <head> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/> | |
| <title>Heric List</title> | |
| </head> | |
| <body> | |
| <div id="outer"> | |
| {{> list}} | |
| </div> | |
| </body> |
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
| Template.thing.rendered = function(template){ | |
| var element = this.find('.thingContainer'); | |
| var id = this.data._id; | |
| if (element) { | |
| Hammer(element).on("dragleft", dragLeft); | |
| Hammer(element).on("dragright", dragRight); | |
| } | |
| } |
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
| <!-- See module poms for more detail. --> | |
| <modules> | |
| <module>flex</module> | |
| <module>java-web</module> | |
| </modules> |
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
| <configuration> | |
| <parameters> | |
| <swf>${project.artifactId}-${youbrew.version}</swf> | |
| <title>You Brew your own software</title> | |
| </parameters> | |
| <outputDirectory>${basedir}/../java-web/src/main/webapp/</outputDirectory> | |
| <services>${basedir}/../java-web/src/main/webapp/WEB-INF/flex/services-config.xml</services> | |
| <htmlName>index</htmlName> | |
| <contextRoot>/youbrew</contextRoot> | |
| <locales> |
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
| <services> | |
| <default-channels> | |
| <channel ref="my-amf"/> | |
| </default-channels> | |
| </services> | |
| <channels> | |
| <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel"> | |
| <endpoint url="http://localhost:8080/youbrew/messagebroker/amf" |
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
| <servlet> | |
| <servlet-name>flex</servlet-name> | |
| <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> | |
| <load-on-startup>1</load-on-startup> | |
| </servlet> | |
| <servlet-mapping> | |
| <servlet-name>flex</servlet-name> | |
| <url-pattern>/messagebroker/*</url-pattern> | |
| </servlet-mapping> |