Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java @ 229:924da6695800
Each service is now called with the name of the current locale to set the request object's locale manually in the HttpClient.
flys-client/trunk@1681 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 14 Apr 2011 07:53:01 +0000 |
parents | a4a68b4ee2a3 |
children | 137daff2c732 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java Tue Apr 12 13:48:11 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java Thu Apr 14 07:53:01 2011 +0000 @@ -233,10 +233,14 @@ String newTitle = MSG.getString(module); setTitle(newTitle); - final String serverUrl = Config.getInstance().getServerUrl(); + Config config = Config.getInstance(); + final String url = config.getServerUrl(); + final String locale = config.getLocale(); + final Data[] feedData = new Data[] { data[1] }; + artifactService.create( - serverUrl, module.toLowerCase(), + url, locale, module.toLowerCase(), new AsyncCallback<Artifact>() { public void onFailure(Throwable caught) { GWT.log("Could not create the new artifact."); @@ -246,7 +250,7 @@ public void onSuccess(Artifact artifact) { GWT.log("Successfully created a new artifact."); - forwardService.go(serverUrl, artifact, feedData, + forwardService.go(url, locale, artifact, feedData, new AsyncCallback<Artifact>() { public void onFailure(Throwable caught) { GWT.log("Could not feed the artifact."); @@ -372,9 +376,12 @@ */ public void onStepForward(StepForwardEvent event) { GWT.log("CollectionView - onStepForward()"); - String serverUrl = Config.getInstance().getServerUrl(); - forwardService.go(serverUrl, artifact, event.getData(), + Config config = Config.getInstance(); + String serverUrl = config.getServerUrl(); + String locale = config.getLocale(); + + forwardService.go(serverUrl, locale, artifact, event.getData(), new AsyncCallback<Artifact>() { public void onFailure(Throwable caught) { GWT.log("Could not feed the artifact."); @@ -397,9 +404,12 @@ */ public void onStepBack(StepBackEvent e) { final String target = e.getTarget(); - final String serverUrl = Config.getInstance().getServerUrl(); - advanceService.advance(serverUrl, artifact, target, + Config config = Config.getInstance(); + final String serverUrl = config.getServerUrl(); + final String locale = config.getLocale(); + + advanceService.advance(serverUrl, locale, artifact, target, new AsyncCallback<Artifact>() { public void onFailure(Throwable caught) { GWT.log("Could not go back to '" + target + "'");