You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Stefan <do...@telig.net> on 2003/10/13 17:35:05 UTC

Flowscript with JXTemplate error: ...fom_system.js", line 5: The undefined value has no properties.

Hi,

even the most simple flowscript in conjunction with JXTemplates throws 
the following exceptions

"resource://org/apache/cocoon/components/flow/javascript/fom/fom_system.js", 
line 5: The undefined value has no properties.
org.mozilla.javascript.EvaluatorException: 
"resource://org/apache/cocoon/components/flow/javascript/fom/fom_system.js", 
line 5: The undefined value has no properties.
....

The application works but throws the exception above.

The sitemap
-----------

<?xml version="1.0"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:components>
     <map:generators default="file">
         <map:generator label="content,data"
		logger="sitemap.generator.jxt"
		name="jxt"
		src="org.apache.cocoon.generation.JXTemplateGenerator"/>
     </map:generators>
</map:components>

<map:flow language="javascript">
     <map:script src="flow.js"/>
</map:flow>

<map:pipelines>
     <map:pipeline>
         <map:match pattern="test">
             <map:call function="main" />
         </map:match>
         <map:match pattern="test.jxt">
             <map:generate type="jxt" src="start.xml" />
             <map:serialize type="xml" />
         </map:match>
     </map:pipeline>
</map:pipelines>

</map:sitemap>

The flow script
---------------
function main() {
     cocoon.sendPageAndWait("test.jxt" );
}


The "test.jxt"
--------------
<?xml version="1.0" encoding="UTF-8"?>
<test />


Any idea, any help? I did try with differen Versions Cocoon 2.1 and 
Cocoon 2.1.2 and cannot laocate an eror in my configuration. Neither the 
mailinglist archievs mention this problem.

It is possible to use the flow script with a usual file generator. The 
exception is only thrown, when I request the "test.jxt" page through the 
flow script.

Thank You
Stefan

-- 

Stefan
TELIG GmbH


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: Flowscript with JXTemplate error: ...fom_system.js", line 5: The undefined value has no properties.

Posted by Reinhard Poetz <re...@apache.org>.
From: Ugo Cei

> Reinhard Poetz wrote:
> >       cocoon.sendPageAndWait("test.jxt" {} );
> 
> I think there's a comma missing here: ---^


Thanks for spotting this! 
Of course the arguments need to be separated with a comma.

Reinhard


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Flowscript with JXTemplate error: ...fom_system.js", line 5: The undefined value has no properties.

Posted by Ugo Cei <u....@cbim.it>.
Reinhard Poetz wrote:
>       cocoon.sendPageAndWait("test.jxt" {} );

I think there's a comma missing here: ---^

	Ugo


-- 
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: u.cei@cbim.it


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: Flowscript with JXTemplate error: ...fom_system.js", line 5: The undefined value has no properties.

Posted by Reinhard Poetz <re...@apache.org>.
From: Stefan
 
> Hi,
> 
> even the most simple flowscript in conjunction with 
> JXTemplates throws 
> the following exceptions
> 
> "resource://org/apache/cocoon/components/flow/javascript/fom/f
> om_system.js", 
> line 5: The undefined value has no properties.
> org.mozilla.javascript.EvaluatorException: 
> "resource://org/apache/cocoon/components/flow/javascript/fom/f
> om_system.js", 

<snip/>

> The flow script
> ---------------
> function main() {
>      cocoon.sendPageAndWait("test.jxt" );

if you don't pass objects to the view layer you have to add emtpy
brackets which creates an empty map:

      cocoon.sendPageAndWait("test.jxt" {} );

HTH
Reinhard


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org