2
0
Fork 0

Switch to new meta model,fixed small bugs and made demo work pretty oke.

This commit is contained in:
Willem Cazander 2013-01-11 23:48:36 +01:00
parent afd821c360
commit b3635cf64d
46 changed files with 1055 additions and 688 deletions

View file

@ -57,27 +57,36 @@
<v:field id="id" backendName="ID" list="false" editReadOnly="true" create="false"/>
<v:field id="slug" backendName="SLUG"/>
<v:field id="title" backendName="TITLE"/>
<v:field id="i18n_key" backendName="I18N_KEY" vascEntryFieldType="BooleanField"/>
<!-- <v:field id="active" backendName="ACTIVE" vascEntryFieldType="BooleanField"/> -->
<v:field id="active" backendName="ACTIVE" vascEntryFieldType="BooleanField"/>
<v:field id="sitemap" backendName="SITEMAP" vascEntryFieldType="BooleanField"/>
<v:field id="roles" backendName="ROLES" list="false"/>
<v:link id="AdminVascPagePartLink" vascEntryId="AdminVascPagePart">
<v:linkParameter name="page_id" valueFieldId="id"/>
</v:link>
</v:entry>
<mm:metaModelBackend id="AdminVascPagePartBackend" dataContextProvider="${DemoManagerDataDC}" table="VASC_PAGE_PART" tableId="ID" />
<v:entry id="AdminVascPagePart" backendId="AdminVascPagePartBackend" vascGroupId="tech-admin">
<v:listOption id="part_type" backendName="PART_TYPE" vascEntryFieldType="ListField" optional="true">
<v:vascSelectItemModelEnum enumClass="net.forwardfire.vasc.demo.tech.web.pages.model.VascPagePartType" nullLabel="All"/>
</v:listOption>
<v:listOption id="active" backendName="ACTIVE" vascEntryFieldType="ListField" optional="true">
<v:vascSelectItemModelString nullLabel="All" data="TRUE,FALSE"/>
</v:listOption>
<v:field id="id" backendName="ID" list="false" editReadOnly="true" create="false"/>
<v:field id="page_id" backendName="PAGE_ID" vascEntryFieldType="ListField">
<v:vascSelectItemModel entryId="AdminVascPage" keyFieldId="id" displayFieldId="slug"/>
</v:field>
<v:field id="title" backendName="TITLE"/>
<v:field id="text" backendName="TEXT"/>
<v:field id="i18n_key" backendName="I18N_KEY" vascEntryFieldType="BooleanField"/>
<v:field id="active" backendName="ACTIVE" vascEntryFieldType="BooleanField"/>
<v:field id="sitemap" backendName="SITEMAP" vascEntryFieldType="BooleanField"/>
<v:field id="part_order" backendName="PART_ORDER" vascEntryFieldType="IntegerField"/>
<v:field id="part_type" backendName="PART_TYPE" vascEntryFieldType="ListField">
<v:vascSelectItemModelEnum enumClass="net.forwardfire.vasc.demo.tech.web.pages.model.VascPagePartType"/>
</v:field>
<v:field id="roles" backendName="ROLES" list="false"/>
</v:entry>

View file

