Is there any good solution to fire event from child RDC to parent RDC excluding event in SUBSCRIBER scope?

Details: I frequently encounter situation when I have some RDCs loaded into RDisplay component which have to "communicate" with their parent (RDC where RDisplay located) What is the best way to do this?

asked 18.11.2010 at 11:43

Andriy%20Petrivskyy's gravatar image

Andriy Petri...
(suspended)
accept rate: 25%


There is no direct solution tailored for your situation. Applications that are built from RichDialogs are in principle loosely coupled components that correspond through broadcasts with each other.

I see two solutions that you could use (both are assuming that your parent dialog is the one that creates the inner dialogs on it's own display)

1) You can provide the inner dialogs with a key (random for current session or static) that they send along with the broadcast. Broadcast receivers can then check the key of the event and thus find out, if it is intended for them.

2) You can create a hidden button on the parent. Hand this button to the children dialogs. If they wish to communicate with the parent they may push the button, which will invoke an event process in the parent that is associated with this button. This solution does not permit to hand along any event parameters, it is simply a notification. This second solution is not really best practice, it should be seen as a work around, that you could try out (I never used this myself, I'd use solution #1).

link

answered 19.11.2010 at 03:17

Kaspar%20von%20Gunten's gravatar image

Kaspar von G...
(suspended)
accept rate: 100%

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:

×40
×10

Asked: 18.11.2010 at 11:43

Seen: 2,116 times

Last updated: 18.11.2010 at 11:43