cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: Setting up Selectors...
Date Thu, 07 Oct 2004 07:51:04 GMT

Sorry for being so dense, and thanks for your patience.

On Wednesday 06 October 2004 19:56, Vadim Gritsenko wrote:

> Or without roles file:
>
>    <component
> role="org.apache.cocoon.reading.imageop.ImageOperationSelector"
> class="org.apache.cocoon.components.ExtendedComponentSelector"
> <component-instance name="scale"
>        class="org.apache.cocoon.reading.imageop.ScaleOperation"/>
>      etc
>    </component>

After the above, it doesn't find the Selector either (which was the case 
earlier).
The Exception occurs in the lookup() of ImageOpReader.compose();

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

and says
    
Could not find component (key 
[org.apache.cocoon.reading.imageop.ImageOperationSelector])


The cocoon.xconf now contains;
<!--..... Start configuration from 'imageop' -->
   <!-- =============== Image Operations ==================== -->
    <image-operations>
      <component 
class="org.apache.cocoon.components.ExtendedComponentSelector" 
role="org.apache.cocoon.reading.imageop.ImageOperationSelector">
             
        <component-instance 
class="org.apache.cocoon.reading.imageop.ScaleOperation" name="scale"/>

        <component-instance 
class="org.apache.cocoon.reading.imageop.ConvolveOperation" name="convolve"/>
      </component>
    </image-operations>
<!--..... End configuration from 'imageop' -->

And the root sitemap has the following readers defined;

    <map:reader logger="sitemap.reader.image" name="image-op-scale" 
src="org.apache.cocoon.reading.imageop.ImageOpReader">
      <effects>
        <op prefix="scale-" type="scale"/>
      </effects>
    </map:reader>
  
    <map:reader logger="sitemap.reader.image" name="image-op-sharpen" 
src="org.apache.cocoon.reading.imageop.ImageOpReader">
      <effects>
        <op prefix="convolve-" type="convolve"/>
      </effects>
      <map:parameter name="convolve-height" value="3"/>
      <map:parameter name="convolve-width" value="3"/>
      <map:parameter name="convolve-data" value="0.0, -1.0, 0.0, -1.0, 5.0, 
-1.0, 0.0, -1.0, 0.0"/>
    </map:reader>


Wish I can get this done and out of the door into the Cocoon repo. :o)
Perhaps I should send along the entire block?

Well, meanwhile I guess I add some more funky operations.

Cheers
Niclas
-- 
   +------//-------------------+
  / http://www.bali.ac        /
 / http://niclas.hedhman.org / 
+------//-------------------+


Mime
View raw message