on 08-18-2004 4:28 PM
Hi
I am making some experiments with message pool.
Is it possible to reuse messages? Is it related with components reuse?
[]
Hi Ronaldo,
yes, if you have added the component usage of Component A to component B the message pool (IMessageXXX interface) of A is known by B, you can access it by
wdComponentAPI.getMessageManager().reportMessage(IMessageA.ERROR_MESSAGE, null, false);
for example.
<b>Correction</b>:
Sorry i've forgotten temporarily:
This is not possible this way, since the calling component cannot access the message texts in the resource bundles of the defining component. You must get access to the IWDMessageManager instance of the component which has defined the message (maybe by exposing the message manager of A in a method getExtMessageManager() of the interface controller of A).
So the call would look like
wdThis.wdGetAInterface().getExtMessageManager().
reportMessage(IMessageA.ERROR_MESSAGE, null, false);
Hope that helps.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.