Subversion Repositories eFlore/Applications.cel

Rev

Rev 1918 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1918 Rev 1958
Line 59... Line 59...
59
 
59
 
60
				@Override
60
				@Override
61
				public void onResponseReceived(Request request,
61
				public void onResponseReceived(Request request,
Line -... Line 62...
-
 
62
						Response response) {
62
						Response response) {
63
					
63
					
64
					try {
64
					JSONValue responseValue = JSONParser.parse(response.getText());
65
						JSONValue responseValue = JSONParser.parse(response.getText());
65
					JSONArray reponse;
66
						JSONArray reponse;
66
					String urlImage=null;
67
						String urlImage=null;
67
					String urlImageMax=null;
68
						String urlImageMax=null;
68
 
69
	
69
					if ((reponse = responseValue.isArray()) != null) {
70
						if ((reponse = responseValue.isArray()) != null) {
70
						// Url Image
71
							// Url Image
71
						urlImage= ((JSONString)reponse.get(0)).stringValue();
72
							urlImage= ((JSONString)reponse.get(0)).stringValue();
72
						urlImageMax= ((JSONString)reponse.get(1)).stringValue();
73
							urlImageMax= ((JSONString)reponse.get(1)).stringValue();
73
					}
74
						}
74
					else {
75
						else {
-
 
76
							urlImage="";
-
 
77
							urlImageMax="";
-
 
78
						}
-
 
79
						
-
 
80
						r.rafraichir(new String[]{urlImage,urlImageMax},true);	
75
						urlImage="";
81
					} catch (Exception e) {
76
						urlImageMax="";
-
 
77
					}
-
 
78
					
82
						// TODO: handle exception
79
					r.rafraichir(new String[]{urlImage,urlImageMax},true);				
83
					}
Line 80... Line 84...
80
				}
84
				}
81
			}) ;
85
			}) ;