Hi; forst of all thanks for your answer.
I have changed my flow script in this way:

cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/v2/Form.js");
importPackage(Packages.it.eng.nikko.config.client);
importPackage(Packages.it.eng.nikko.config.dao.vo);
importPackage(Packages.it.eng.nikko.config.model);
importPackage(Packages.java.util);

importPackage(Packages.org.apache.log4j);

function confHome(){

  var log = Logger.getLogger( "Configurator.js" );

  log.info( "Getting all modules from interface inner class" );
  var modules = ( ( Collection )( Configuration.Conf.getModuleCollection() ) );
  var defConf = new Form("forms/defConf.xml");
  var bindingURI = cocoon.parameters["bindingURI"];
    if (bindingURI != null) {

        log.info( "bindingURI: "+ bindingURI );
        defConf.createBinding(bindingURI);
        log.info( "Binding created" );
    }
  log.info( "Loading form" );
  defConf.load( modules );
  log.info( "Loaded form with: ");
  log.info( "Form loaded" );
  defConf.showForm( "defConf.jxform" );
}

Mi binding file is:


<fb:context id="defConf" xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"; 
path="/">
  <fb:repeater id="modules" parent-path="." row-path="modules">
    <fb:identity>
      <fb:value id="id" path="@id"/>
    </fb:identity>
    <fb:on-bind>
      <fb:value id="nome" path="nome" direction="load"/>
      <fb:value id="ipAddress" path="ipAddress"/>
      <fb:value id="port" path="port"/>
      <fb:value id="webAppRoot" path="webAppRoot"/>
    </fb:on-bind>
    <fb:on-delete-row>
      <fb:delete-node/>
    </fb:on-delete-row>
    <fb:on-insert-row>
      <fb:insert-bean classname="it.eng.nikko.config.dao.vo.ConfigVO" 
addmethod="add"/>
    </fb:on-insert-row>
  </fb:repeater>
</fb:context>

My bean class is:

import java.io.Serializable;

import it.eng.nikko.config.dao.exception.ConfigVOException;

/**
 * <p>Title: NikkoCMS on demand</p>
 *
 * <p>Description: Progetto Nikko: costruzione di un Content Management System
 * on demand che offre la possibilit� di visualizzare contenuti nultimediali</p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: Engineering Ingegneria Informatica</p>
 *
 * @author Nikko Group
 * @version 1.0
 */
public class ConfigVO implements Serializable {

    private String id;
    private String ipAddress;
    private String portNumber;
    private String webAppRoot;

    public ConfigVO(String newId, String newIpAddress, String newPortNumber,
                    String newWebAppRoot) throws ConfigVOException {

        if ((!(checkString(newId))) || (!(checkString(newIpAddress))) ||
            (!(checkString(newPortNumber))) || (!(checkString(newWebAppRoot)))) 
{

            throw new ConfigVOException("Exception in configuration parameter");
        }
        setId(newId);
        setIpAddress(newIpAddress);
        setPortNumber(newPortNumber);
        setWebAppRoot(newWebAppRoot);
    }

    public void setId(String value) {

        this.id = value;
    }

    public String getId() {

        return id;
    }

    public void setIpAddress(String value) {

        this.ipAddress = value;
    }

    public String getIpAddress() {

        return ipAddress;
    }

    public void setPortNumber(String value) {

        this.portNumber = value;
    }

    public String getPortNumber() {

        return portNumber;
    }

    public void setWebAppRoot(String value) {

        this.webAppRoot = value;
    }

    public String getWebAppRoot() {

        return webAppRoot;
    }

    private boolean checkString(String value) {

        return (value == null ? false : ((value.trim().equals("")) ? false : 
true));
    }

    public boolean equals(Object object) {

        if (this.getClass().equals(object.getClass())) {

            ConfigVO con = ((ConfigVO) (object));
            if ((checkString(con.getId(), this.getId())) &&
                (checkString(con.getIpAddress(), this.getIpAddress())) &&
                (checkString(con.getPortNumber(), this.getPortNumber())) &&
                (checkString(con.getWebAppRoot(), this.getWebAppRoot()))) {

                return true;
            }
            return false;
        }
        return false;
    }

    public String toString() {

        return "ConfigVO: " + this.id + " " + this.ipAddress + " " +
                this.portNumber + " " + this.webAppRoot;
    }

    private boolean checkString(String aString, String anotherString) {

        return aString.equals(anotherString);
    }
}

and my jx is:

<?xml version="1.0" encoding="UTF-8"?>
<page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"; 
xmlns:ft="http://apache.org/cocoon/forms/1.0#template"; 
xmlns:fi="http://apache.org/cocoon/forms/1.0#instance";>
  <jx:import uri="resource://org/apache/cocoon/forms/generation/template.jx"/>
  <title>Configurazione sistema Nikko</title>
  <div style="margin-top:20px;">
    <ft:repeater-size id="modules"/>
    <table>
      <tr>
        <th>        </th>
        <th>
          <ft:repeater-widget-label id="modules" widget-id="nome"/>
        </th>
        <th>
          <ft:repeater-widget-label id="modules" widget-id="ipAddress"/>
        </th>
        <th>
          <ft:repeater-widget-label id="modules" widget-id="port"/>
        </th>
        <th>
          <ft:repeater-widget-label id="modules" widget-id="webAppRoot"/>
        </th>
        <th>
          <ft:repeater-widget-label id="select" widget-id="select"/>
        </th>
      </tr>
      <ft:repeater-widget id="modules">
        <tr>
          <td>
            <ft:widget id="nome"/>
          </td>
        </tr>
        <tr>
          <td>
            <ft:widget id="ipAddress"/>
          </td>
        </tr>
        <tr>
          <td>
            <ft:widget id="port"/>
          </td>
        </tr>
        <tr>
          <td>
            <ft:widget id="webAppRoot"/>
          </td>
        </tr>
        <tr>
          <td>
            <ft:widget id="select"/>
          </td>
        </tr>
      </ft:repeater-widget>
      <tr>
        <td colspan="3" align="right">
          <ft:widget id="add"/>
          <ft:widget id="remove"/>
        </td>
      </tr>
    </table>
  </div>
