cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <g...@tuffmail.com>
Subject Re: How to enable the Flowscript Debugger in C2.2 OR how to set properites on avalon components in C2.2?
Date Mon, 30 Jun 2008 14:30:07 GMT
Gabriel Gruber pisze:
> 
> Hi All,
> 
> ... as I didn't get any answer from the user list, I try it again on the 
> developers list:
> just a simple question: how can I enable the flowscript debugger in 
> Cocoon 2.2?
> 
> I built a simple cocoon block using the maven archetype. Flowscript is 
> in the dependency list inside the pom.xml
> How can I now enable the flowscript debugger?
> 
> I talked to Rainhard already and he suggested to "springify" the 
> flowscript block in order to have configuration properties again. 
> However I am a bit surprised as there should be some kind of 
> configuration option for "oldstyle" avalon components, which are living 
> inside a standard block of cocoon 2.2

Yep, that's preferred option but requires some work.

> In cocoon 2.1x I used to patch my cocoon.xconf to get the desired 
> behavior, but in C2.2 I shouldn't touch those files anylonger. (I just 
> reference the flowscript block as dependency) How can I not enable the 
> flowscript debugger? (without having to modify the original block)
> 
> what I tried (without success):
> - copying the cocoon-flowscript.xonf to my own avalong configuration files

What was the name and location of your file? AFAIR configuration files are read in lexical
order and 
overriding will happen only if your file is read as a second one.

> - I tried properties like "javascript.debugger=enabled" with the 
> Cocoon/spring configuration API (but I doubt that properties of avalon 
> components can be set that way)

To be honest, I'm not sure if our Avalon-Spring bridge supports property-based configuration

overriding. Will have a look into this issue tomorrow.

> Excerpt from 
> */cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/resources/META-INF/cocoon/avalon/cocoon-flowscript.xconf*
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- SVN $Id$ -->
> <components>
>  <flow-interpreters default="javascript">
>    <component-instance name="javascript"
>                        logger="flow"
>                        exported="false"                       
>  class="org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter">
>     
>  <load-on-startup>resource://org/apache/cocoon/components/flow/javascript/fom/fom_system.js</load-on-startup>
>      <!--
>        <reload-scripts>true</reload-scripts>
>        <check-time>4000</check-time>
>        -->
>      <!-- JavaScript Debugger support -->  
>      <!-- <debugger>enabled</debugger> -->  
>    </component-instance>
>  </flow-interpreters>
>  
> </components>
> 
> Any Suggestions? Or am I missing something?,

The easiest (and the most reliable) option is to modify original configuration file so it
looks like:
<!-- JavaScript Debugger support -->
<debugger>${flow.javascript.debugger}</debugger>

Then file with default value for this property would have to be created.

However, this involves making a new release of flowscript block.

Let me know if using different file name helps.

-- 
Grzegorz Kossakowski

Mime
View raw message