@ -24,6 +24,7 @@ package net.forwardfire.vasc.demo.server.ui;
import java.awt.AWTException;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.MenuItem;
@ -35,7 +36,9 @@ import java.awt.event.ActionListener;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.EventObject;
import java.util.List;
import java.util.Properties;
import java.util.logging.Logger;
@ -74,7 +77,8 @@ public class ServerGuiApplication extends SingleFrameApplication {
mainView.setComponent(statusPanel);
mainView.getFrame().setMinimumSize(new Dimension(640,480));
mainView.getFrame().setMaximumSize(new Dimension(800,600));
mainView.getFrame().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
show(mainView);
startSystemTray();
@ -124,7 +128,11 @@ public class ServerGuiApplication extends SingleFrameApplication {
}
public void startupDone() {
statusPanel.startupDone();
try {
statusPanel.startupDone();
} finally {
getMainFrame().setCursor(Cursor.getDefaultCursor());
}
}
/**
@ -231,6 +239,39 @@ public class ServerGuiApplication extends SingleFrameApplication {
} catch (IOException e) {
}
}
// Invert focus painters
List<Object> keys = new ArrayList<Object>(UIManager.getLookAndFeelDefaults().keySet());
for (Object keyObj:keys) {
if ((keyObj instanceof String)==false) {
continue;
}
String key = (String)keyObj;
if (key.endsWith("[Focused].backgroundPainter")==false & key.endsWith("[Focused].iconPainter")==false) {
continue;
}
String preKey = key.substring(0,key.indexOf("["));
String postKey = "backgroundPainter";
if (key.contains("iconPainter")) {
postKey = "iconPainter";
}
logger.finer("Flipping painters of key: "+preKey);
Object focusPainter = UIManager.getLookAndFeelDefaults().get(preKey+"[Focused]."+postKey);
Object mouseOverPainter = UIManager.getLookAndFeelDefaults().get(preKey+"[MouseOver]."+postKey);
UIManager.getLookAndFeelDefaults().put(preKey+"[Focused]."+postKey,mouseOverPainter);
UIManager.getLookAndFeelDefaults().put(preKey+"[MouseOver]."+postKey,focusPainter);
if (key.contains("iconPainter")) {
Object focusPainterSelected = UIManager.getLookAndFeelDefaults().get(preKey+"[Focused+Selected]."+postKey);
Object mouseOverPainterSelected = UIManager.getLookAndFeelDefaults().get(preKey+"[MouseOver+Selected]."+postKey);
UIManager.getLookAndFeelDefaults().put(preKey+"[Focused+Selected]."+postKey,mouseOverPainterSelected);
UIManager.getLookAndFeelDefaults().put(preKey+"[MouseOver+Selected]."+postKey,focusPainterSelected);
}
}
return colorName;
}
}

View file

@ -23,6 +23,7 @@
package net.forwardfire.vasc.demo.server.ui.load;
import java.awt.BorderLayout;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Frame;
@ -194,17 +195,22 @@ public class JLoadDialog extends JDialog implements ActionListener {
if (currentStep <= 0) {
return;
}
currentStep--;
centerPanel.removeAll();
LoadStep step = steps.get(currentStep);
centerPanel.add(step.getPanel());
topLabel.setText(step.getStepTitle());
step.setupStep(model);
SwingUtilities.updateComponentTreeUI(centerPanel);
if (currentStep==0) {
prev.setEnabled(false);
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
try {
currentStep--;
centerPanel.removeAll();
LoadStep step = steps.get(currentStep);
centerPanel.add(step.getPanel());
topLabel.setText(step.getStepTitle());
step.setupStep(model);
SwingUtilities.updateComponentTreeUI(centerPanel);
if (currentStep==0) {
prev.setEnabled(false);
}
next.setText("Next");
} finally {
setCursor(Cursor.getDefaultCursor());
}
next.setText("Next");
}
public void gotoStepNext() {
@ -221,21 +227,26 @@ public class JLoadDialog extends JDialog implements ActionListener {
if (currentStep > steps.size()-1) {
return;
}
LoadStep step = steps.get(currentStep);
boolean result = step.performStep(model);
if (result==false) {
return;
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
try {
LoadStep step = steps.get(currentStep);
boolean result = step.performStep(model);
if (result==false) {
return;
}
currentStep++;
centerPanel.removeAll();
step = steps.get(currentStep);
centerPanel.add(step.getPanel());
topLabel.setText(step.getStepTitle());
step.setupStep(model);
SwingUtilities.updateComponentTreeUI(centerPanel);
if (currentStep==steps.size()-1) {
next.setText("Finish");
}
prev.setEnabled(true);
} finally {
setCursor(Cursor.getDefaultCursor());
}
currentStep++;
centerPanel.removeAll();
step = steps.get(currentStep);
centerPanel.add(step.getPanel());
topLabel.setText(step.getStepTitle());
step.setupStep(model);
SwingUtilities.updateComponentTreeUI(centerPanel);
if (currentStep==steps.size()-1) {
next.setText("Finish");
}
prev.setEnabled(true);
}
}

View file

@ -62,7 +62,7 @@ public class JLoadStepWriteFile extends JPanel implements LoadStep,ActionListene
}
public String getStepTitle() {
return "Select Tables";
return "Write xml to file.";
}
public JPanel getPanel() {

View file

@ -223,6 +223,19 @@ public class LoadVascXmlWriter {
if (f.getEditReadOnly()!=null) {
atts.addAttribute ("", "editReadOnly", "", "", ""+f.getEditReadOnly());
}
if (f.getDefaultValue()!=null) {
atts.addAttribute ("", "defaultValue", "", "", ""+f.getDefaultValue());
}
if (f.getList()!=null) {
atts.addAttribute ("", "list", "", "", ""+f.getList());
}
if (f.getEdit()!=null) {
atts.addAttribute ("", "edit", "", "", ""+f.getEdit());
}
if (f.getCreate()!=null) {
atts.addAttribute ("", "create", "", "", ""+f.getCreate());
}
//atts.addAttribute ("", "vascGroupId", "", "", model.groupId);
xmlWriter.startElement (URI_VASC_LANG, "field", "", atts);

View file

@ -1,12 +1,18 @@
#
# Default dark red color thema for pulsefire
# yellow-purple color schema from pulsefire.
#
text=#DF0A0A
info=#370A00
control=#0A1428
nimbusBase=#00050A
nimbusFocus=#0A6428
nimbusOrange=#00960A
nimbusBorder=#34415E
nimbusDisabledText=#850F0F
nimbusLightBackground=#050A28
text=#FF9900
info=#9F3B00
control=#5B084C
nimbusBase=#3A0053
nimbusDisabledText=#3A0053
nimbusFocus=#FF6600
nimbusLightBackground=#47184D
nimbusSelectedText=#47184D
nimbusBlueGrey=#661C7D
nimbusGreen=#D2C122
nimbusBorder=#A018D8
nimbusSelectionBackground=#BF6204
ComboBox.background=#380030
TabbedPane.background=#380030

View file

@ -22,6 +22,10 @@
package net.forwardfire.vasc.demo.client.swing;
import java.awt.Color;
import java.awt.Font;
import java.io.IOException;
import java.io.InputStream;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
@ -36,6 +40,7 @@ import javax.naming.InitialContext;
import javax.security.auth.login.LoginContext;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import net.forwardfire.vasc.demo.tech.ejb3.menu.VascMenuController;
import net.forwardfire.vasc.demo.tech.ejb3.user.ClientUserController;
@ -70,6 +75,7 @@ public class VascDemoSwingClient extends SingleFrameApplication {
protected void startup() {
logger = Logger.getLogger(VascDemoSwingClient.class.getName());
installColorsLaF();
doLogin();
VascServiceManager vc = null;
@ -187,14 +193,81 @@ public class VascDemoSwingClient extends SingleFrameApplication {
return false;
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Server error: "+e.getMessage());
e.printStackTrace();
//e.printStackTrace();
return false;
}
}
private String installColorsLaF() {
UIManager.put("TabbedPane.font", Font.decode("SansSerif-BOLD-12"));
UIManager.put("TitledBorder.font", Font.decode("SansSerif-BOLD-16"));
UIManager.put("FireDial.font", Font.decode("SansSerif-9"));
String colorName = "laf-colors";
ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (cl==null) {
cl = this.getClass().getClassLoader();
}
InputStream in = cl.getResourceAsStream("net/forwardfire/vasc/demo/client/swing/resources/"+colorName+".properties");
if (in==null) {
logger.warning("Color schema not found: "+colorName);
return "unknown";
}
try {
Properties p = new Properties();
p.load(in);
for (Object key:p.keySet()) {
String value = p.getProperty(key.toString());
Color colorValue = Color.decode(value);
UIManager.put(key,colorValue);
}
} catch (IOException e) {
logger.warning("Could not load color schema: "+colorName+" error: "+e.getMessage());
} finally {
try {
in.close();
} catch (IOException e) {
}
}
// Invert focus painters
List<Object> keys = new ArrayList<Object>(UIManager.getLookAndFeelDefaults().keySet());
for (Object keyObj:keys) {
if ((keyObj instanceof String)==false) {
continue;
}
String key = (String)keyObj;
if (key.endsWith("[Focused].backgroundPainter")==false & key.endsWith("[Focused].iconPainter")==false) {
continue;
}
String preKey = key.substring(0,key.indexOf("["));
String postKey = "backgroundPainter";
if (key.contains("iconPainter")) {
postKey = "iconPainter";
}
logger.finer("Flipping painters of key: "+preKey);
Object focusPainter = UIManager.getLookAndFeelDefaults().get(preKey+"[Focused]."+postKey);
Object mouseOverPainter = UIManager.getLookAndFeelDefaults().get(preKey+"[MouseOver]."+postKey);
UIManager.getLookAndFeelDefaults().put(preKey+"[Focused]."+postKey,mouseOverPainter);
UIManager.getLookAndFeelDefaults().put(preKey+"[MouseOver]."+postKey,focusPainter);
if (key.contains("iconPainter")) {
Object focusPainterSelected = UIManager.getLookAndFeelDefaults().get(preKey+"[Focused+Selected]."+postKey);
Object mouseOverPainterSelected = UIManager.getLookAndFeelDefaults().get(preKey+"[MouseOver+Selected]."+postKey);
UIManager.getLookAndFeelDefaults().put(preKey+"[Focused+Selected]."+postKey,mouseOverPainterSelected);
UIManager.getLookAndFeelDefaults().put(preKey+"[MouseOver+Selected]."+postKey,focusPainterSelected);
}
}
return colorName;
}
public String i18n(Object obj,String key,Object...params) {
if(obj==null) { throw new NullPointerException("Can't get key of null obj"); }
if (key==null) { throw new NullPointerException("key may not be null"); }
if(obj==null) { throw new NullPointerException("Can't get key of null obj"); }
if (key==null) { throw new NullPointerException("key may not be null"); }
if(obj instanceof Class) {
key=((Class<?>)obj).getName()+"."+key;
} else {
@ -203,23 +276,16 @@ public class VascDemoSwingClient extends SingleFrameApplication {
return i18n(key,params);
}
/**
* Some simple hardcoded i18n function here
*
* @param key
* @param params
* @return
*/
public String i18n(String key,Object...params) {
try {
String text = ResourceBundle.getBundle(RootApplicationBundle.class.getName()).getString(key);
if (params != null) {
MessageFormat mf = new MessageFormat(text);
text = mf.format(params, new StringBuffer(), null).toString();
}
return text;
} catch(MissingResourceException e){
return key;
}
}
public String i18n(String key,Object...params) {
try {
String text = ResourceBundle.getBundle(RootApplicationBundle.class.getName()).getString(key);
if (params != null) {
MessageFormat mf = new MessageFormat(text);
text = mf.format(params, new StringBuffer(), null).toString();
}
return text;
} catch(MissingResourceException e){
return key;
}
}
}

