<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How to call HTML dialog's method from java</title><link>https://answers.axonivy.com/questions/4230/how-to-call-html-dialog-s-method-from-java</link><description>&lt;p&gt;Dear Ivy team
I would like to know is there any way to trigger a HTML dialog from java code.
Lets me describe the situation:
I have a page that contains a method named "run"
&lt;img alt="alt text" src="https://answers.axonivy.com/upfiles/2019-12-04_16h47_35.png"&gt;&lt;/p&gt;
&lt;p&gt;In HTML view I have a button to call a method from backing bean "Bean"
&lt;img alt="alt text" src="https://answers.axonivy.com/upfiles/2019-12-04_16h48_42.png"&gt;
Now what we need to how to trigger method "run" from the backing bean
&lt;img alt="alt text" src="https://answers.axonivy.com/upfiles/2019-12-04_16h49_17_Xq1duAv.png"&gt;&lt;/p&gt;
&lt;p&gt;We can achieve this only when the method belongs to an Ivy component by using something like this
&lt;img alt="alt text" src="https://answers.axonivy.com/upfiles/2019-12-04_16h52_34.png"&gt;
Unfortunately, this way only work for Ivy's component, not for the page. 
So my question is do we have any way to call HTML dialog's method from java?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/4230/how-to-call-html-dialog-s-method-from-java" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 06 Dec 2019 03:44:51 -0500</lastBuildDate><item><title>Answer by Lukas Lieb</title><link>https://answers.axonivy.com/questions/4230/how-to-call-html-dialog-s-method-from-java/4248</link><description>&lt;p&gt;Hmm... You may try to run an EL expression from you java bean like this: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;FacesContext context = FacesContext.getCurrentInstance();
FacesContext.getCurrentInstance().getApplication().evaluateExpressionGet(context, "#{logic.run()}", String.class);
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lukas Lieb</dc:creator><pubDate>Fri, 06 Dec 2019 03:44:51 -0500</pubDate><guid>https://answers.axonivy.com/questions/4230/how-to-call-html-dialog-s-method-from-java/4248</guid></item></channel></rss>