cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kamal Bhatt <>
Subject Trouble with repeater
Date Thu, 02 Mar 2006 06:52:34 GMT

I am trying to make a search screen.

The idea is that the user can search based on two database fields or 
simply search all. I thought I would use cforms to do this. The fields 
to search by would be a union and when the user submits it will pass the 
data along to an xsp and xslt (via the sitemap). However, there are a 
number of problems with this, the first being I cannot even get the 
template to work. I get null pointer exceptions. The problem seems to be 
when I show the form.

Here is my definition:

<fd:form xmlns:fd="" 
xmlns:i18n="" id="promotion_select">
    <fd:field id="filter" required="false" nullable="false">
        <fd:datatype base="string"/>
            <fd:item value="None"/>
        <fd:item value="Id"/>
        <fd:item value="Title"/>

       <fd:union id="data" case="filter">
            <fd:field id="None" state="output">
          <fd:datatype base="string"/>
        <fd:field id="Id">
          <fd:datatype base="integer"/>
        <fd:field id="Title">
           <fd:datatype base="string"/>

    <!-- ACTIONS -->

    <!-- Submit -->   
    <fd:submit id="submit" command="submit">

Here is my template:

<div id="body">

    <jx:import xmlns:jx=""
      id="promotionSelect" name="promotionSelect">
    <ft:widget id="filter"><fi:styling list-type="dropdown" 

    <ft:union id="data">
      <ft:case id="None">
        <ft:widget id="None"/>

      <ft:case id="Id">
        <ft:widget id="Id"/>

      <ft:case id="Title">
        <ft:widget id="Title"/>

    <ft:widget id="submit"><fi:styling type="link"/></ft:widget>

Here is my javascript:

function select_promotion()
    var form = new Form("cforms/promotion_select.xml");

I want the fields and the data (generated by an XSLT) to be shown on the 
same screen. I was wondering if it were possible to call the template 
again after we call the xsp/xslt so we can see the fields again. I don't 
know if this will work and the more I think about the more unlikely it 
looks. Is there a nice way of doing this without bindings to the database?


Kamal Bhatt

Disclaimer: This email is confidential and may contain privileged information for the sole
use of the person or business to which it is addressed. If you are not the intended recipient,
please notify the sender by return e-mail or phone as you must not view, disseminate, distribute
or copy this email without our consent. We do not accept any liability in connection with
any computer virus, data corruption, incompleteness, or unauthorised amendment of this email.
It is the sole responsibility of the receiver to scan for viruses before opening.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message