cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Madu" <andrewm...@gmail.com>
Subject HowTo automate date selection widget options
Date Sun, 18 Feb 2007 19:50:02 GMT
Hi,
I have a date selection widget which I wish to automate. By automate what I
mean is that I always want whatever the current year is to be the lowest
selection option a user can make, then I want 10 additional years to be
shown in the selection list. So for example if we take the current year,
2007, as the lowest selection option the highest selection option will be
2017.

At the moment I am hard coding the year drop down selection as so:

      <fd:field id="year" required="true">
        <fd:datatype base="string"/>
        <fd:selection-list>
          <fd:item value="2007">
            <fd:label>2007</fd:label>
          </fd:item>
          <fd:item value="2008">
            <fd:label>2008</fd:label>
          </fd:item>
          <fd:item value="2009">
            <fd:label>2009</fd:label>
          </fd:item>
          ...............
        </fd:selection-list>
      </fd:field>

Is there a way I can achieve this in cocoon without having to hard code the
date values into my xml document?

--
Regards

Andrew

Mime
View raw message