Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Invoke java-methods after rendering
henningp
Is it possible to invoke a java method on runtime? <br />
<br />
I tried using a text item like this:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><script>
function disableAccessCheck(var id) {
missingBugIdProvider = new Packages.MissingBugIDProvider();
missingBugIdProvider.disableAccessCheckForTaskId(id);
}
</script>
<a href="#" onClick="disableAccessCheck(<VALUE-OF>row["taskid"]</VALUE-OF>)">Add</a></pre>
I'm not trying to invoke a java method in a scripted dataset (this works fine), I want it to invoke when the user clicks on this text-item.<br />
<br />
But this doesn't work. Any Ideas?<br />
<br />
Thanks in advance.
Find more posts tagged with
Comments
CBR
This is not possible.
You can only invoke a java method in Rhino Script. Rhino Script is a server side java script dialect. The name java script is totally missleading because it has nothing to do with client side java script.
What you are trying to do is to invoke a java method inside client side java script. To invoke a java method you have to have a interaction with the server. What you can do is to create a hyperlink that calls a servlet on the server which invokes the java method on the server.
henningp
Hi CBR,
thanks for your answer and your explanation. I will solve it with a servlet then.