Announcement

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

    Calling Javascript from smartGWT

    Hi,

    We are using SmartGWT Pro 3.0 version. I am calling one javascript method from my java code on mouse-over event, how we can pass the generated event object from java to javascript method?

    Thanks.

    #2
    Please refer to the core GWT documentation on JSNI.

    Comment


      #3
      Hi,

      I referred JSNI document but didn't found on how to pass the mouse event object to javascript from java.
      URL : https://developers.google.com/web-to...dingBasicsJSNI

      Can you please give the exact url if you are referring to something else.

      Thanks
      Last edited by fairoz172; 17 Sep 2012, 00:28.

      Comment


        #4
        You're at the right URL, but if you're not aware of basics of JavaScript event handling, then you'll need to read some further reference material - w3Schools.com is a popular one.

        We're not sure how this is related to SmartGWT at all, and you should note, it's not normal to be doing what you're doing. It would normally be something you might attempt if integrating a third-party JavaScript library.

        Comment


          #5
          I am aware of basic event handling of javascript but the question was how this event can be passed from Java code to Javascript. Reason of asking the question in this forum because we were of the impression that smartGWT might have definately considered this scenario and would have provided some utility class to pass / convert this java mouse-event object to javascript object.

          Comment


            #6
            Neither core GWT nor SmartGWT attempts to do this. JSNI allows you to communicate simple types (Strings, Numbers, etc) between Java and JavaScript - use this to pass the information from the event that you need.

            But again bear in mind, this is something you would ordinarily only do when integrating with third-party JavaScript. If that's not your use case, you may be doing something unnecessary.

            Comment

            Working...
            X