tags:

views:

322

answers:

2

I am trying to do something which I would've thought was very simple, but it's causing me a huge headache. I am using Grails ui plugin to get a dialog box. I have a number of instances - some where dialog boxes need to appear when a button is clicked. This I have got working. But I also need to have some that appear when the page is loaded... for information / warning purposes. But I'm struggling with this.. What should I put as the trigger? I don't want the user to have to click anything before the dialog appears.

Also - has anyone successfully managed to change the style of the gui:dialog ? Mine was originally appearing as text with an invisible background before I added the class=yui-skin-sam to the main.gsp body, but that's had to replace the existing style class I already had on the body! how frustrating !!

A: 

It's supposed to 'just appear' if there's no trigger, from what I understand (and watching a slideshare from matthew taylor). However, it's not working for me either. The dialog is there, but it's got a style of 'visibility: hidden' on it, and I can't find a way to get right of that.

mgkimsal
A: 

Had the exact same problem... got it working by adding "visible=show" to the dialog's attributes. Example:

<gui:dialog title="Modal Dialog" modal="true" visible="show"> This message will appear in a modal dialog when the page loads. </gui:dialog>

werner5471