2 Replies Latest reply on Sep 24, 2008 9:38 AM by Tsikhon Kuprevich

    selectOneMenu disabled after opening popup by rerendering

    Robert Gallas Newbie


      I'm not sure of bug is between chair and keyboard but:

      Ihave templated page with Facelets: on the status bar there is selectOneMenu with populated names. On main page is popup which is opened by rerendiring and settig it's attribute showWhenRendered to true. After popup is closed, selectOneMenu is disabled in FF 3 and IE6.

      Code follows:


       <ui:define name="content">
       <rich:modalPanel id="panel" width="350" height="100" showWhenRendered="#{bean.visible}">
       <f:facet name="header">
       <h:outputText value="Modal Panel"></h:outputText>
       <a4j:commandButton value="Close" id="close" reRender="panel" action="#{bean.actionClose}">
       <a4j:commandButton value="Open" id="open" reRender="panel" action="#{bean.actionOpen}">


       <div id="wraper">
       <div id="header">
       <ui:include src="/components/header.jspx" />
       <div id="sidemenu">
       <ui:include src="/components/sidemenu.jspx" />
       <div id="content">
       <ui:insert name="content">
       <div id="statusbar">
       <ui:insert name="statusbar">
       <a4j:form id="form1">
       <h:selectOneMenu id="singleMenu" value="#{bean.selectedUser}" onchange="submitMe()">
       <f:selectItems value="#{bean.users}" />
       <a4j:jsFunction name="submitMe" action="#{bean.actionListItemChanged}" />

      public class Bean {
       List<SelectItem> users = new ArrayList<SelectItem>();
       private String selectedUser = "Milan";
       boolean visible = false;
       public void actionOpen() {
       visible = true;
       public void actionClose() {
       visible = false;
       public boolean isVisible() {
       return visible;
       public void setVisible(boolean visible) {
       this.visible = visible;
       public Bean() {
       users.add(new SelectItem("Jano", "Jano"));
       users.add(new SelectItem("Fero", "Fero"));
       users.add(new SelectItem("Miso", "Miso"));
       users.add(new SelectItem("Milan", "Milan"));
       public String getSelectedUser() {
       return selectedUser;
       public void setSelectedUser(String selectedUser) {
       this.selectedUser = selectedUser;
       public List<SelectItem> getUsers() {
       return users;
       public String actionListItemChanged() {
       return null;
       public void actionListenerMethod(ActionEvent evt){
       System.out.println("actionListenerMethod(ActionEvent evt)");

      (There is a little workaround: When I put next to selectOneMenu any other controll, fex. <h:commandLink /> selectOneMenu will not be disabled.) (when popup is opened using rich:ComponentControll everithing works just fine. It seems that "but" is related to a4j page rerender ... ?
      Do I missunderstand something?

      Thanks Robert.