Richfaces not defined javascript error

When I try to call Richfaces.showModalPanel ('id'), I get that Richfaces does not have a javascript error defined and nothing happens.

In my sample application, I have two pages, one is a master view, and the other is a child page. The Child view calls popupPanel in main mode using the above call. I'm not sure what is wrong. Any pointers would be appreciated.

Here are the pages that I have:

First page:

<!DOCTYPE html>
<html lang="en"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:richext="http://java.sun.com/jsf/composite/richext">
    <h:head>
        <title>Page Title</title>

    </h:head>
    <h:body>

     <ui:include id="nextPageInclude" src="secondpage.xhtml"/>   
    <rich:popupPanel id="logoutDialogId"
                 width="300"
                 height="50"
                 autosized="true"
                 resizeable="false"
                 moveable="true"
                 modal="true"
                 style="border:5px solid #5e81ac; background-color:#dce3ed;">

        <h:outputText value="Inside logout window"/>
    </rich:popupPanel>

    </h:body>
</html>

Second page:

<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">
    <h:head/>
    <a4j:outputPanel id='headerLinks' layout="block">
        <ul id="sddm">
            <li>
            </li>
            <li>
            </li>
            <li>
                <a4j:commandLink id="logoutLinkId"
                                 value="Logout"
                                 onclick="Richfaces.showPopupPanel('logoutDialogId')"
                                 styleClass="linkLogout"/></li>

        </ul>
        <div style="clear:both"></div>
    </a4j:outputPanel>
</ui:composition>

EDIT: Attached JS screenshot uploaded

enter image description here

Thank,

+5
source share
2 answers

<h:head> . HTML-. <h:head> .

, Filter, URL- , , , . HTML, <script> , F12 Firebug/Chrome/IE9 Net ( Network), , JS.


: RichFaces F, RichFaces. .

+2

, RichFaces 4.0 popupPanel, , , , , : -

<a4j:commandLink id="logoutLinkId"
    value="Logout"
    onclick="#{rich:component('logoutDialogId')}.show();"
    styleClass="linkLogout"/>

, popupPanel,

<a4j:commandLink id="Close_Modal"
    value="Close Logout"
    onclick="#{rich:component('logoutDialogId')}.hide();"
    styleClass="linkLogout"/>
+8

All Articles