jsf2.0 局部刷新

jsf页面代码:

<h:body>
        <h:form>
            <h:selectOneMenu value="#{LoginManagedBean.time}" valueChangeListener="#{LoginManagedBean.endTimeValue}">
                <f:selectItems value="#{LoginManagedBean.co}"/>
                <f:ajax event="blur" render="end"></f:ajax>
            </h:selectOneMenu>

            <h:selectOneMenu value="#{LoginManagedBean.endTime}" id="end">
                <f:selectItems value="#{LoginManagedBean.endList}"/>
            </h:selectOneMenu>
        </h:form>
    </h:body>

 受管bean部分代码:

    public void endTimeValue(ValueChangeEvent e){
        UISelectOne se = (UISelectOne) e.getComponent();
        String nextTime = (String) se.getValue();
        endList.add(0, "123");
    }
 附件为项目,IDE为NetBeans6..8,服务器为tomcat6.0.20

你可能感兴趣的:(Ajax,bean,JSF,F#,ide)