的确方便了很多!
xml 代码
- <tr>
- <td>
- <s:decorate template="/page/tiles/formFieldDecorate.xhtml">
- <ui:define name="label">分类1</ui:define>
- <h:selectOneMenu value="#{_catalog1}" converter="#{entityConverter}">
- <s:selectItems value="#{appCache.catalog1List}"
- var="cata1" label="#{cata1.name}" noSelectionLabel="请选择"/>
- <a4j:support event="onchange"
- actionListener="#{courseMaintAction.loadCata2ByCata1}"
- reRender="cata2Area" requestDelay="0" ajaxSingle="true" />
- </h:selectOneMenu>
- </s:decorate>
- </td>
- </tr>
- <tr>
- <td>
- <s:decorate template="/page/tiles/formFieldDecorate.xhtml">
- <ui:define name="label">分类2</ui:define>
- <a4j:outputPanel id="cata2Area">
- <h:selectOneMenu value="#{_catalog2}" converter="#{entityConverter}">
- <s:selectItems value="#{_catalog2List}" var="cata2" label="#{cata2.name}" noSelectionLabel="请选择" />
- </h:selectOneMenu>
- </a4j:outputPanel>
- </s:decorate>
- </td>
- </tr>
java 代码
声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
|