Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/Java/DATT/src/org/litesoft/datt/client/support/StoryScreenViewHelper.java

Diff revisions: vs.
  @@ -3,31 +3,23 @@
3 3 import org.litesoft.bo.views.*;
4 4 import org.litesoft.datt.client.boviews.*;
5 5
6 - public class StoryScreenViewHelper
7 - {
8 - public static boolean assertStoryURL( StoryFindable pStoryFindable, ObjectURL pStoryURL )
9 - {
10 - if ( pStoryURL == null )
11 - {
6 + public class StoryScreenViewHelper {
7 + public static boolean assertStoryURL( StoryFindable pStoryFindable, ObjectURL pStoryURL ) {
8 + if ( pStoryURL == null ) {
12 9 pStoryFindable.backToHome( "No Story Selected" );
13 10 return false;
14 11 }
15 12 return true;
16 13 }
17 14
18 - public static boolean requestRequiredStory( final StoryFindable pStoryFindable, ObjectURL pStoryURL, final Integer pRequestID )
19 - {
20 - if ( !assertStoryURL( pStoryFindable, pStoryURL ) )
21 - {
15 + public static boolean requestRequiredStory( final StoryFindable pStoryFindable, ObjectURL pStoryURL, final Integer pRequestID ) {
16 + if ( !assertStoryURL( pStoryFindable, pStoryURL ) ) {
22 17 return false;
23 18 }
24 - StoryViewDataProvider.getInstance().requestRow( pStoryURL, new FetchRowDataProviderCallBack<StoryView>()
25 - {
19 + StoryViewDataProvider.getInstance().requestRow( pStoryURL, new FetchRowDataProviderCallBack<StoryView>() {
26 20 @Override
27 - public void success( StoryView pRow )
28 - {
29 - if ( pRow != null )
30 - {
21 + public void success( StoryView pRow ) {
22 + if ( pRow != null ) {
31 23 pStoryFindable.foundStory( pRow, pRequestID );
32 24 return;
33 25 }
  @@ -35,32 +27,25 @@
35 27 }
36 28
37 29 @Override
38 - public void error( String pError )
39 - {
30 + public void error( String pError ) {
40 31 pStoryFindable.backToHome( pError );
41 32 }
42 33 } );
43 34 return true;
44 35 }
45 36
46 - public static void requestOptionalStory( final StoryFindable pStoryFindable, ObjectURL pStoryURL, final Integer pRequestID )
47 - {
48 - if ( pStoryURL != null )
49 - {
50 - StoryViewDataProvider.getInstance().requestRow( pStoryURL, new FetchRowDataProviderCallBack<StoryView>()
51 - {
37 + public static void requestOptionalStory( final StoryFindable pStoryFindable, ObjectURL pStoryURL, final Integer pRequestID ) {
38 + if ( pStoryURL != null ) {
39 + StoryViewDataProvider.getInstance().requestRow( pStoryURL, new FetchRowDataProviderCallBack<StoryView>() {
52 40 @Override
53 - public void success( StoryView pRow )
54 - {
55 - if ( pRow != null )
56 - {
41 + public void success( StoryView pRow ) {
42 + if ( pRow != null ) {
57 43 pStoryFindable.foundStory( pRow, pRequestID );
58 44 }
59 45 }
60 46
61 47 @Override
62 - public void error( String pError )
63 - {
48 + public void error( String pError ) {
64 49 pStoryFindable.getStatusMessageSinc().setErrorMessage( pError );
65 50 }
66 51 } );