Ajuda como usar ModalPanel do

Olá,

peguei esse exemplo de ModalPanel mais não estou conseguindo executar ou não sei se fiz a configuração certa
se alguém puder me ajudar agradeceria.
estou usando tomcat 7 , jsf 2,richfaces
richfaces-components-api-4.0.0.20110209-M6.jar
richfaces-components-ui-4.0.0.20110209-M6.jar
richfaces-core-api-4.0.0.20110209-M6.jar
richfaces-core-impl-4.0.0.20110209-M6.jar

o exemplo:


This line code invokes the modal panel:
#{rich:component('mp')}.show()

<ui:composition 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:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
            
        <script>
         function getRightTop(ref) {
           var position = new Object();
           position.top = 0; //ref.offsetTop;
           position.left =0; // ref.offsetLeft+ref.clientWidth+6;
           return position;
         }
        </script>
        <rich:modalPanel  id="mp" minHeight="200" minWidth="450" 
            height="200" width="500">
            <f:facet name="header">
                <h:outputText value="Modal Panel Title" />
            </f:facet>
            <f:facet name="controls">
            </f:facet>
                <p>Any JSF content might be inside the panel. In case of using 
                Facelets or JSF 1.2, it might be any mixed content.</p> 
                
                <p>The RichFaces modal panel is good with &lt;a4j:include&gt; to create
                a wizard like behavior.</p>
                <p>The model panel is open and closed from the javascript function
                on <i>Richfaces</i> object. The following code 
                <a  >hide this panel</a>:
                &lt;f:verbatim&gt;&#35;&lt;/f:verbatim&gt;{rich:component('mp')}.hide()</p>
        &lt;/rich:modalPanel&gt;
&lt;/ui:composition&gt;

criei uma página xhtml


 &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html 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:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
	xmlns:sec="http://www.springframework.org/security/facelets/tags"&gt;
 
&lt;ui:composition &gt;
       
            
        &lt;script&gt;
         function getRightTop(ref) {
           var position = new Object();
           position.top = 0; //ref.offsetTop;
           position.left =0; // ref.offsetLeft+ref.clientWidth+6;
           return position;
         }
        &lt;/script&gt;
        &lt;h:commandButton action="#{rich:component('mp')}.show()" value="Chama ModalPanel"/&gt;
        
        
        
        &lt;rich:modalPanel  id="mp" minHeight="200" minWidth="450" 
            height="200" width="500"&gt;
            &lt;f:facet name="header"&gt;
                &lt;h:outputText value="Modal Panel Title" /&gt;
            &lt;/f:facet&gt;
            &lt;f:facet name="controls"&gt;
            &lt;/f:facet&gt;
                <p>Any JSF content might be inside the panel. In case of using 
                Facelets or JSF 1.2, it might be any mixed content.</p> 
                
                <p>The RichFaces modal panel is good with &lt;a4j:include&gt; to create
                a wizard like behavior.</p>
                <p>The model panel is open and closed from the javascript function
                on <i>Richfaces</i> object. The following code 
                <a  >hide this panel</a>:
                &lt;f:verbatim&gt;&#35;&lt;/f:verbatim&gt;{rich:component('mp')}.hide()</p>
        &lt;/rich:modalPanel&gt;
&lt;/ui:composition&gt;
&lt;/html&gt;

ao executar apresenta o erro abaixo:

