Hello ivy team, is it possible to "broadcast" a button click event to a parent window in jsf? We would like to create a toolbar (save, cancel, continue) in a seperate Dialog in order to reuse it later. The toolbar is a child dialog of the main window. If I click a button in the toolbar which is connected to an "Exit End", the main window will not be closed. What is the best way to fix this?

asked 09.11.2015 at 13:34

Florian%20Heinrich's gravatar image

Florian Hein...
(suspended)
accept rate: 0%


A JSF component can by design not close itself.

But its possible to pass a callback method from the parent logic into the child component. See HtmlDialogDemos/ComponentEventListenerDemo.ivp

link

answered 09.11.2015 at 15:38

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
9.4k31958
accept rate: 70%

edited 09.11.2015 at 16:32

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
4.9k202857

Thank you for your quick reply. But the example code fires only the callback event. The logic from the child component should be executed first. Is that possible?

(10.11.2015 at 08:09) Florian Hein... Florian%20Heinrich's gravatar image

Yes this is possible. I modified the view a little bit so that it calls a logic event of the local component. And in a script step it's possible to evaluate the actionListener from the parent and call it. See the screenshot

re-fire event

(12.11.2015 at 09:54) Reguel Werme... ♦♦ Reguel%20Wermelinger's gravatar image

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:

×79
×58

Asked: 09.11.2015 at 13:34

Seen: 2,422 times

Last updated: 12.11.2015 at 09:54