Integrate Designer location with the editor ...

This commit is contained in:
Paulo Gustavo Veiga
2012-07-01 17:54:46 -03:00
parent 2757a5ddb4
commit 7752ac0dc1
6 changed files with 13 additions and 6 deletions

View File

@@ -30,12 +30,14 @@ import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import java.io.IOException;
import java.util.Locale;
@Controller
public class MindmapController {
@@ -134,6 +136,10 @@ public class MindmapController {
String result;
if (mindmap.hasPermissions(Utils.getUser(), CollaborationRole.EDITOR)) {
model.addAttribute("mindmap", mindmapBean);
// Configure default locale for the editor ...
final Locale locale = LocaleContextHolder.getLocale();
model.addAttribute("locale", locale.getLanguage());
result = "mindmapEditor";
} else {
result = "redirect:view";