我有一个下载按钮,可以将文件推送到客户端: -
<h:commandButton value="#{msg['lblBtnDownload']}" rendered="#{fileDownloadBean.showDownload}"
action="#{fileDownloadBean.download}" styleClass="btnStyle"
style="width:120px;">
但是,有一个输入文本框应该可以预期俄语文本及其值在下载过程中的查询中使用: -
<h:inputText id="tpidRegex" value="#{fileDownloadBean.tpidRegex}" style="width:350px;"></h:inputText>
现在我得到的tpidRegex
的值是垃圾字符而不是实际的俄语文本。
我的faces-config.xml是: -
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd"
version="2.1">
<application>
<locale-config>
<default-locale>ru</default-locale>
<supported-locale>en</supported-locale>
</locale-config>
<resource-bundle>
<base-name>com.messages</base-name>
<var>msg</var>
</resource-bundle>
</application>
<navigation-rule>
<from-view-id>/webgui/home.xhtml</from-view-id>
<navigation-case>
<from-outcome>logout</from-outcome>
<to-view-id>logout.jsf?faces-redirect=true</to-view-id>
<redirect />
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/login.xhtml</from-view-id>
<navigation-case>
<from-outcome>home</from-outcome>
<to-view-id>/webgui/home.jsf?faces-redirect=true</to-view-id>
<redirect />
</navigation-case>
</navigation-rule>
</faces-config>