运行环境:JSF1.2 + RichFaces + Seam问题描述: 页面上添加人员信息时,选择人员的所属机构和所属部门,级联下拉框(ajax4j实现局部无刷新)选择部门后,页面无法提交问题!页面代码:
personManager.xhtml<rich:modalPanel id="addPersonPanel" width="500" height="300">
     ...
     <h:form>
         <h:panelGrid columns="3">
              <h:outputLabel value="所属机构">
              <h:selectOneMenu value="#{personAction.orgId}">
                  <f:selectItems value="#{personAction.orgItems}" />
                  <a:support event="onchange" action="#{personAction.selectOrgInput}" reRender="searchDeps" />
              </h:selectOneMenu>
              <a:status>
                  ...
              </a:status>
         </h:panelGrid>         <h:panelGrid columns="2">
              <h:outputLabel value="所属部门">
              <a:outputPanel id="searchDeps">
                   <h:selectOneMenu value="#{personAction.depId}">
                        <f:selectItems value="#{personAction.depItems}" />
                   </h:selectOneMenu>
              </a:outputPanel>               ... // (表单的其他输入信息)
         </h:panelGrid>
         <div>
             <a:commandButton value="添加人员信息" action="#{personAction.add}"      oncomplete="Richfaces.hideModalPanel('addPersonPanel')" />
        </div>
     </h:form>
</rich:modalPanel>
PersonAction文件的代码PersonAction.java@Name("personAction")
public class PersonAction{
   private Integer orgId;
   private Integer depId;
   
   private List<SelectItem> orgItems;
   private List<SelectItem> depItems;
   
   public List<SelectItem> getOrgItems(){
       ...
   }
   
   public List<SelectItem> getDepItems(){
      ...
   }   public void selectOrgInput(){
      // 通过 机构ID 获取部门列表
      ...
   }
   
   ...(其他的 get set方法 )
}
问题描述:页面上如果 选择了相应的机构和相应的部门的话,提交时就会出现:FacesMessage(s) havae been enqueued,but may not have been dispalay. ...detail=(value is not valid);
         这样调试时,根本就进步到add方法中.
         如果在页面上选择没有部门的机构的话,提交就不会出错.
所以我认为问题可能出现在:选择了机构选项时,刷新部门的下拉框后,接着提交表单时出现value is not valid信息!这小问题弄了一上午,没有找到解决方案.希望论坛里的各位大牛们生出援手帮帮俺...