As I suspected.
In Merlin, the "key" is not the "name" in the lookup().
Since you require more precise lookup() control than the built-in automatic
one (which resolves it to WidgetB in your case, and at least for now),
you will need to manually wire the key to the component.
So, you add a <dependencies> to the "Criterias" (singular=Criterium,
pluralis=Criteria), so;
<component name="Criterias" class="CriteriaSelectorImpl"
activation="startup">
<dependencies>
<dependency key="WidgetA" source="WidgetA" />
<dependency key="WidgetB" source="WidgetB" />
<dependency key="WidgetC" source="WidgetC" />
</dependencies>
</component>
See http://avalon.apache.org/merlin/starting/tutorial/dependencies/manual.html
for further details.
Niclas
On Thursday 26 February 2004 00:14, Florian I. Hayd wrote:
> Here ist the block.xml. Hope that helps
>
> <container name="sms">
> <classloader>
> <classpath>
> <repository>
> <resource id="avalon-framework:avalon-framework-impl"
> version="4.1.5"/> ......
> </repository>
> </classpath>
> </classloader>
>
> <component name="SMSstarter" class="SMSKernel" activation="startup"/>
>
> <component name="EventListeners" class="ListenerProvider"/>
> <component name="ChannelEventListener" class="ChannelListener"/>
> <component name="DbEventListener" class="DbEventListener"/>
>
> <component name="Criterias" class="CriteriaSelectorImpl"
> activation="startup"/>
> <component name="WidgetA" class="WidgetA"/>
> <component name="WidgetB" class="WidgetB"/>
> <component name="WidgetC" class="WidgetC"/>
>
> <component name="ErrorCommand" class="ErrorCommandResolver"/>
> </container>
>
> Thr ErrorCommand call on the Criterias to resolve the widgets or called the
> widgets itself.
>
> Ciao
> Florian
>
> Von: Niclas Hedhman [mailto:[EMAIL PROTECTED]
>
> On Wednesday 25 February 2004 23:54, Florian I. Hayd wrote:
> > When I call on the selector with a sequence of hints "WidgetA",
>
> "WidgetB",
>
> > "WindgetC"
> > the selector always returns WidgetB even though it recognizes the hint
> > correctly. It just returns the wrong component.
>
> Can you send in the block.xml as well?
>
> I suspect that you haven't declared the key->component mapping properly.
>
> Niclas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
+---------//-------------------+
| http://www.bali.ac |
| http://niclas.hedhman.org |
+------//----------------------+
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]