How can I call a method of a JSF-component dialog from the surrounding parent dialog?

asked 16.02.2015 at 11:31

SupportIvyTeam's gravatar image

SupportIvyTeam ♦♦
1.4k102118122
accept rate: 77%


Yes, thats possible:

in the child component you have to declare a p:remoteCommand that executes the child component logic. The name of this remoteCommand should be defined by a component interface attribute:

< cc:interface componentType="IvyComponent">
  < cc:attribute name="callbackName" />
< /cc:interface>
< cc:implementation>
  < p:remoteCommand name="#{cc.attrs.callbackName}" actionListener="#{logic.execMyComponentLogic}"/>
< /cc:implementation>

The parent dialog can then embedd the component-dialog and define the name of the child callback method. And bind it to an oncomplete action of a commandButton:

< ic:jsf.call.child.logic.ChildDialog callbackName="callChild" />
< p:commandButton value="call child logic" oncomplete="callChild();"/>
link

answered 16.02.2015 at 11:37

Reguel%20Wermelinger's gravatar image

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

edited 16.02.2015 at 11:47

Your answer
toggle preview

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: 16.02.2015 at 11:31

Seen: 2,632 times

Last updated: 16.02.2015 at 11:47