Topic
2 replies Latest Post - ‏2012-09-28T04:36:47Z by PrakashRaj
PrakashRaj
PrakashRaj
3 Posts
ACCEPTED ANSWER

Pinned topic Can we use LinkedJavaObject java file constants inside a Javascript builder

‏2012-09-27T12:59:44Z |
Hi,
Im using WPF 6.1.5. I want use a java file constant in a Javascript builder. I added Linked Java aObject builder for that java file. Using webappaccess.callmethod in js builder its not possible.Suggest any other possibility.
Updated on 2012-09-28T04:36:47Z at 2012-09-28T04:36:47Z by PrakashRaj
  • SystemAdmin
    SystemAdmin
    9029 Posts
    ACCEPTED ANSWER

    Re: Can we use LinkedJavaObject java file constants inside a Javascript builder

    ‏2012-09-27T14:02:27Z  in response to PrakashRaj
    You can use the indirect syntax In the JavaScript builder to have server side code insert the appropriate JavaScript code -- in your case, a constant -- in your JavaScript.

    In JavaScript builder, your code would be something like this:

    var myJavaScriptVar = "${MethodCall/someMethodInYourModelThatReturnsConstant}";
    • PrakashRaj
      PrakashRaj
      3 Posts
      ACCEPTED ANSWER

      Re: Can we use LinkedJavaObject java file constants inside a Javascript builder

      ‏2012-09-28T04:36:47Z  in response to SystemAdmin
      Hi Sam,
      there will be several constants/fields initialized in my java file. We can't have method for each field or we can't have single method which could check and return a single specific constant/field.