here was the code i had:
<?xml version="1.0" encoding="UTF-8"?>and in the eclipes preview window i could see the label and it's value, but in a browser the label was missing. i figured out that the f:loadBundle tag was just in the wrong place, so i moved it inside the ui:define tag (the next line under it) and the label appeared! =)
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
template="/WEB-INF/templates/default.xhtml">
<f:loadBundle basename="com.mycompany.labels_no" var="label"/>
<ui:define name="content">
<h:form id="reg">
<h:panelGroup id="messagePanel" layout="block">
<h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
</h:panelGroup>
<h:form>
<h:panelGrid columns="2">
<h:outputLabel value="#{label.userFirstName}" for="userFirstName" />
...
see also:
http://download.oracle.com/javaee/5/javaserverfaces/1.2/docs/tlddocs/f/loadBundle.html
http://www.roseindia.net/jsf/jsf1.2/jsf-properties.shtml
No comments:
Post a Comment