voyent
icefaces+liferay locale problem  XML
Forum Index -> Portals & Portlets
Author Message
maxi_ng

Joined: 11/Jan/2008 00:00:00
Messages: 92
Offline


IDE: Netbeans 5.5.1
AS: liferay 4.4.0 Jboss 4.2 bundle
Icefaces: 1.6.1

I have used netbeans+icefaces to develop a portlet with multiple locale.
I deployed it to Jboss AS+ Jboss portal without a problem.
when I try to deploy it to liferay, it shows the following when I deploy.

Code:
 [PortletHotDeployListener] Can't find bundle for base name message, locale zn_TW
 [PortletHotDeployListener] Can't find bundle for base name message, locale en_US
 [PortletHotDeployListener] Can't find bundle for base name message, locale en
 


my locale files: message.properties, message_zh_TW.properties, message_en.properties are under \WEB-INF
my index.jspx is under \WEB-INF\jsp
Code:
 <ice:form id="booksSales" partialSubmit="true" xmlns:f="http://java.sun.com/jsf/core" 
           xmlns:h="http://java.sun.com/jsf/html" 
           xmlns:ice="http://www.icesoft.com/icefaces/component">
     <f:loadBundle basename="message" var="msg" />
     <ice:panelGrid columns="2">   
         <ice:outputText value="#{msg.membershipID}"/>
         <ice:inputText id="memberID" size="15" value="#{salesBean.memberID}" required="yes" />
         <ice:outputText value="#{msg.isbn}"/>
         <ice:inputText id="isbn" size="15" value="#{salesBean.isbn}" required="yes" />
         <ice:outputText value=""/>
         <ice:commandButton id="submit" action="#{salesBean.purchase}" value="#{msg.submit}" partialSubmit="true"/>
         <ice:outputText value="#{msg.status}" style="color:blue"/>
         <ice:outputText value="#{salesBean.status}" style="color:blue"/>
         <ice:outputText value="#{msg.membershipID}" style="color:blue"/>
         <ice:outputText value="#{salesBean.memberID}" style="color:blue"/>
         <ice:outputText value="#{msg.booksName}" style="color:blue"/>
         <ice:outputText value="#{salesBean.bookName}" style="color:blue"/>
     </ice:panelGrid>
 </ice:form>
 


faces-config.xml
Code:
 <?xml version='1.0' encoding='UTF-8'?>
 
 
 <!DOCTYPE faces-config PUBLIC
 "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
 "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
 
 <!-- =========== FULL CONFIGURATION FILE ================================== -->
 
 <faces-config>
     <managed-bean>
         <managed-bean-name>salesBean</managed-bean-name>
         <managed-bean-class>com.popsmacau.mam.SalesBean</managed-bean-class>
         <managed-bean-scope>session</managed-bean-scope>
     </managed-bean>
     <managed-bean>
         <managed-bean-name>bookBean</managed-bean-name>
         <managed-bean-class>com.popsmacau.mam.BookBean</managed-bean-class>
         <managed-bean-scope>session</managed-bean-scope>
     </managed-bean>    
     <navigation-rule>
         <from-view-id>/WEB-INF/jsp/index.jsp</from-view-id>
         <navigation-case>
             <from-outcome>OK</from-outcome>
             <to-view-id>/WEB-INF/jsp/index.jsp</to-view-id>
         </navigation-case>
     </navigation-rule>
     <navigation-rule>
         <from-view-id>/WEB-INF/jsp/edit.jsp</from-view-id>
         <navigation-case>
             <from-outcome>OK</from-outcome>
             <to-view-id>/WEB-INF/jsp/edit.jsp</to-view-id>
         </navigation-case>
     </navigation-rule>   
     <application>
         <message-bundle>
             message
         </message-bundle>
         <locale-config>
             <default-locale>en</default-locale>
             <supported-locale>zh_TW</supported-locale>
             <supported-locale>en_US</supported-locale>
         </locale-config>        
     </application>
 </faces-config>
 


portlet.xml
Code:
 <?xml version="1.0" encoding="UTF-8"?>
 <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd/etc/opt/SUNWportal/dtd/portlet.xsd" version="1.0">
     <portlet>
         <description>BooksSales</description>
         <portlet-name>BooksSales</portlet-name>
         <display-name>BooksSales</display-name>
         <portlet-class>com.icesoft.faces.webapp.http.portlet.MainPortlet</portlet-class>
         <expiration-cache>0</expiration-cache>
         <init-param>
             <name>com.icesoft.faces.VIEW</name>
             <value>/WEB-INF/jsp/index.iface</value>
         </init-param>
         <init-param>
             <name>com.icesoft.faces.HELP</name>
             <value>/WEB-INF/jsp/help.iface</value>
         </init-param>
         <init-param>
             <name>com.icesoft.faces.EDIT</name>
             <value>/WEB-INF/jsp/edit.iface</value>
         </init-param> 
         <supports>
             <mime-type>text/html</mime-type>          
             <portlet-mode>VIEW</portlet-mode>
             <portlet-mode>EDIT</portlet-mode>
             <portlet-mode>HELP</portlet-mode>
         </supports>
         <supported-locale>zh_TW</supported-locale>
         <supported-locale>en</supported-locale>
         <resource-bundle>message</resource-bundle>       
         <portlet-info>
             <title>BooksSales</title>
             <short-title>BooksSales</short-title>
         </portlet-info>
     </portlet>
 </portlet-app>
 


how do I solve this locale problem?
or
what are the steps to implement a I18N portlet using icefaces?

Thank you so much
h_aptioglu

Joined: 23/Jun/2007 00:00:00
Messages: 45
Offline


you can check this form
http://www.icefaces.org/JForum/posts/list/6400.page
maxi_ng

Joined: 11/Jan/2008 00:00:00
Messages: 92
Offline


Thank you,
I have solved the problem by moving all .properties to default package.
even thought I don't know why but it works.
Thank you again.
pgarciany

Joined: 17/Mar/2008 00:00:00
Messages: 5
Offline


Hello, did you use liferay language portlet to change language? does it works?

Thank you
 
Forum Index -> Portals & Portlets
Go to:   
Powered by JForum 2.1.7ice © JForum Team