Niclas Hedhman wrote:
On Thursday 07 October 2004 18:19, Vadim Gritsenko wrote:


I don't think ecm supports nested selectors. image-operations is a
selector, right? And you are nesting another one? Are you sure you need
this?


I apparently don't know what I am doing. Here are the relevant pieces of code (which is accurate);

public void compose( ComponentManager man )
throws ComponentException
{
m_OperationSelector = (ComponentSelector) man.lookup( "org.apache.cocoon.reading.imageop.ImageOperationSelector" );
}



private void configureEffects( Configuration conf )
throws ConfigurationException, ComponentException
{
m_EffectsStack = new ArrayList();
Configuration[] ops = conf.getChildren( "op" );
for( int i=0 ; i < ops.length ; i++ )
{
String type = ops[i].getAttribute( "type" );
String prefix = ops[i].getAttribute( "prefix", type + "-" );
ImageOperation op = (ImageOperation) m_OperationSelector.select( type );
op.setPrefix( prefix );
m_EffectsStack.add( op );
}
}


Both are in the ImageOpReader.
configureEffects called from configure(), with the "<effects>" child as an argument (all that verified working earlier).


I just need a way to lookup the ImageOperations that are defined.

Should be dirt simple.... if I had some more experience with Cocoon/ECM. :o(

It is simple, if you ask me ;-) This should work: <image-operations> <component-instance class="o.a.c.FooOperation" name="foo"/> </image-operations>

Where image-operations is selector. See <input-modules/> as example - you need something similar, AFAIU.

Vadim

Reply via email to