View file

@ -23,7 +23,6 @@
package net.forwardfire.vasc.demo.client.swing;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
@ -43,6 +42,7 @@ import java.util.TimerTask;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
@ -51,47 +51,19 @@ import javax.swing.JPasswordField;
import javax.swing.JTextField;
/**
* Zwaar gehacke jaas login dialog
* added features:
* - name remebering
* - focus on name field
* - alway on top
* - logo stuff
* - message field
*
* <p>
* Uses a Swing dialog window to query the user for answers to authentication
* questions. This can be used by a JAAS application to instantiate a
* CallbackHandler
* VascDemoUserLoginDialog used be be true jaas auth module but now only dialog.
*
* @see javax.security.auth.callback
* @author Willem Cazander
* @version 1.0 Nov 10, 2012
*/
public class VascDemoUserLoginDialog {
private Component parentComponent;
private static final int JPasswordFieldLen = 8;
private int loginTry = 0;
private String connectUrl = null;
private String username = null;
private String password = null;
/**
* Creates a callback dialog with the default parent window.
*/
public VascDemoUserLoginDialog() {
}
/**
* Creates a callback dialog and specify the parent window.
*
* @param parentComponent
* the parent window -- specify <code>null</code> for the
* default parent
*/
public VascDemoUserLoginDialog(Component parentComponent) {
this.parentComponent = parentComponent;
}
/**
* An interface for recording actions to carry out if the user clicks OK for
* the dialog.
@ -105,10 +77,9 @@ public class VascDemoUserLoginDialog {
*/
public void handle() {
this.loginTry++;
/* Collect messages to display in the dialog */
final JPanel loginDesign = new JPanel();
loginDesign.setLayout(new BoxLayout(loginDesign, BoxLayout.PAGE_AXIS));
//final Image logoImage = Toolkit.getDefaultToolkit().createImage(getClass().getResource("/resources/images/logos/logo.png"));
final Image logoImage = Toolkit.getDefaultToolkit().createImage(getClass().getResource("/net/forwardfire/vasc/demo/client/swing/resources/logo.png"));
final JPanel logoPanel = new JPanel() {
private static final long serialVersionUID = 10l;
protected void paintComponent(Graphics g) {
@ -119,20 +90,14 @@ public class VascDemoUserLoginDialog {
// Paint the default look of the panel.
super.paintComponent(g2d);
int offsetX = 0; // for windows systems
boolean isWindows = System.getProperty("os.name").toLowerCase().indexOf("windows") != -1;
if (isWindows) {
offsetX += 25;
}
g2d.setColor(Color.BLACK);
g2d.fillRect(0,0,getWidth(),getHeight());
g2d.setColor(new Color(238,212,1));
//int w = (getWidth()/2)-(logoImage.getWidth(null)/2);
//int h = (getHeight()/2)-(logoImage.getHeight(null)/2);
//g2d.drawImage(logoImage, w, h, this);
int w = (getWidth()/2)-(logoImage.getWidth(null)/2);
int h = (getHeight()/2)-(logoImage.getHeight(null)/2);
g2d.drawImage(logoImage, w, h, this);
}
};
logoPanel.setPreferredSize(new Dimension(200, 170));
@ -146,13 +111,11 @@ public class VascDemoUserLoginDialog {
loginDesign.add(namePanel);
loginDesign.add(Box.createVerticalStrut(5));
final List<Action> okActions = new ArrayList<Action>(2);
final GridLayout messagesLayout = new GridLayout(3,2);
final JPanel messages = new JPanel();
messages.setLayout(messagesLayout);
/* Collection actions to perform if the user clicks OK */
final List<Action> okActions = new ArrayList<Action>(2);
// Add server field
JLabel serverName = new JLabel("Server:");
final JTextField serverField = new JTextField(getConnectUrl());
@ -225,6 +188,7 @@ public class VascDemoUserLoginDialog {
/// JOptionPane(Object message, int messageType, int optionType, Icon icon, Object[] options, Object initialValue)
JOptionPane jop = new JOptionPane(loginDesign, JOptionPane.PLAIN_MESSAGE,JOptionPane.OK_CANCEL_OPTION,null,options,name);
JComponent parentComponent = null;
JDialog dialog = jop.createDialog(parentComponent,"Vasc Demo Login");
// We alway request focus after the windows gets focus

View file

@ -29,4 +29,5 @@ Application.homepage = http://vasc.forwardfire.org/
Application.vendorId = vasc
Application.id = vascdemotech
Application.lookAndFeel = com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel
#Application.icon = images/icon.png
Application.icon = icon.png

View file

@ -0,0 +1,18 @@
#
# yellow-purple color schema from pulsefire.
#
text=#FF9900
info=#9F3B00
control=#5B084C
nimbusBase=#3A0053
nimbusDisabledText=#3A0053
nimbusFocus=#FF6600
nimbusLightBackground=#47184D
nimbusSelectedText=#47184D
nimbusBlueGrey=#661C7D
nimbusGreen=#D2C122
nimbusBorder=#A018D8
nimbusSelectionBackground=#BF6204
ComboBox.background=#380030
TabbedPane.background=#380030

View file

@ -0,0 +1,106 @@
/*
* Copyright 2009-2012 forwardfire.net All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.forwardfire.vasc.demo.tech.web.beans;
import java.util.Collection;
import java.util.Locale;
import java.util.Map;
import java.util.ResourceBundle;
import java.util.Set;
import javax.faces.context.FacesContext;
/**
* I18nController wraps to root application bundle to skip jsf cache.
*
* @author Willem Cazander
* @version 1.0 Jan 7, 2013
*/
public class I18nController implements Map<String,String> {
public ResourceBundle getBundle() {
Locale locale = null;
FacesContext context = FacesContext.getCurrentInstance();
locale = context.getApplication().getDefaultLocale();
ResourceBundle bundle = ResourceBundle.getBundle("net.forwardfire.vasc.lib.i18n.bundle.RootApplicationBundle", locale);
return bundle;
}
@Override
public void clear() {
}
@Override
public boolean containsKey(Object key) {
return getBundle().containsKey((String)key);
}
@Override
public boolean containsValue(Object value) {
return false;
}
@Override
public Set<java.util.Map.Entry<String, String>> entrySet() {
return null;
}
@Override
public String get(Object key) {
return getBundle().getString((String)key);
}
@Override
public boolean isEmpty() {
return false;
}
@Override
public Set<String> keySet() {
return getBundle().keySet();
}
@Override
public String put(String key, String value) {
return value;
}
@Override
public void putAll(Map<? extends String, ? extends String> arg0) {
}
@Override
public String remove(Object key) {
return (String)key;
}
@Override
public int size() {
return getBundle().keySet().size();
}
@Override
public Collection<String> values() {
return null;
}
}

View file

@ -7,10 +7,12 @@
>
<application>
<!-- moved to I18nController because of hard caching resources in jsf impl.
<resource-bundle>
<base-name>net.forwardfire.vasc.lib.i18n.bundle.RootApplicationBundle</base-name>
<var>i18n</var>
</resource-bundle>
-->
<locale-config>
<default-locale>en</default-locale>
</locale-config>
@ -20,6 +22,13 @@
</system-event-listener>
</application>
<managed-bean>
<description>I18n map bean as workaround for jsf caching.</description>
<managed-bean-name>i18n</managed-bean-name>
<managed-bean-class>net.forwardfire.vasc.demo.tech.web.beans.I18nController</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>
<managed-bean>
<description>Fixes the context path for root vs non-root deployments.</description>
<managed-bean-name>contextPathController</managed-bean-name>