14/03/2011 08:35:38 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_25\jre\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\Java\jdk1.6.0_25\bin;.;C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\apache-maven-2.2.1;C:\Program Files (x86)\Windows Live\Shared;C:\apache-maven-2.2.1\bin
14/03/2011 08:35:39 org.apache.tomcat.util.digester.SetPropertiesRule begin
AVISO: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Modal' did not find a matching property.
14/03/2011 08:35:42 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
14/03/2011 08:35:42 org.apache.coyote.ajp.AjpProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
14/03/2011 08:35:42 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 6267 ms
14/03/2011 08:35:42 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
14/03/2011 08:35:42 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.4
14/03/2011 08:35:53 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
14/03/2011 08:35:53 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
14/03/2011 08:35:53 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
14/03/2011 08:35:53 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
14/03/2011 08:35:53 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
14/03/2011 08:35:53 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined
14/03/2011 08:35:53 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined
14/03/2011 08:35:53 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
14/03/2011 08:35:53 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
14/03/2011 08:35:53 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
14/03/2011 08:35:53 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
14/03/2011 08:35:53 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined
14/03/2011 08:35:53 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
14/03/2011 08:35:53 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
14/03/2011 08:35:53 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined
14/03/2011 08:35:54 com.sun.faces.config.ConfigureListener contextInitialized
INFO: Inicializando Mojarra 2.0.3 (FCS b03) para o contexto '/Modal'
14/03/2011 08:36:01 com.sun.faces.spi.InjectionProviderFactory createInstance
INFO: JSF1048: Anotações PostConstruct/PreDestroy presentes.  Os métodos ManagedBeans marcados com essas anotações informarão as anotações processadas.
14/03/2011 08:36:04 org.richfaces.javascript.ClientServiceConfigParser parse
AVISO: Found JavaScript function definition for class javax.validation.constraints.NotNull, but that class is not presented
14/03/2011 08:36:04 org.richfaces.javascript.ClientServiceConfigParser parse
AVISO: Found JavaScript function definition for class org.hibernate.validator.constraints.NotEmpty, but that class is not presented
14/03/2011 08:36:04 org.richfaces.javascript.ClientServiceConfigParser parse
AVISO: Found JavaScript function definition for class javax.validation.constraints.Size, but that class is not presented
14/03/2011 08:36:04 org.richfaces.javascript.ClientServiceConfigParser parse
AVISO: Found JavaScript function definition for class javax.validation.constraints.Pattern, but that class is not presented
14/03/2011 08:36:04 org.richfaces.javascript.ClientServiceConfigParser parse
AVISO: Found JavaScript function definition for class javax.validation.constraints.Min, but that class is not presented
14/03/2011 08:36:04 org.richfaces.javascript.ClientServiceConfigParser parse
AVISO: Found JavaScript function definition for class javax.validation.constraints.Max, but that class is not presented
14/03/2011 08:36:04 org.richfaces.cache.CacheManager getCacheFactory
INFO: Selected fallback cache factory
14/03/2011 08:36:04 org.richfaces.cache.lru.LRUMapCacheFactory createCache
INFO: Creating LRUMap cache instance using parameters: {org.richfaces.skin=#{skinBean.skin}, org.richfaces.fileUpload.maxRequestSize=100000, javax.faces.PROJECT_STAGE=Development, javax.faces.FACELETS_LIBRARIES=/WEB-INF/app-tags.taglib.xml, org.richfaces.fileUpload.createTempFiles=false, javax.faces.STATE_SAVING_METHOD=server}
14/03/2011 08:36:04 org.richfaces.cache.lru.LRUMapCacheFactory createCache
INFO: Creating LRUMap cache instance of 512 items capacity
14/03/2011 08:36:04 org.richfaces.application.InitializationListener onStart
INFO: RichFaces Core Implementation by JBoss, a division of Red Hat, Inc., version v.4.0.0.20110209-M6 SVN r.21581
14/03/2011 08:36:06 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
14/03/2011 08:36:06 org.apache.coyote.ajp.AjpProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
14/03/2011 08:36:06 org.apache.catalina.startup.Catalina start
INFO: Server startup in 23788 ms
14/03/2011 08:36:36 org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Servlet.service() for servlet [Faces Servlet] in context with path [/Modal] threw exception
java.lang.NullPointerException
	at com.sun.faces.lifecycle.RestoreViewPhase.notifyAfter(RestoreViewPhase.java:288)
	at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:203)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:242)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:259)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:281)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
14/03/2011 08:38:59 org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Servlet.service() for servlet [Faces Servlet] in context with path [/Modal] threw exception
java.lang.NullPointerException
	at com.sun.faces.lifecycle.RestoreViewPhase.notifyAfter(RestoreViewPhase.java:288)
	at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:203)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:242)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:259)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:281)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)

web.xml

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;web-app id="richfaces-showcase" version="2.5"
	xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt;
	&lt;display-name&gt;richfaces-showcase&lt;/display-name&gt;
	&lt;context-param&gt;
		&lt;param-name&gt;javax.faces.FACELETS_LIBRARIES&lt;/param-name&gt;
		&lt;param-value&gt;/WEB-INF/app-tags.taglib.xml&lt;/param-value&gt;
	&lt;/context-param&gt;
	&lt;context-param&gt;
		&lt;param-name&gt;org.richfaces.skin&lt;/param-name&gt;
		&lt;param-value&gt;#{skinBean.skin}&lt;/param-value&gt;
	&lt;/context-param&gt;
	&lt;context-param&gt;
		&lt;param-name&gt;org.richfaces.fileUpload.maxRequestSize&lt;/param-name&gt;
		&lt;param-value&gt;100000&lt;/param-value&gt;
	&lt;/context-param&gt;
	&lt;context-param&gt;
		&lt;param-name&gt;org.richfaces.fileUpload.createTempFiles&lt;/param-name&gt;
		&lt;param-value&gt;false&lt;/param-value&gt;
	&lt;/context-param&gt;
	&lt;context-param&gt;
		&lt;param-name&gt;javax.faces.PROJECT_STAGE&lt;/param-name&gt;
		&lt;param-value&gt;Development&lt;/param-value&gt;
	&lt;/context-param&gt;
	&lt;context-param&gt;
		&lt;param-name&gt;javax.faces.STATE_SAVING_METHOD&lt;/param-name&gt;
		&lt;param-value&gt;server&lt;/param-value&gt;
	&lt;/context-param&gt;
	&lt;servlet&gt;
		&lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
		&lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
		&lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
	&lt;/servlet&gt;
	&lt;servlet-mapping&gt;
		&lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
		&lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;
	&lt;/servlet-mapping&gt;

	&lt;welcome-file-list&gt;
		&lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
		&lt;welcome-file&gt;index.htm&lt;/welcome-file&gt;
		&lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
		&lt;welcome-file&gt;default.html&lt;/welcome-file&gt;
		&lt;welcome-file&gt;default.htm&lt;/welcome-file&gt;
		&lt;welcome-file&gt;default.jsp&lt;/welcome-file&gt;
	&lt;/welcome-file-list&gt;
&lt;/web-app&gt;

help!!!

Desculpe ressucitar o post… Mas passei pelo mesmo problema e achei esse post aqui sem resposta…
No richfaces 4 resolvi o problema utilizando:

rich:popupPanel