Ok this is what I've tried so far. You will find the three form files
attached. And the flowscript function is the following :
function displayUsersList(){
getUsers();
var usersList = users.getAllUsers();
var form = new Form("users_d.xml");
form.createBinding("users_b.xml");
form.load(usersList);
form.showForm("displayUsersForm");
}
And here is the concerned pipeline :
<map:pipeline internal-only="true">
<map:act type="locale">
<map:match pattern="internal/*">
<map:generate src="pages/{1}.xml"/>
<map:call resource="apply-theme">
<map:parameter name="includemenu" value="true"/>
</map:call>
</map:match>
</map:act>
</map:pipeline>
Of course it doesn't work I'm sure I miss a few things but I don't
know where. Here is the exception I get :
An Error Occurred
No Cocoon Form found.
org.apache.cocoon.ProcessingException: Error executing pipeline.:
org.xml.sax.SAXException: No Cocoon Form found.
cause: org.xml.sax.SAXException: No Cocoon Form found.
full exception chain stacktrace[hide]
org.apache.cocoon.ProcessingException: Error executing pipeline.:
org.xml.sax.SAXException: No Cocoon Form found.
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.handleException(AbstractProcessingPipeline.java:940)
at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:281)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:483)
at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:120)
...
Any idea ?
Thx in advance.
--
Sebastien ARBOGAST
<?xml version="1.0" encoding="UTF-8"?>
<fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
<fd:widgets>
<fd:repeater id="users">
<fd:widgets>
<!-- The ID is here to keep track of row creation order, which can
have no relation with row index when the users used move up/down -->
<fd:output id="id">
<fd:label>ID</fd:label>
<fd:datatype base="integer"/>
</fd:output>
<fd:field id="name">
<fd:label>Name</fd:label>
<fd:datatype base="string"/>
</fd:field>
<fd:booleanfield id="select">
<fd:label>Select</fd:label>
</fd:booleanfield>
</fd:widgets>
</fd:repeater>
<fd:submit id="submit">
<fd:label>Submit</fd:label>
</fd:submit>
</fd:widgets>
</fd:form><?xml version="1.0" encoding="UTF-8"?>
<fb:context xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"
path=".">
<fb:simple-repeater id="users" parent-path="users" row-path="user">
<fb:value id="ID" path="id"/>
<fb:value id="name" path="name"/>
</fb:simple-repeater>
</fb:context><?xml version="1.0" encoding="UTF-8"?>
<content title="login" xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
xmlns:fi="http://apache.org/cocoon/forms/1.0#instance" xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
<ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST">
<jx:choose>
<jx:when test="${form.getChild('users').getSize() == 0}">
<p>
<strong>
<em>There are no users to display</em>
</strong>
</p>
</jx:when>
<jx:otherwise>
<table border="1">
<tr>
<th>
<ft:repeater-widget-label id="users" widget-id="id"/>
</th>
<th>
<ft:repeater-widget-label id="users" widget-id="name"/>
</th>
<th>
<ft:repeater-widget-label id="users" widget-id="select"/>
</th>
</tr>
<ft:repeater-widget id="users">
<tr class="forms-row-${repeaterLoop.index % 2}">
<td>
<ft:widget id="id"/>
</td>
<td>
<ft:widget id="name"/>
</td>
<td>
<ft:widget id="select"/>
</td>
</tr>
</ft:repeater-widget>
</table>
</jx:otherwise>
</jx:choose>
<ft:widget id="submit"/>
<br/>
</ft:form-template>
</content>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]