</page>

But i still have this error:

Internal Server Error
Message: Failed to execute pipeline.

Description: org.apache.cocoon.ProcessingException: Failed to execute 
pipeline.: 
file:/C:/jboss-3.2.5/server/nikko/tmp/deploy/tmp44849NikkoCM.war/NikkoConfiguration/documents/defConf.jx:26:40:java.lang.NumberFormatException:
 For input string: "length"

Sender: org.apache.cocoon.servlet.CocoonServlet

Source: Cocoon Servlet

Request URI

NikkoConfiguration/home

cause

java.lang.NumberFormatException: For input string: "length"

request-uri

/Nikko/NikkoConfiguration/home

full exception chain stacktrace

Original Exception: java.lang.NumberFormatException: For input string: "length"
        at org.apache.cocoon.generation.JXTemplateGenerator.call(Unknown Source)
        at org.apache.cocoon.generation.JXTemplateGenerator.execute(Unknown 
Source)
        at 
org.apache.cocoon.generation.JXTemplateGenerator.performGeneration(Unknown 
Source)
        at org.apache.cocoon.generation.JXTemplateGenerator.generate(Unknown 
Source)
        at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(Unknown
 Source)
        at 
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(Unknown
 Source)
        at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Unknown
 Source)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Unknown 
Source)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(Unknown
 Source)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(Unknown
 Source)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(Unknown
 Source)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Unknown 
Source)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(Unknown
 Source)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Unknown 
Source)
        at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(Unknown Source)
        at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.handleCocoonRedirect(Unknown
 Source)
        at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.access$000(Unknown 
Source)
        at 
org.apache.cocoon.components.treeprocessor.TreeProcessor$TreeProcessorRedirector.cocoonRedirect(Unknown
 Source)
        at org.apache.cocoon.environment.ForwardRedirector.redirect(Unknown 
Source)
        at 
org.apache.cocoon.components.flow.AbstractInterpreter.forwardTo(Unknown Source)
        at 
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.forwardTo(Unknown
 Source)
        at 
org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.forwardTo(Unknown 
Source)
        at 
org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsFunction_sendPage(Unknown
 Source)
        at inv12.invoke()
        at 
org.mozilla.javascript.FunctionObject.doInvoke(FunctionObject.java:523)
        at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:438)
        at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
        at 
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:1134)
        at 
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:190)
        at 
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:138)
        at 
org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(InterpretedFunctionImpl.java:121)
        at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
        at 
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.callFunction(Unknown
 Source)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(Unknown
 Source)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(Unknown
 Source)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(Unknown
 Source)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(Unknown
 Source)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Unknown 
Source)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(Unknown
 Source)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Unknown 
Source)
        at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(Unknown Source)
        at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(Unknown Source)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(Unknown 
Source)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(Unknown
 Source)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(Unknown
 Source)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(Unknown
 Source)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Unknown 
Source)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(Unknown
 Source)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Unknown 
Source)
        at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(Unknown Source)
        at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(Unknown Source)
        at org.apache.cocoon.Cocoon.process(Unknown Source)
        at org.apache.cocoon.servlet.CocoonServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
        at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
        at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at 
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:72)
        at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at 
org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:275)
        at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
        at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
        at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
        at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
        at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
        at java.lang.Thread.run(Thread.java:534)

I'm really becoming crazy about this error..... why doesn't it work?


---------- Initial Header -----------

>From      : "Jens Maukisch" [EMAIL PROTECTED]
To          : "angeloimm" [EMAIL PROTECTED]
Cc          :
Date      : Fri, 26 Nov 2004 12:25:18 +0100
Subject : Re: Binding problem

> Hi,
>
>
> > function confHome(){
>
> >   var log = Logger.getLogger( "Configurator.js" );
>
> >   log.info( "Getting all modules from interface inner class" );
> >   var modules = ( ( Collection )(
> > Configuration.Conf.getModuleCollection() ) );
> >   var defConf = new Form("forms/defConf.xml");
> >   var bindingURI = cocoon.parameters["bindingURI"];
> >     if (bindingURI != null) {
>
> >         log.info( "bindingURI: "+ bindingURI );
> >         defConf.createBinding(bindingURI);
> >     }
> >   for( var iteratore = ( ( Iterator )( modules.iterator() ) ); 
> > iteratore.hasNext(); ){
>
> >      defConf.load( ( ( ConfigVO )( iteratore.next() ) ) );
> >   }
> > }
>
> maybe you should load the collection with defConf.load():
> defConf.load(modules);
>
> --
> * best regards
> * Jens Maukisch
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> 



____________________________________________________________
Libero ADSL: navighi gratis a 1.2 Mega, senza canone e costi di attivazione. 
Abbonati subito su http://www.libero.it 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to