<?xml version='1.0' encoding='windows-1252'?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:af="http://xmlns.oracle.com/adf/faces/rich" xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jsp/jstl/core"> <c:set var="demouiBundle" value="#{adfBundle['com.demo.ui.DemoUiBundle']}"/> <af:panelGroupLayout id="pgl1"> <af:showDetailHeader text="#{demouiBundle['Header.Title']}" disclosed="true" id="sdh1"> <f:facet name="context"/> <f:facet name="menuBar"/> <f:facet name="toolbar"/> <f:facet name="legend"/> <f:facet name="info"/> </af:showDetailHeader> <af:showDetailHeader text="#{pageFlowScope.ExampleBean.headerTitle}" disclosed="true" id="showDetailHeader1"> <f:facet name="context"/> <f:facet name="menuBar"/> <f:facet name="toolbar"/> <f:facet name="legend"/> <f:facet name="info"/> </af:showDetailHeader> </af:panelGroupLayout> </jsp:root>
But, some times there might be needs to refer the properties bundle from java bean to access a property.
This can be done by using the below code.
package com.demo.beans; import java.util.ResourceBundle; import oracle.javatools.resourcebundle.BundleFactory; public class ExampleBean { public String getHeaderTitle() { ResourceBundle rs = BundleFactory.getBundle("com.demo.ui.DemoUiBundle"); return rs.getString("Header.Title"); } }
Content of the sample bundle file:
# sample properties Header.Title=Employee Details EMP_NAME=Employee Name DEPT_NAME=Department Name
Running the above jsff, we'll get the same text by using java bean as well direct reference in jsff (Screen shot below).
This comment has been removed by the author.
ReplyDeletePlease let me know if we can update the resource bundle programmatically. For example adding a key, value pair of properties through java code.
ReplyDeleteYou will educate how to troubleshoot projects and love lessons in differed zones indicated as duds. java
ReplyDelete20170303shizhong
ReplyDeletecoach outlet
fred perry
michael kors uk
coach outlet store online clearances
sac longchamp pas cher
michael kors outlet clearance
nmd adidas
kate spade outlet
polo ralph lauren
pandora charms sale
michael kors outlet clearance
ReplyDeletemichael kors
michael kors outlet store
coach outlet online
red bottom shoes for women
tommy hilfiger outlet
packers jerseys
polo ralph lauren outlet
fitflops sale
nfl jerseys
170511yueqin
A selection of homes for sale is an ideal investment for a second home abroad. Property in Greece is consistently popular with overseas buyers the main regions of interest are.Source
ReplyDeleteSome properties in need of refurbishment in Hull can be bought for as little as 20K. deyaar midtown project
ReplyDelete