Archivos de propiedades con adminfaces
Last updated
Was this helpful?
Last updated
Was this helpful?
Es importante indicar que se usara jmoordbutils que contiene clases para el manejo de los idiomas.
Podemos configurarlo en los templates
Editamos los template
y agregamos
<f:facet name="first">
<f:view locale="#{jmoordbLanguage.locale}"></f:view>
<f:loadBundle basename="com.properties.messages" var="mymsg" />
<f:loadBundle basename="com.jmoordbutils.properties.application" var="app" />
</f:facet>
Podemos usarlo
<title>#{mymsg['application.shorttitle']}</title>
Quedaría
<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.sun.com/jsf/core"
template="/admin-top.xhtml">
<ui:define name="head">
<h:outputStylesheet library="css" name="showcase.css"/>
<h:outputStylesheet library="css" name="prism.css"/>
<link rel="shortcut icon" type="image/x-icon" href="#{resource['favicon/favicon.ico']}"/>
<link rel="shortcut icon" type="image/x-icon" href="#{resource['favicon/favicon-16x16.png']}" sizes="16x16"/>
<link rel="shortcut icon" type="image/x-icon" href="#{resource['favicon/favicon-32x32.png']}" sizes="32x32"/>
<link rel="shortcut icon" type="image/x-icon" href="#{resource['favicon/favicon-96x96.png']}" sizes="96x96"/>
<link rel="shortcut icon" type="image/x-icon" href="#{resource['favicon/favicon-144x144.png']}" sizes="144x144"/>
<!-- See https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android -->
<meta name="theme-color" content="#444"/>
<meta name="mobile-web-app-capable" content="yes"/>
<f:loadBundle var="theme" basename="admin-theme"/>
<title>#{mymsg['application.shorttitle']}</title>
<f:facet name="first">
<f:view locale="#{jmoordbLanguage.locale}"></f:view>
<f:loadBundle basename="com.properties.messages" var="mymsg" />
<f:loadBundle basename="com.jmoordbutils.properties.application" var="app" />
</f:facet>
</ui:define>