Bruno Dumon Escribio :-)
> On Tue, 2003-10-07 at 18:20, Carlos Ch�vez wrote:
>> Hi to all,
>>
>> i'm working with woody,
>> i'm using WoodyTemplateTransformer,
>> when the first time i execute one form this work fine, validation is
>> ok etc,
>> but the second time i execute other diferent form and i try to submit
>> this form this is the message is show me and every form is execute
>> after shown this message too, this happen in the woody form examples:
> <snipped message/>
>
> Hi Carlos,
>
> I don't know immediately what's causing this, but it would help if you
> could post the relevant sitemap snippet, the form definition and the
> form template.
hi bruno, i hope the following information help us.
I have the following directory structure:
/sga
/docs
/vendedor
/create
-bind.xml
-definition.xml
-flow.js
-template.xml
/search
-bind.xml
-definition.xml
-flow.js
-template.xml
-sitemap.xmap
-sitemap.xmap
option "create":
form definition:
<?xml version="1.0"?>
<wd:form
xmlns:wd="http://apache.org/cocoon/woody/definition/1.0"
xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
<wd:field id="vendedor_nombre" required="true">
<wd:label>Vendedor:</wd:label>
<wd:datatype base="string">
<wd:validation>
<wd:length min="5" max="50"/>
</wd:validation>
</wd:datatype>
</wd:field>
</wd:form>
form template:
<?xml version="1.0"?>
<document menu="true"
xmlns:wt="http://apache.org/cocoon/woody/template/1.0"
xmlns:wi="http://apache.org/cocoon/woody/instance/1.0">
<header>
<title>Vendedores</title>
</header>
<body>
<s1 title="Vendedor">
<br/>
<wt:form-template action="#{$continuation/id}.continue"
method="POST">
<wt:widget-label id="vendedor_nombre"/>
<wt:widget id="vendedor_nombre"/>
<br/><br/>
<input type="submit"/>
</wt:form-template>
</s1>
</body>
</document>
flow:
cocoon.load("resource://org/apache/cocoon/woody/flow/javascript/woody2.js");
function createform(form) {
form.showForm("create-form-display");
cocoon.request.setAttribute("createform", form.getWidget());
cocoon.sendPage("create");
}
binding file:
<?xml version="1.0"?>
<wb:context xmlns:wb="http://apache.org/cocoon/woody/binding/1.0"
path="/" >
<wb:value id="vendedor_nombre" path="vendedor_nombre"/>
</wb:context>
option "search":
definition form:
<?xml version="1.0"?>
<wd:form
xmlns:wd="http://apache.org/cocoon/woody/definition/1.0"
xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
<wd:field id="vendedor_nombre">
<wd:label>Vendedor:</wd:label>
<wd:datatype base="string"/>
</wd:field>
</wd:form>
the template form is the same.
the binding file is the same.
flow:
cocoon.load("resource://org/apache/cocoon/woody/flow/javascript/woody2.js");
function searchform(form) {
form.showForm("search-form-display");
cocoon.request.setAttribute("searchform", form.getWidget());
cocoon.sendPage("search");
}
and this is the subsitemap:
<?xml version="1.0" encoding="UTF-8"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:flow language="javascript">
<map:script src="forms/create/flow.js"/>
<map:script src="forms/search/flow.js"/>
</map:flow>
<map:pipelines>
<map:pipeline>
<map:match pattern="*-form-display">
<map:generate src="forms/{1}/template.xml"/>
<map:transform type="woody"/>
<map:transform type="i18n"/>
<map:transform src="context://stylesheets/agssa.xsl"/>
<map:transform
src="context://resources/woody/woody-samples-styling.xsl"/>
<map:transform type="i18n"/>
<map:transform type="encodeURL"/>
<map:serialize/>
</map:match>
<map:match pattern="*.continue">
<map:call continuation="{1}"/>
</map:match>
<map:match pattern="*">
<map:call function="woody">
<map:parameter name="function" value="{1}form"/>
<map:parameter name="form-definition"
value="forms/{1}/definition.xml"/>
<map:parameter name="bindingURI" value="forms/{1}/bind.xml"/>
<map:parameter name="attribute-name" value="{1}form"/>
</map:call>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
my main sitemap is the same sitemap of the cocoon.war file compiled.
when i'm execute "create" option all is ok, validation, show form,
submit, the following form in execute is "search" is show fine, but
when i submit the form send the message of error, after certain time no
wants to work and sends the same message of error for all forms.
cheers,
thank for your help.
>
> --
> Bruno Dumon http://outerthought.org/
> Outerthought - Open Source, Java & XML Competence Support Center
> [EMAIL PROTECTED] [EMAIL PROTECTED]
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
Carlos Ch�vez
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]