我的wep页面中有一个下拉列表,它是:
<h:form>
<h:panelGrid columns="2">
<h:outputText value="Açılacak hesabın para birimi:"></h:outputText>
<h:selectOneMenu value="currency" >
<f:selectItem itemValue="choose" itemLabel="Seçiniz..." />
<f:selectItem itemValue="tl" itemLabel="Türk Lirası(TL)" />
<f:selectItem itemValue="usd" itemLabel="Amerikan Doları(USD)" />
<f:selectItem itemValue="euro" itemLabel="Euro" />
</h:selectOneMenu>
<h:outputText value="Açılacak hesabın cinsi:"></h:outputText>
<h:selectOneMenu value="vade" >
<f:selectItem itemValue="choose" itemLabel="Seçiniz..." />
<f:selectItem itemValue="vadesiz" itemLabel="Vadesiz mevduat hesabı" />
<f:selectItem itemValue="vadeli" itemLabel="Vadeli Mevduat Hesabı" />
</h:selectOneMenu>
<h:commandButton value="Onayla" action="#{events.createAccount}" ></h:commandButton>
</h:panelGrid>
</h:form>
然后通过单击按钮,我将转到 Events.java bean 并在那里处理一些信息。但我需要函数 createAccount() 中这些下拉列表的值。这是我的事件 bean
@Named(value = "events")
@Dependent
public class Events {
/**
* Creates a new instance of Events
*/
public Events() {
}
public void createAccount(){
}
}
我怎样才能做到这一点?
谢谢