cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Deininger <>
Subject getting values of widgets inside <fd:union>
Date Tue, 20 Dec 2005 10:16:29 GMT

I encountering a problem with CForms:

inside a multi-step wizard, I defined a selection-list of persons. The
last item of that list is "Enter your own person data below". If you
select that item, an imput mask for the person data appears. I got
that working  with the code below. The form definition looks like:

<fd:form xmlns:fd=""
    <fd:union id="inputcontact" case="contactperson">
          <fd:field id="fullname" state="active">
             <fd:datatype base="string" />
	         <fd:initial-value>Enter name here ...</fd:initial-value>

    <fd:field id="contactperson">
      <fd:datatype base="string" />
        <fd:item value="7944">
          <fd:label>Person 1</fd:label>
        <fd:item value="-1">
          <fd:label>Enter person below</fd:label>

And that's the relevant part of the template used:

<xsl:stylesheet version="1.0" xmlns:xsl=""
<ft:form-template action="${submitPath}" method="POST">
    <ft:widget id="contactperson">
       <fi:styling list-type="dropdown" submit-on-change="true"/>

    <ft:union id="inputcontact">
       <ft:case id="-1">
          <ft:widget id="fullname" />
    <input type="submit" value="Beitrag absenden" />

Everything works fine so far, if I select "Enter person below" from
the selection list contactperson, the input field for fullname

The problem is that I would like to get the value of that field
"fullname" inside an Apple. My code looks like that:

protected void processInternal(AppleRequest appleRequest,
AppleResponse appleResponse) throws Exception {
  // handle form submit
  if (request.getMethod().equals("POST")) {
  logger.debug("Fullname:" +

While I can lookup the fullname widget successfully, I always get null
if I invoke the getValue() method on that widget, so I am not able to
retrieve the value of the input field. (I can get the values of all
other widgets inside my form but not those values from the widgets
inside the <union> tags.)

Any idea what I am doing wrong or how I can overcome that problem?

Thanks in advance for your help


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

View raw message