Commit 8e9df330 authored by michael.simon's avatar michael.simon
Browse files

implement own resource bundle

parent 43a1d0f8
package edu.kit.scc.webreg.res;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.ResourceBundle;
import javax.faces.context.FacesContext;
public class DbMessageBundle extends ResourceBundle {
public static final String BASE_NAME = "msg.messages";
private Map<String, String> messages;
public DbMessageBundle() {
Locale locale = FacesContext.getCurrentInstance().getViewRoot().getLocale();
ResourceBundle rb = ResourceBundle.getBundle(BASE_NAME, locale);
messages = new HashMap<String, String>();
messages.put("server_config", "Server Configuration");
protected Object handleGetObject(String key) {
Object o = null;
if (messages != null) {
o = messages.get(key);
if (o == null) {
o = parent.getObject(key);
return o;
public Enumeration<String> getKeys() {
return messages != null ? Collections.enumeration(messages.keySet()) : parent.getKeys();
<?xml version="1.0" encoding="UTF-8"?>
<PROCESS model-entity="JSFProcess"/>
......@@ -10,9 +10,8 @@
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment