私はプロジェクトに取り組んでおり、JSF にあまり詳しくないので、この質問のギャップを修正してください。
ドメインの値を保持するプロパティファイルがあります...たとえば
domain=.com
domain=.net
私のBeanにはこれがあります
private String domain;
private String[] domainSelection;
public void initProp(){
try {
Configuration config = new PropertiesConfiguration("prop.properties");
domainSelection = config.getStringArray("domain");
} catch (ConfigurationException e) {
Log.error("Error");
}
}
.jsp
私が持っているJSFのページで
<rich:select id="domain" value="#{Bean.domain}"
required="true">
<f:selectItems itemValue="#{Bean.domainSelection}" />
</rich:select>
これをデバッグすると、domainSelection に 2 つの値が表示されますが、それらを JSF に渡す必要があり、その方法がわかりません。