You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by James Clinton <Ja...@patsystems.com> on 2008/06/13 14:17:18 UTC

RE: modalDialog> + facelets

This only works in FF as far as I know.  Are you using IE?

 

RichFaces has a modal which works in both browsers, this sits well with Tomahawk too...

 

________________________________

From: Angel Miralles Arevalo [mailto:anmiralles@yahoo.es] 
Sent: Friday, June 13, 2008 11:07 AM
To: users@myfaces.apache.org
Subject: <s:modalDialog> + facelets

 

Hey everybody, I'm trying to integrate tomahawk with facelets, following the steps:

 

1. Create "sandbox.taglib.xml"

2. Define it on "web.xml":

        

<!-- Tomahwak/Sandbox con facelets -->

<context-param>

<param-name>facelets.LIBRARIES</param-name>

<param-value>/WEB-INF/tomahawk.taglib.xml;/WEB-INF/sandbox.taglib.xml</param-value>

</context-param>

 

3. Specify tags:

 

<tag>

    <tag-name>modalDialog</tag-name>

    <component>

        <component-type>org.apache.myfaces.ModalDialog</component-type>

        <renderer-type>org.apache.myfaces.ModalDialog</renderer-type>

    </component>

</tag>

 

4. Use tag:

 

<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"

    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:s="http://myfaces.apache.org/sandbox"

    xmlns:xxx="/WEB-INF/xxx.tld"

    version="2.0">

 

<ui:composition>

    <s:modalDialog dialogId="FormUsuario" dialogVar="dojoDialogUsuario" 

                       dialogAttr="bgColor='white' bgOpacity='0.5' toggle='fade' toggleDuration='250'"

                       hiderIds="guardar" styleClass="">

    <h:form id="AutorizacionUsuarioForm">

        <h:panelGrid cellpadding="0" cellspacing="0" border="0" columns="1" styleClass="porcen60">

            <h:panelGroup>

                <t:outputText value="#{msg.autorizacion_usuario_usuario}"></t:outputText> 

                <t:inputText value="#{autorizacionUsuarioBean.strUsuario}" size="25"/>

            </h:panelGroup>

            <h:panelGroup>

                <t:commandButton id="guardar" forceId="true" value="#{msg.boton_guardar}" onclick="dojo.widget.byId('FormUsuario').hide();"/>

            </h:panelGroup>

        </h:panelGrid>

    </h:form>

    </s:modalDialog>

 

    

    <h:form id="AutorizacionForm">

            .......

            <t:commandLink onclick="dojoDialogUsuario.show();">

                    <h:graphicImage value="/img/detalles/candado.gif" styleClass="mano"/>

            </t:commandLink>

            .........

    </h:form>

</ui:composition>

</jsp:root>

 

 

 

 

But I don´t get it working, always javascript problem: "dojoDialogUsuario" doesn't exists. Moreover when I display the view the modal dialog is on the screen, it isn't hide.

I use other sandbox components like <s:pprPanelGroup> and it works perfectly.

 

Any idea what's happening?

 

Thanks in advanced.

 

 

________________________________


Enviado desde Correo Yahoo! <http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http:/us.rd.yahoo.com/evt=52431/*http:/es.docs.yahoo.com/mail/overview/index.html> 
La bandeja de entrada más inteligente.


DISCLAIMER: This e-mail is confidential and may also be legally privileged. If you are not the intended recipient, use of the information contained in this e-mail (including disclosure, copying or distribution) is prohibited and may be unlawful. Please inform the sender and delete the message immediately from your system.  This e-mail is attributed to the sender and may not necessarily reflect the views of the Patsystems Group and no member of the Patsystems Group accepts any liability for any action taken in reliance on the contents of this e-mail (other than where it has a legal or regulatory obligation to do so) or for the consequences of any computer viruses which may have been transmitted by this e-mail. The Patsystems Group comprises Patsystems plc and its subsidiary group of companies.