<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