1 Reply Latest reply on May 10, 2010 6:38 AM by Harut Sargsyan

    Problem with modalPanel rendering

    Vadim Vararu Newbie

      I have this piece of xhtml:

       


      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
          xmlns:rich="http://richfaces.ajax4jsf.org/rich">

       

      <head>
          <link type="text/css" rel="stylesheet" href="css/clock.css" />
          <link type="text/css" rel="stylesheet" href="../common/javascript/jquery.keypad.package-1.2.2/jquery.keypad.css" />
          <a4j:loadScript src="resource:///org/richfaces/renderkit/html/scripts/jquery/jquery.js" />
          <script type="text/javascript" src="../common/javascript/jquery.keypad.package-1.2.2/jquery.keypad.js"></script>
          <script type="text/javascript" src="javascript/clock.js"></script>
      </head>

       


      <body>

       

      <div id="clockContainer">
      <img src="" name="hra" /><img src="" name="hrb" />
      <img src="../common/images/clockCyphers/y.gif"/>
      <img src="" name="mina" /><img src="" name="minb" />
      <img src="../common/images/clockCyphers/y.gif"/>
      <img src="" name="seca" /><img src="" name="secb" />
      </div>

       

      <f:view>
          <h:form>
         
              <div id="clockFormContainer">
                  <h:outputLabel styleClass="usernameLabel" value="Username:" for="username" />
                  <h:inputText styleClass="usernameField" id="username" value="#{clockUser.username}" />
                  <rich:spacer style="display:block" height="10px"/>
                  <h:outputLabel styleClass="passwordLabel" value="Password:" for="password" />
                  <h:inputSecret styleClass="passwordField" id="password" value="#{clockUser.password}" />
                  <a4j:jsFunction name="checkUser" action="#{clockUser.checkUser}" reRender="systemMessagesPanel" />
              </div>
             
              <rich:spacer style="display:block" height="5px"/>
             
              <table cellpadding="0" cellspacing="0">
                  <tr>
                      <td>
                          <rich:spacer width="5px"/>
                          <img src="../common/images/restart.png" />
                      </td>
                      <td>
                          Clean
                      </td>
                  </tr>
              </table>
              <table cellpadding="0" cellspacing="0" onclick="checkUser();">
                  <tr>
                      <td>
                          <rich:spacer width="5px"/>
                          <img src="../common/images/apply.png" />
                      </td>
                      <td>
                          Clock it
                      </td>
                  </tr>
              </table>
          </h:form>
         
         
             
         
              <rich:modalPanel id="systemMessagesPanel"                         
                               width="300"
                               height="100"
                               showWhenRendered="true"
                               rendered="#{clockUser.showSystemMessagesPanel}"
                               onbeforeshow="hideSystemMessagesPanelIn2Seconds()">                        
                  <h:panelGroup>           
                      <h:messages />
                  </h:panelGroup>
              </rich:modalPanel>

         
      </f:view>

       

       

       

      </body>

       

      </html>

       

       

      #{clockUser.checkUser} action changes #{clockUser.showSystemMessagesPanel} to true and rerenders my modalPanel, but it doesn't render anyway   I have looked in the html sources and the modalPanel html code and js isn't there. What's the issue?