myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Worm, Danny" <Danny.W...@c1-fincon.de>
Subject AW: Source of the sandbox examples
Date Wed, 20 Dec 2006 15:26:38 GMT
Hi,

yes your right, I delete the focus() line. Now I try to find a solution for that problem.


This is my last state. This lines works in IE, but not in Firefox.
Problem: no Dialog appear in Firefox (just opacity)


      <script>
        var callMe = function() {
          alert(dojoDialog.showModalDialog);
          dojoDialog.showModalDialog();
        }
      </script>
    
      <div id="content">
        <s:modalDialog
          dialogId="dialogId"
          dialogVar="dojoDialog"
	      dialogAttr="bgColor='white' bgOpacity='0.5' toggle='fade' toggleDuration='20'"
     	  hiderIds="cancel_id"
	      styleClass="dojoDialog">
          <h:outputLink id="cancel_id" value="#" >CloseDialog</h:outputLink>
     	</s:modalDialog>

        <h:outputLink onclick="javascript:callMe();" value="#">
          hello
        </h:outputLink>

      </div>

Thanks for your help, perhaps I´ll be back with a solution :)

Kind regards
DaWorm


------------------------------------------------------------------
Gerald wrote:

Well, the focus() after the onclick event is only for convenience and
not really needed. You can also leave it out.

But for sure, a little enhancement for the component would be a good
idea in this case.

Are you sure there is no caching problem? Are you doing any js hacking
during page onload?

You can also try to put the dialog outside of the form, there was an
issue regarding this, but only if you want to have a form inside the
dialog.

cheers,

Gerald

On 12/20/06, Matthias Wessendorf <matzew@apache.org> wrote:
> is there no way to avoid all the js hacking by a user ... ?
>
> -M
>
> On 12/20/06, Gerald Müllan <bierbrauen@gmail.com> wrote:
> > The first change should be to replace the commandLink with the
> > outputLink. Otherwise you would do a post during showing the dialog.
> >
> > So, in your case:
> >
> > <h:outputLink onclick="dojoDialog.show();document.getElementById('cancel').focus();"value="#">
> >
> > Also, is the showModalDialog() js function the correct call? In the
> > examples, and also the way i use the dojo dialog is the show()
> > function call.
> >
> > Does this change anything?
> >
> > cheers,
> >
> > Gerald
> >
> > On 12/20/06, Worm, Danny <Danny.Worm@c1-fincon.de> wrote:
> > > Hi again,
> > >
> > > that´s great!
> > > I´m trying to integrate the sandbox with facelets and JSF 1.2(RI) with the
following steps:
> > >
> > > 1. put the latest sandbox jar in /WEB-INF/lib directory
> > > 2. register another facelets-taglib in web.xml
> > >
> > > <context-param>
> > >   <param-name>facelets.LIBRARIES</param-name>
> > >     <param-value>/WEB-INF/facelets-tomahawk.xml;/WEB-INF/facelets-sandbox.xml</param-value>
> > > </context-param>
> > >
> > > 3. add the modalDialog Tag to the facelets-sandbox.xml
> > >
> > >    <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. And register in the JSF - XHTML Site the sandbox namespace:
> > >
> > > <html ...
> > >    xmlns:s="http://myfaces.apache.org/sandbox"/>
> > >
> > > 5. Call the component:
> > >
> > > <h:form>
> > > <h:commandLink value="Edit"   onclick="dojoDialog.showModalDialog();document.getElementById('cancel').focus();"
/>
> > >
> > >                         <s:modalDialog
> > >                           dialogId="dialog"
> > >                           dialogVar="dojoDialog"
> > >                           dialogAttr="bgColor='white' bgOpacity='0.5' toggle='fade'
toggleDuration='20'"
> > >                           hiderIds="cancel"
> > >                           styleClass="dojoDialog">
> > >                           <t:commandButton id="cancel" forceId="true" value="Cancel"
/>
> > >                         </s:modalDialog>
> > > </h:form>
> > >
> > > These lines make the browser opacity, but don't display the dialog with the
button. But when the site loads initially the dialog appear shortly and immediately disappear.
> > >
> > > What is the Problem?
> > > Is there any sandbox configuration I forgot?
> > >
> > > I want this behaviour:
> > > http://www.irian.at/myfaces-sandbox/dojo/dojoDialog.jsf
> > >
> > > Kind regards
> > > DaWorm
> > >
> >
> >
> > --
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>


-- 
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Mime
View raw message