[jboss-user] [JBoss Seam] - Re:
smithbstl
do-not-reply at jboss.com
Mon Jul 23 15:53:49 EDT 2007
I don't understand where the value for dataTransferScheme is supposed to come from.
Typically you should be using a s:selectItems/f:selectItem/f:selectItems to get a list of values for your menu. Then menu then chooses one and passes that value to your backing bean.
<f:view>
| <s:validateAll>
| <h:form>
| <h:panelGrid columns="2">
| .....
|
| SRB DataTransferScheme *
| <h:selectOneMenu id="dataTransferCombobox" value="#{loginBean.dataTransferScheme}"
| <a4j:support event="onchange" action="#{loginBean.setAuthFields(scheme)}"
| ajaxSingle="true" immediate="true"/>
| <s:selectItems label="#{scheme}" value="#{schemes}"
| var="scheme"/>
| </h:selectOneMenu>
| </h:panelGrid>
| .....
|
| <h:commandButton value="Login" action="#{login.login}"/>
| </s:validateAll>
| </h:form>
|
| //LoginBean.java: [the Backing bean]
|
| //system.out.println is ugly, use Seam's logger support
| @Logger
| Log log;
|
| @Out
| private List<String> schemes;
|
| @Factory("schemes")
| public void fillSchemes() {
| //Fill your list here
| }
|
|
| public void setAuthFields(String dataTransferScheme)
| {
| log.info("dataTransferScheme : "+dataTransferScheme);
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066796#4066796
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066796
More information about the jboss-user
mailing list