Hi,

ok the "has no properties" -problem I´ve solved.
Now the forceId feature isn`t avaible to me. Cause 1.2 RI.
But what is the problem to the firefox browser? No Dialog appears... 
In IE the modal dialog appearing and behavior is excellent without any 
js-errors.

Perhaps the show() method have a problem on firefox?

Firefox have those errors:
bad srcObj for srcFunc: onclick ----- dojo.js (line 94)
node has no properties ---------------dojo.js (line 5616)

mfg DaWorm


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

The

document.getElementById("cancel") has no properties

error steems from the fact, that you are using no forceId attribute,
consequently the real clientId is completely different. OutputLink is
only needed for opening the dialog. Inside the dialog container you
can use common commandLink components.

Which version of sandbox are you using?

Exactly the same approach works fine to me in firefox and IE, but in
jsp and myfaces (so no 1.2 impl), but this should not matter.

cheers,

Gerald

On 12/20/06, Worm, Danny <[EMAIL PROTECTED]> wrote:
> <div id="content">
> <h:outputLink 
> onclick="dojoDialog.show();document.getElementById('cancel').focus();" 
> value="#">Hello</h:outputLink>
>
> <s:modalDialog dialogId="dialog" dialogVar="dojoDialog"
>     dialogAttr="bgColor='white' bgOpacity='0.5' toggle='fade' 
> toggleDuration='20'" hiderIds="cancel" styleClass="dojoDialog">
>
>   <h:outputLink id="cancel" value="#">CloseDialog</h:outputLink>
> </s:modalDialog>
> </div>
>
> The behaviour is he same. After clicking the "Hello" Link the browser-window 
> I get vertical and horizontal scrollbars, why? In IE it is the same behaviour 
> but there appears the dialog.
>
> When I enter the page I get this JS - Error in Firefox:
> bad srcObj for srcFunc: onclick  ------------ dojo.js (line 94)
>
> After clicking the link to display the dialog I get these errors:
> 1. document.getElementById("cancel") has no properties
> 2. node has no properties -------------- dojo.js (line 5616)
>
>
> --------------------------------------------------------------------------
> Gerald 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 <[EMAIL PROTECTED]> 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
>


-- 
http://www.irian.at

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

Professional Support for Apache MyFaces

Reply via email to