fix locale
This commit is contained in:
parent
5ad5f1b827
commit
1eb93f7ecc
@ -66,13 +66,13 @@ public class ModulesManager implements Serializable {
|
||||
public List<Map<String, Object>> search(final String runAsUser, final String ticket, final Map<String, String> whereParams) throws XmlRpcException
|
||||
{
|
||||
LOG.info("RPC Call: " + moduleName + ".search - user " + runAsUser);
|
||||
final List<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>();
|
||||
final XmlRpcClient rpcClient = rpcClient(moduleName);
|
||||
final List<Object> xmlRpcParamsList = new ArrayList<Object>();
|
||||
xmlRpcParamsList.add(runAsUser);
|
||||
xmlRpcParamsList.add(ticket);
|
||||
xmlRpcParamsList.add(whereParams);
|
||||
final Object[] rpcResult = (Object[]) rpcClient.execute(moduleName + ".search", xmlRpcParamsList);
|
||||
final List<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>();
|
||||
for (final Object obj : rpcResult) {
|
||||
if (obj instanceof Map) {
|
||||
resultList.add((Map<String, Object>) obj);
|
||||
|
@ -59,6 +59,6 @@ public class HSAdminUI extends UI {
|
||||
}
|
||||
|
||||
public void setGrantingTicket(String grantingTicket, String username) {
|
||||
layout.addComponent(new MainWindow(ticketService, grantingTicket, username));
|
||||
layout.addComponent(new MainWindow(getUI().getLocale(), ticketService, grantingTicket, username));
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package de.hsadmin.web;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
@ -36,11 +37,11 @@ public class MainWindow extends CustomComponent implements HSAdminSession {
|
||||
private ModulesManager modulesManager;
|
||||
private AbstractSplitPanel content;
|
||||
|
||||
public MainWindow(final TicketService ticketService, final String grantingTicket, final String username) {
|
||||
public MainWindow(final Locale locale, final TicketService ticketService, final String grantingTicket, final String username) {
|
||||
this.ticketService = ticketService;
|
||||
this.grantingTicket = grantingTicket;
|
||||
this.username = username;
|
||||
this.i18n = I18N.loc(getUI().getLocale());
|
||||
this.i18n = I18N.loc(locale);
|
||||
|
||||
setSizeFull();
|
||||
final Panel mainPanel = new Panel();
|
||||
|
Loading…
Reference in New Issue
Block a user