4 Replies Latest reply on Nov 25, 2007 1:20 PM by ricardomarques

    ModalPanel and Javascript issus

    ricardomarques

      Hello

      I'm facing some issues here while trying to use ModalPanel, and i already lost some time with it.

      RichFaces 3.1.2 GA
      MyFaces 1.1.6
      Tomahawk 1.1.6
      Facelets
      Tomcat 5.5

      my code:

      <?xml version='1.0' encoding='UTF-8' ?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      
      <t:document xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:t="http://myfaces.apache.org/tomahawk"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich">
      
       <t:documentBody >
      
       <ui:composition template="/templates/template-nomenu.xhtml">
      
       <ui:define name="path">
       <h:outputText value="#{locale['navigation.home']}" styleClass="aslink"/>
       </ui:define>
      
       <ui:define name="main">
       <h1><h:outputText value="#{locale['general.welcome.title']} : #{user.displayName}"/></h1>
      
       <h:outputText value="Versao de desenvolvimento de: 19/11/2007" />
      
      
       <rich:modalPanel id="messages" top="150" height="270" width="325"
       resizeable="false" >
       <h:form>
       <h:outputText value="Hello Web World" />
      
       <h:commandButton onclick="javascript:Richfaces.hideModalPanel('messages')" value="#{locale['popup.close']}"
       styleClass="submit"/>
       </h:form>
      
       </rich:modalPanel>
      
       <h:outputLink value="javascript:Richfaces.showModalPanel('messages')">
       <h:outputText value="CLICK"/>
       </h:outputLink>
      
       </ui:define>
      
       </ui:composition>
      
       </t:documentBody>
      </t:document>
      


      and when i run it, i get 7 errors on firefox (firebug) error console:

      missing ; before statement
      [Break on this error] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or...
      a4j_3_1_2.GAorg.a... (line 2)
      
      missing ; before statement
      [Break on this error] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or...
      a4j_3_1_2.GAorg.a... (line 2)
      
      missing ; before statement
      [Break on this error] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or...
      utils.js.html (line 2)
      
      missing ; before statement
      [Break on this error] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or...
      modalPanel.js.htm... (line 2)
      
      missing ; before statement
      [Break on this error] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or...
      modalPanelBorders... (line 2)
      
      missing ; before statement
      [Break on this error] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or...
      browser_info.js.h... (line 2)
      
      ModalPanel is not defined
      [Break on this error] new ModalPanel('messages',


      Thanks in advance