Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Can i get the SC.say Dialog but have my own clickhandlers?

    OK, so here is a pretty basic question..

    I use SC.say/ask etc. quite extensively, works great and nice not having to fiddle with height depending on the amount of text. However, it always uses booleancallback for the buttons, and now i'm in a scenario where i need a clickhandler.

    (the reason: I can't close a separate tab from a booleancallback in Safari, because it decides that i'm in a different context when your clickhandler has called my booleancallback. and doesn't allow me to close it. It works if i throw up my own window and do the same code inside the clickhandler)


    In the smart client docs here:
    https://smartclient.com/smartclient-...=class..Dialog

    a Dialog class is mentioned, but that class doesn't seem to be mapped in Smartgwt?

    So i'm basically wondering if there is some way for me to use your pre-configured dialogs but having my own click handlers?

    #2
    The Dialog class is present in SmartGWT and that is the correct way to build a custom Dialog. The built-in Dialogs are not set up as subclassable Dialogs as they are too trivial for that.

    Comment


      #3
      Yeah sorry, i looked around in the javadocs but apparently not the right package. I see the Dialog now, and yeah, it seems great. thanks. (i did know about it, but haven't used in ages, mostly been using windows or SC,ask/say)

      On that topic though. in your example in the javadoc, you just close it. Is there any point to call destroy() too for dialogs and windows? I usually do that where i'm not going to show it anymore, but does it really make a difference? i suck at javascript.

      Comment


        #4
        It's not really a strange JavaScript thing. Hide()ing the Window hides it, and it's still around, and be used later via show(). destroy() gets rid of it permanently.

        Comment

        Working...
        X