cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Setting up Selectors...
Date Wed, 06 Oct 2004 11:05:55 GMT

Gang,

I can't find how to set up Selectors. Any pointers?

Case;

Cocoon Block.

ImageOpReader can be stacked with a set of ImageOperations, each defined as a 
separate component, with its own configuration.

ImageOpReader is supposed to look up a ImageOperationSelector, which will be 
selected by name.

I did;
  <role name="org.apache.cocoon.reading.imageop.ImageOperationSelector"
        shorthand="image-operation"
        default-class="org.apache.cocoon.components.ExtendedComponentSelector" 
  >
    <hint shorthand="scale" 
class="org.apache.cocoon.reading.imageop.ScaleOperation"/>
    <hint shorthand="convolve" 
class="org.apache.cocoon.reading.imageop.ConvolveOperation"/>
  </role>  

in a .xroles file, and then have a 
m_OperationSelector = (ComponentSelector) man.lookup( ImageOperation.ROLE + 
"Selector" );

and later the 
ImageOperation op = (ImageOperation) m_OperationSelector.select( type );

But I get the message 
"UnnamedSelector: ComponentSelector could not find the component for hint 
[scale] (key [scale])"
and a very 'inconclusive' stack trace.


What am I missing?


Cheers
Niclas


What else is there to it?
-- 
   +------//-------------------+
  / http://www.bali.ac        /
 / http://niclas.hedhman.org / 
+------//-------------------+


Mime
View raw message