# HG changeset patch # User Jaroslav Tulach # Date 1368609279 -7200 # Node ID 022099dee4425f4e1b022457069137a8ce5fa22c # Parent 70defaefc082e3fdf445042408d18135b41319a0 Controlling the loadingIndicator via loading property diff -r 70defaefc082 -r 022099dee442 ko-archetype/src/main/resources/archetype-resources/src/main/java/TwitterClient.java --- a/ko-archetype/src/main/resources/archetype-resources/src/main/java/TwitterClient.java Wed May 15 11:01:17 2013 +0200 +++ b/ko-archetype/src/main/resources/archetype-resources/src/main/java/TwitterClient.java Wed May 15 11:14:39 2013 +0200 @@ -15,6 +15,7 @@ @Property(name="activeTweetersName", type=String.class), @Property(name="activeTweeters", type=String.class, array = true), @Property(name="userNameToAdd", type=String.class), + @Property(name="loading", type=boolean.class), @Property(name="currentTweets", type=Tweet.class, array = true) }) public class TwitterClient { @@ -65,6 +66,7 @@ static void queryTweets(TwitterModel page, TwitterQuery q) { page.getCurrentTweets().clear(); page.getCurrentTweets().addAll(q.getResults()); + page.setLoading(false); } @OnPropertyChange("activeTweetersName") @@ -85,6 +87,7 @@ sb.append(p); sep = " OR "; } + model.setLoading(true); model.queryTweets("http://search.twitter.com", sb.toString()); } diff -r 70defaefc082 -r 022099dee442 ko-archetype/src/main/resources/archetype-resources/src/main/resources/index.html --- a/ko-archetype/src/main/resources/archetype-resources/src/main/resources/index.html Wed May 15 11:01:17 2013 +0200 +++ b/ko-archetype/src/main/resources/archetype-resources/src/main/resources/index.html Wed May 15 11:14:39 2013 +0200 @@ -65,7 +65,7 @@
-
Loading...
+
Loading...
diff -r 70defaefc082 -r 022099dee442 ko-archetype/src/main/resources/archetype-resources/src/main/resources/twitterExample.css --- a/ko-archetype/src/main/resources/archetype-resources/src/main/resources/twitterExample.css Wed May 15 11:01:17 2013 +0200 +++ b/ko-archetype/src/main/resources/archetype-resources/src/main/resources/twitterExample.css Wed May 15 11:14:39 2013 +0200 @@ -29,4 +29,4 @@ .configuration form input { width:40%; font-size: 1.3em; border:1px solid silver; background-color: White; padding: 0.1em; } .configuration form button { width: 20%; margin-left: 0.3em; height: 2em; } -.loadingIndicator { position: absolute; top: 0.1em; left: 0.1em; font: 0.8em Arial; background-color: #229; color: White; padding: 0.2em 0.5em 0.2em 0.5em; display: none; } +.loadingIndicator { position: absolute; top: 0.1em; left: 0.1em; font: 0.8em Arial; background-color: #229; color: White; padding: 0.2em 0.5em 0.2em 0.5em; }