HI Werner,
 
Thanks!
 
When user clicks a button, a dialog popup for user to select a node from a tree2.
After user clicks a node, the dialog closes and change the value(tree path) on the master window.  (eg.  root > node1 > node11 > node112)
 
I prefer the _javascript_ way because of better user experience.
If you demo all three ways, it would be great!.
 
Dave


Werner Punz <[EMAIL PROTECTED]> wrote:
Dave schrieb:
> Hello,
>
> Could anyone help me get started with sandbox modal dialog?
>
> How to open a ModalDialog when clicking a button?
> How to get the value(entered in modal dialog) back to the parent
> window?
>
I think the best way to get you kickstarted on that one is to check out
the latest trunk sandbox demo!
To open it you simply have to set a small _javascript_ on an onclick (the
_javascript_ var can be defined, otherwise it is automatically determined)


Then you have three ways to get the values back:

a) either use a form submit (from a form within the dialog)
you can use partial page rendering to avoid page refreshes

b) move the values from the dialog into the master view, the _javascript_ way

c) go the full refresh cycle, by simple using jsfs submit mechanisms

either way, you have to be aware, that the dialog has to be defined
outside of a form, this is a _javascript_ limitation which is caused by a
severe ie positioning bug (the ie expects floating elements at the end
of the begin of a body otherwise the positioning fails under certain
conditions)

so you have to embed the form element in the dialog if you want to use it.

If you have multiple forms on the page, you might consider using the
saveState component or the scope component to preserve the values
outside of the forms affected by the refresh!

Anyway, if you can wait for a few days I will do a crud example which
utilizes all this (not the dialog but the floating frames which are very
similar) to achieve a rich client behavior within a web ui.
I already have reserved my weekend to do the demo.



Access over 1 million songs - Yahoo! Music Unlimited.

Reply via email to