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" alt text

In HTML view I have a button to call a method from backing bean "Bean" alt text Now what we need to how to trigger method "run" from the backing bean alt text

We can achieve this only when the method belongs to an Ivy component by using something like this alt text 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?

asked 04.12.2019 at 04:53

hieulam's gravatar image

hieulam
(suspended)
accept rate: 0%

edited 04.12.2019 at 04:54

Did you consider to write the run method in this bean (ivy script content in the bean method run)? With this approach you can run this method easily from the bean and from the htmldialog too (e.g #{bean.run()})

Kind regards lukas

(05.12.2019 at 09:48) Lukas Lieb ♦♦ Lukas%20Lieb's gravatar image

Thank Lukas for your suggestion. Moving the logic from ivy script to bean works for me but impossible in my situation because the method from HTML dialog contains a whole workflow with many ivy's elements. That means moving HTML dialog method to java is impossible

(05.12.2019 at 21:20) hieulam hieulam's gravatar image

Hmm... You may try to run an EL expression from you java bean like this:

FacesContext context = FacesContext.getCurrentInstance();
FacesContext.getCurrentInstance().getApplication().evaluateExpressionGet(context, "#{logic.run()}", String.class);
link

answered 06.12.2019 at 03:44

Lukas%20Lieb's gravatar image

Lukas Lieb ♦♦
4412412
accept rate: 61%

edited 06.12.2019 at 03:45

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×147
×16

Asked: 04.12.2019 at 04:53

Seen: 1,824 times

Last updated: 06.12.2019 at 03:45