Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 13066 invoked from network); 10 May 2006 03:53:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 May 2006 03:53:39 -0000 Received: (qmail 41053 invoked by uid 500); 10 May 2006 03:53:36 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 40928 invoked by uid 500); 10 May 2006 03:53:35 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 40886 invoked by uid 99); 10 May 2006 03:53:34 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 May 2006 20:53:34 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 09 May 2006 20:53:31 -0700 Received: (qmail 12638 invoked by uid 65534); 10 May 2006 03:53:10 -0000 Message-ID: <20060510035310.12637.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r405620 - in /cocoon/site/site/2.1: ./ howto/ userdocs/publishing/ userdocs/widgetconcepts/ userdocs/widgets/ Date: Wed, 10 May 2006 03:53:08 -0000 To: cvs@cocoon.apache.org From: crossley@apache.org X-Mailer: svnmailer-1.0.8 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: crossley Date: Tue May 9 20:53:07 2006 New Revision: 405620 URL: http://svn.apache.org/viewcvs?rev=405620&view=rev Log: Regenerate the 2.1 docs from Daisy. Regenerate 2.1/changes.html Removed: cocoon/site/site/2.1/howto/howto-author-faq.html Modified: cocoon/site/site/2.1/changes.html cocoon/site/site/2.1/changes.rss cocoon/site/site/2.1/userdocs/publishing/xslt.html cocoon/site/site/2.1/userdocs/widgetconcepts/datatypes.html cocoon/site/site/2.1/userdocs/widgetconcepts/eventhandling.html cocoon/site/site/2.1/userdocs/widgetconcepts/selectionlists.html cocoon/site/site/2.1/userdocs/widgets/widget_repeater.html cocoon/site/site/2.1/userdocs/widgets/widget_tree.html Modified: cocoon/site/site/2.1/changes.html URL: http://svn.apache.org/viewcvs/cocoon/site/site/2.1/changes.html?rev=405620&r1=405619&r2=405620&view=diff ============================================================================== --- cocoon/site/site/2.1/changes.html (original) +++ cocoon/site/site/2.1/changes.html Tue May 9 20:53:07 2006 @@ -1227,14 +1227,102 @@

  • -addDUMMY(NN)
  • +add + Added CSS classes in cocoon forms default XSLs. + (SG) Fixes COCOON-1782. +
  • +update + Updated ehcache to 1.2. + (AG)
  • +
  • +fix + The JDK 1.4 version of the EncodeURLTransformer did not work properly as it was not matching just the + beginning of the string as the Jakarta-regexp version does. The transformer was corrected to only match + the beginning of the string. In 2.1.9 this error can be circumvented by configuring the transformer and + adding "*" to the end of each pattern. + (RG) Fixes COCOON-1742.
  • +
  • +add + As with all the AbstractTextSerializer based serializers, the XHTMLSerializer should handle the omit-xml-declaration to not put the XML declaration as first line of the serialized document. + This prevents many rendering problems in Internet Explorer. Default behaviour is to send the xml declaration as before. + (AS) Thanks to Maurizio Pillitu. Fixes COCOON-1845.
  • +
  • +fix + Commandline interface: the user-agent is now correctly set in the request headers (and not in the request parameters). + (CZ) Thanks to James Bates. Fixes COCOON-1511.
  • +
  • +fix + RandomNumberModule: does not returns random number in the range (min,max) as expected. + (AG) Fixes COCOON-1716.
  • +
  • +fix + Performance Issue/JavaScriptFlowScript: If <reload-scripts> is set to false, + don't check for last modification time of javascript source files. + (AG) Thanks to Georg Hüttenegger. Fixes COCOON-1721.
  • +
  • +fix + XSP block: Fix regression introduced in 2.1.8 that under specific circumstances logicsheets + were not applied, leading to compilation errors. This manifested itself only if + a) two XSPs referred to the same custom logicsheet by a relative location path, + b) the custom logicsheet used another logicsheet, and + c) the built-in logicsheet's namespace was not mentioned in xsp:page. + The compilation errors occurred always when calling the second XSP for the first time. + Fix also race condition which could lead to similar XSP compilation errors under high load + when accessing the same logicsheet for the first time. + (AN)
  • +
  • +fix + Template block: Make the template block usable with JDK 1.3+ and enable it by default. + (CZ)
  • +
  • +fix + CForms: Fix inplace editing samples + (JBQ)
  • +
  • +add + CForms: Add id, state and listening attributes to the transformed form-template element (jx macros + and forms transformer). + (CZ) Fixes COCOON-1820.
  • +
  • +add + XSP block: Use private methods to call start/endElement in xsp.xsl. + That generates smaller bytecode allowing to compiler larger XSPs before hitting the + 64k limit for the size of the generate() method. + (AN)
  • +
  • +add + Forms block: modified ProcessingPhase to add a PROCESSING_INITIALIZE phase instead of the spurious + double READ_FROM_REQUEST_VALUE sent before. Made a ProcessingPhaseListener configurable from + form definition with on-processing-phase and adapted the JavaScript widget listener to support + processing phase events. + (SG) Fixes COCOON-1781COCOON-1685.
  • +
  • +add + Forms block: added repeater events. Repeater now sends row added, deleted etc.. events. + The listener can be added in definition with an on-repeater-modified element. Added support + for these events in JavaScript listener. + (SG) Fixes COCOON-1801.
  • +
  • +fix + Passing the default locale while parsing initial-value on a form if no locale attribute was specified. + (SG) Fixes COCOON-1844.
  • +
+ +

Contributors

+

This is a list of all people who have contributed to this release, but + were not full developers on the project. We thank these people for their + contributions.

+
    +
  • Georg Hüttenegger
  • +
  • James Bates
  • +
  • Maurizio Pillitu
- +

Version 2.1.9 (April 7 2006)

- +

  • @@ -1642,7 +1730,7 @@ complex the actual pipeline is. (MPF)
- +

Contributors

This is a list of all people who have contributed to this release, but were not full developers on the project. We thank these people for their @@ -1679,10 +1767,10 @@

- +

Version 2.1.8 (November 18 2005)

- +

  • @@ -2469,7 +2557,7 @@ Portal block: Make portal manager available through portal component manager. (CZ)
- +

Contributors

This is a list of all people who have contributed to this release, but were not full developers on the project. We thank these people for their @@ -2511,10 +2599,10 @@

- +

Version 2.1.7 (March 23 2005)

- +

  • @@ -2952,7 +3040,7 @@ Fix: Continuation can only be invoked for the interpreter it was originally created for. (LG)
- +

Contributors

This is a list of all people who have contributed to this release, but were not full developers on the project. We thank these people for their @@ -2966,10 +3054,10 @@

- +

Version 2.1.6 (November 19 2004)

- +

  • @@ -3543,7 +3631,7 @@ Added instrumentation support to ContinuationsManager. (VG)
- +

Contributors

This is a list of all people who have contributed to this release, but were not full developers on the project. We thank these people for their @@ -3575,10 +3663,10 @@

- +

Version 2.1.5.1 (July 9 2004)

- +

  • @@ -4005,7 +4093,7 @@ Remove non-FOM flow classes and system.js (VG)
- +

Contributors

This is a list of all people who have contributed to this release, but were not full developers on the project. We thank these people for their @@ -4024,10 +4112,10 @@

- +

Version 2.1.4 (February 12 2004)

- +

  • @@ -4278,7 +4366,7 @@ Disable accessing files outside the context via the context protocol. (CZ) Fixes 24093.
- +

Contributors

This is a list of all people who have contributed to this release, but were not full developers on the project. We thank these people for their @@ -4290,10 +4378,10 @@

- +

Version 2.1.3 (November 13 2003)

- +

  • @@ -4433,7 +4521,7 @@ AbstractSAXTransformer. Update examples to show basic repeat tag usage. (CH)
- +

Contributors

This is a list of all people who have contributed to this release, but were not full developers on the project. We thank these people for their @@ -4453,10 +4541,10 @@

- +

Version 2.1.2 (September 30 2003)

- +

  • @@ -4534,7 +4622,7 @@ "sitemap.handled-errors". Previously they weren't logged. (BRD)
- +

Contributors

This is a list of all people who have contributed to this release, but were not full developers on the project. We thank these people for their @@ -4544,10 +4632,10 @@

- +

Version 2.1.1 (September 05 2003)

- +

  • @@ -4679,7 +4767,7 @@ view labels from the same component in the parent sitemap. (SW) Fixes 22239.
- +

Contributors

This is a list of all people who have contributed to this release, but were not full developers on the project. We thank these people for their @@ -4692,10 +4780,10 @@

- +

Version 2.1 (August 12 2003)

- +

  • @@ -4762,7 +4850,7 @@ Fix the ignoreErrors handling in the cinclude transformer. (CZ)
- +

Contributors

This is a list of all people who have contributed to this release, but were not full developers on the project. We thank these people for their @@ -4773,10 +4861,10 @@

- +

Version 2.1rc1 (July 29 2003)

- +

  • @@ -4913,7 +5001,7 @@ Applied patch for implementing exists for the xmldb source. (CZ) Thanks to Tim Goodwin. Fixes 20115.
- +

Contributors

This is a list of all people who have contributed to this release, but were not full developers on the project. We thank these people for their @@ -4925,10 +5013,10 @@

- +

Version 2.1m3 (July 5 2003)

- +

  • @@ -5090,7 +5178,7 @@ Cocoon servlet shuts down or when Cocoon is reloaded. (BRD) Thanks to Unico Hommes. Fixes 15312.
- +

Contributors

This is a list of all people who have contributed to this release, but were not full developers on the project. We thank these people for their @@ -5108,10 +5196,10 @@

- +

Version 2.1m2 (May 20 2003)

- +

  • @@ -5253,7 +5341,7 @@ XMLDBSourceFactory. (VG) Fixes 18683.
- +

Contributors

This is a list of all people who have contributed to this release, but were not full developers on the project. We thank these people for their @@ -5270,10 +5358,10 @@

- +

Version 2.1-M1 (April 29 2003)

- +

  • @@ -6355,7 +6443,7 @@ of (for more performance) by the quick-modified-test. (CZ) Fixes 12915.
- +

Contributors

This is a list of all people who have contributed to this release, but were not full developers on the project. We thank these people for their @@ -6387,7 +6475,7 @@

- +

Committers

This is a list of all people who have been @@ -6409,6 +6497,7 @@

  • Pierpaolo Fumagalli (PF)
  • Antonio Gallardo (AG)
  • Leszek Gawron (LG)
  • +
  • Simone Gianni (SG)
  • Ralph Goers (RG)
  • Vadim Gritsenko (VG)
  • Christian Haul (CH)
  • Modified: cocoon/site/site/2.1/changes.rss URL: http://svn.apache.org/viewcvs/cocoon/site/site/2.1/changes.rss?rev=405620&r1=405619&r2=405620&view=diff ============================================================================== --- cocoon/site/site/2.1/changes.rss (original) +++ cocoon/site/site/2.1/changes.rss Tue May 9 20:53:07 2006 @@ -56,6 +56,7 @@ + @@ -63,11 +64,171 @@ + add + (bug COCOON-1782) + changes.html add + by + SG + (fixes bug COCOON-1782) + + : + + Added CSS classes in cocoon forms default XSLs. + + updatechanges.html update + by + AG + : + + Updated ehcache to 1.2. + + fix + (bug COCOON-1742) + changes.html fix + by + RG + (fixes bug COCOON-1742) + + : + + The JDK 1.4 version of the EncodeURLTransformer did not work properly as it was not matching just the + beginning of the string as the Jakarta-regexp version does. The transformer was corrected to only match + the beginning of the string. In 2.1.9 this error can be circumvented by configuring the transformer and + adding "*" to the end of each pattern. + + add + (bug COCOON-1845) + changes.html add + by + AS + (fixes bug COCOON-1845) + + : + + As with all the AbstractTextSerializer based serializers, the XHTMLSerializer should handle the omit-xml-declaration to not put the XML declaration as first line of the serialized document. + This prevents many rendering problems in Internet Explorer. Default behaviour is to send the xml declaration as before. + Thanks to Maurizio Pillitu. + fix + (bug COCOON-1511) + changes.html fix + by + CZ + (fixes bug COCOON-1511) + + : + + Commandline interface: the user-agent is now correctly set in the request headers (and not in the request parameters). + Thanks to James Bates. + fix + (bug COCOON-1716) + changes.html fix + by + AG + (fixes bug COCOON-1716) + + : + + RandomNumberModule: does not returns random number in the range (min,max) as expected. + + fix + (bug COCOON-1721) + changes.html fix + by + AG + (fixes bug COCOON-1721) + + : + + Performance Issue/JavaScriptFlowScript: If <reload-scripts> is set to false, + don't check for last modification time of javascript source files. + Thanks to Georg Hüttenegger. + fixchanges.html fix + by + AN + : + + XSP block: Fix regression introduced in 2.1.8 that under specific circumstances logicsheets + were not applied, leading to compilation errors. This manifested itself only if + a) two XSPs referred to the same custom logicsheet by a relative location path, + b) the custom logicsheet used another logicsheet, and + c) the built-in logicsheet's namespace was not mentioned in xsp:page. + The compilation errors occurred always when calling the second XSP for the first time. + Fix also race condition which could lead to similar XSP compilation errors under high load + when accessing the same logicsheet for the first time. + + fixchanges.html fix + by + CZ + : + + Template block: Make the template block usable with JDK 1.3+ and enable it by default. + + fixchanges.html fix + by + JBQ + : + + CForms: Fix inplace editing samples + + add + (bug COCOON-1820) + changes.html add + by + CZ + (fixes bug COCOON-1820) + + : + + CForms: Add id, state and listening attributes to the transformed form-template element (jx macros + and forms transformer). + addchanges.html add by - NN + AN : - DUMMY + + XSP block: Use private methods to call start/endElement in xsp.xsl. + That generates smaller bytecode allowing to compiler larger XSPs before hitting the + 64k limit for the size of the generate() method. + + add + (bug COCOON-1781 COCOON-1685) + changes.html add + by + SG + (fixes bug COCOON-1781 COCOON-1685) + + : + + Forms block: modified ProcessingPhase to add a PROCESSING_INITIALIZE phase instead of the spurious + double READ_FROM_REQUEST_VALUE sent before. Made a ProcessingPhaseListener configurable from + form definition with on-processing-phase and adapted the JavaScript widget listener to support + processing phase events. + + add + (bug COCOON-1801) + changes.html add + by + SG + (fixes bug COCOON-1801) + + : + + Forms block: added repeater events. Repeater now sends row added, deleted etc.. events. + The listener can be added in definition with an on-repeater-modified element. Added support + for these events in JavaScript listener. + + fix + (bug COCOON-1844) + changes.html fix + by + SG + (fixes bug COCOON-1844) + + : + + Passing the default locale while parsing initial-value on a form if no locale attribute was specified. + fixchanges.html fix @@ -8960,8 +9121,154 @@ - addchanges.html add + add + (bug COCOON-1782) + changes.html add + by + SG + (fixes bug COCOON-1782) + + : + + Added CSS classes in cocoon forms default XSLs. + updatechanges.html update by - NN + AG + : + + Updated ehcache to 1.2. + fix + (bug COCOON-1742) + changes.html fix + by + RG + (fixes bug COCOON-1742) + + : + + The JDK 1.4 version of the EncodeURLTransformer did not work properly as it was not matching just the + beginning of the string as the Jakarta-regexp version does. The transformer was corrected to only match + the beginning of the string. In 2.1.9 this error can be circumvented by configuring the transformer and + adding "*" to the end of each pattern. + add + (bug COCOON-1845) + changes.html add + by + AS + (fixes bug COCOON-1845) + + : + + As with all the AbstractTextSerializer based serializers, the XHTMLSerializer should handle the omit-xml-declaration to not put the XML declaration as first line of the serialized document. + This prevents many rendering problems in Internet Explorer. Default behaviour is to send the xml declaration as before. + Thanks to Maurizio Pillitu. fix + (bug COCOON-1511) + changes.html fix + by + CZ + (fixes bug COCOON-1511) + + : + + Commandline interface: the user-agent is now correctly set in the request headers (and not in the request parameters). + Thanks to James Bates. fix + (bug COCOON-1716) + changes.html fix + by + AG + (fixes bug COCOON-1716) + : - DUMMY \ No newline at end of file + + RandomNumberModule: does not returns random number in the range (min,max) as expected. + fix + (bug COCOON-1721) + changes.html fix + by + AG + (fixes bug COCOON-1721) + + : + + Performance Issue/JavaScriptFlowScript: If <reload-scripts> is set to false, + don't check for last modification time of javascript source files. + Thanks to Georg Hüttenegger. fixchanges.html fix + by + AN + : + + XSP block: Fix regression introduced in 2.1.8 that under specific circumstances logicsheets + were not applied, leading to compilation errors. This manifested itself only if + a) two XSPs referred to the same custom logicsheet by a relative location path, + b) the custom logicsheet used another logicsheet, and + c) the built-in logicsheet's namespace was not mentioned in xsp:page. + The compilation errors occurred always when calling the second XSP for the first time. + Fix also race condition which could lead to similar XSP compilation errors under high load + when accessing the same logicsheet for the first time. + fixchanges.html fix + by + CZ + : + + Template block: Make the template block usable with JDK 1.3+ and enable it by default. + fixchanges.html fix + by + JBQ + : + + CForms: Fix inplace editing samples + add + (bug COCOON-1820) + changes.html add + by + CZ + (fixes bug COCOON-1820) + + : + + CForms: Add id, state and listening attributes to the transformed form-template element (jx macros + and forms transformer). + addchanges.html add + by + AN + : + + XSP block: Use private methods to call start/endElement in xsp.xsl. + That generates smaller bytecode allowing to compiler larger XSPs before hitting the + 64k limit for the size of the generate() method. + add + (bug COCOON-1781 COCOON-1685) + changes.html add + by + SG + (fixes bug COCOON-1781 COCOON-1685) + + : + + Forms block: modified ProcessingPhase to add a PROCESSING_INITIALIZE phase instead of the spurious + double READ_FROM_REQUEST_VALUE sent before. Made a ProcessingPhaseListener configurable from + form definition with on-processing-phase and adapted the JavaScript widget listener to support + processing phase events. + add + (bug COCOON-1801) + changes.html add + by + SG + (fixes bug COCOON-1801) + + : + + Forms block: added repeater events. Repeater now sends row added, deleted etc.. events. + The listener can be added in definition with an on-repeater-modified element. Added support + for these events in JavaScript listener. + fix + (bug COCOON-1844) + changes.html fix + by + SG + (fixes bug COCOON-1844) + + : + + Passing the default locale while parsing initial-value on a form if no locale attribute was specified. + \ No newline at end of file Modified: cocoon/site/site/2.1/userdocs/publishing/xslt.html URL: http://svn.apache.org/viewcvs/cocoon/site/site/2.1/userdocs/publishing/xslt.html?rev=405620&r1=405619&r2=405620&view=diff ============================================================================== --- cocoon/site/site/2.1/userdocs/publishing/xslt.html (original) +++ cocoon/site/site/2.1/userdocs/publishing/xslt.html Tue May 9 20:53:07 2006 @@ -1217,19 +1217,20 @@

    Intro

    This page contains information on the default XSLT's provided by CForms, and -the fi:styling directives they support. Be sure to read first about the -templating mechanism.

    -

    There are basically 3 XSLTs:

    +the fi:styling directives they support.

    +

    As specified in templating mechanism (be sure to read +about it), the form template file is transformed in a form instance xml file. +This file contains all the data needed to properly display a form. An XSLT must +then be used to transform the form instance to an HTML to be displayed in a +browser.

    +

    This XSLT does not need to create also all the page layout (that can be added +by other XSLT, or aggregating the form with other markup), it should only format +the forms field and the form layout.

    +

    Cocoon forms already a set of XSLTs that does exactly this, they are +"library" stylesheets :

    • -forms-samples-styling.xsl: this stylesheet includes two -stylesheets: one for widget styling, one for page styling. You can choose -between the basic types of it or advanced stylings. Usually, you will make a -clone of this stylesheet for your own project, and use the other stylesheets as -is.
    • - -
    • forms-field-styling.xsl: contains templates that style individual widgets, i.e. templates that translate fi:field, fi:booleanfield fi:action, etc. to HTML.
    • @@ -1238,10 +1239,6 @@ forms-page-styling.xsl: contains templates for building high-level page layout effects, such as tabbed panes. -
    -

    Additionally there are 2 XSLTs for advanced widget styling:

    -
      -
    • forms-advanced-field-styling.xsl: contains templates that provide advanced styling of fields, e.g. the "double-listbox" for a multivaluefield. @@ -1254,43 +1251,236 @@ calendar is an advanced styling too, but because it has much specific stuff we separated it out of forms-advanced-styling.xsl.
    • +
    • +forms-htmlarea-styling.xsl: contains the styling for the html edit +field.
    • +
    -

    From the sitemap you only need to reference the first one, for example as -follows:

    -
    <map:transform src="context://samples/forms/resources/forms-samples-styling.xsl"/>
    +

    If you have a look at samples, you'll see also another XSLT, +forms-samples-styling.xsl. This stylesheet includes other two +stylesheets from the default set. Usually, you will make a clone of this +stylesheet for your own project, have it include the library XSLTs, and +customize what you need by writing templates in this XSLT by giving templates +higher priority than those in the library ones.

    +

    From the sitemap you only need to reference only your custom XSLT, for +example as follows:

    +
    <map:transform src="context://forms/resources/myproject-forms-styling.xsl"/>
    - +

    fi:styling options

    +

    The fi:styling elements are specified in the template, and offer a way to +customize the way the library XSLTs render widgets. For example :

    +
    <ft:widget id="preferredBeer">
    +  <fi:styling list-type="radio"/>
    +</ft:widget>
    +

    The fi:styling options for the different widgets are documented in the respective sections about those widgets.

    - +

    High-level styling with fi:group

    -

    No documentation yet, checkout the samples and the source of -forms-page-styling.xsl.

    -

    For storing the state of a tab or choice selection server-side just add a -field to the form definition that shall hold this value:

    -
    <fd:field id="state">
    +

    It's quite common to want to layout the form. For example, have part of the +form displayed in a table with two columns, one with labels the other one with +actual fields, while in another part have a single colum with labels followed by +fields, and in another part some tabs to group together fields.

    +

    We could do this simply writing HTML in the template file, but this is +verbose, non reusable, and not easy to style. That's why fi:groups are there. +You can layout your form with fi:groups in a simple, efficient, extensible and +easy to style way. For example :

    +
    <ft:form-template .... >
    +  <fi:group>
    +    <fi:styling layout="columns">
    +    <fi:items>
    +      <ft:widget id="name"/>
    +      <ft:widget id="surname"/>
    +      <ft:widget id="birthday"/>
    +    </fi:items>
    +  </fi:group>
    +</ft:form-template>
    +
    +

    Will produce a table with two columns, like the following :

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    Name

    + +
    + +

    [_______]

    + +
    + +

    Surname

    + +
    + +

    [_______]

    + +
    + +

    Birthday

    + +
    + +

    [_______]

    + +
    +

    The fi:group accept either a layout or a type +attribute in its fi:styling element to specify the layout we want. This +difference is because the "layout based" groups are quite lightweight, while the +"type based" groups are more sophisticated and usually contains other groups. +

    + +

    Layout groups

    +

    +<fi:group layout="column"> will format its items in a single +column. One row will contain the label, the following row the input field.

    +

    +<fi:group layout="columns"> will format its items in two +columns. For each item a row is created, the first column will contain the +label, and the second column the input field.

    +

    +<fi:group layout="row"> will format its items in a single row. +One cell will contain the label, the following cell the input field.

    +

    +<fi:group layout="rows"> will format its items in two rows. +The first row will contain all the labels, one each cell, the second row all the +input fields, again one each cell.

    +

    Some input fields will have a special layout when inside a certain group : +

    +
      + +
    • +action, submit and boolanfield widgets does not +have a "label" which can be displayed separated from the button or checkbox +itself, so they will be placed
    • + +
        + +
      • in a single line inside the column and columns layout
      • + +
      • using only one cell in row layout
      • + +
      • using an empty cell in the first row of a rows layout
      • + +
      + + +
    • +multivaluefield with a list-type="double-listbox" +will be displayed with a row with a label and another row with the two lists +when in a columns group.
    • + +
    • every other fi:group nested inside a fi:group with layout +columns will span on both columns
    • + +
    +

    Also layout fi:group can contain other fi:group between +their items, and can be used to create quite complex layouts.

    + +

    Type groups

    +

    There are currently two "type" groups : tabs and choice. + +

    +

    The tabs group will display some tabs, every tab is (usually) a fi:group. For +example :

    +
    <fi:group>
    +  <fi:styling type="tabs"/>
    +  <fi:items>
    +    <fi:group>
    +      <fi:label>Personal info</fi:label>
    +      <fi:styling layout="columns"/>
    +      <fi:items>
    +        <ft:widget id="name"/>
    +        <ft:widget id="surname"/>
    +      </fi:items>
    +    </fi:group>
    +    <fi:group>
    +      <fi:label>Iternet data</fi:label>
    +      <fi:styling layout="columns"/>
    +      <fi:items>
    +        <ft:widget id="email"/>
    +        <ft:widget id="icqaccount"/>
    +      </fi:items>
    +    </fi:group>
    +  </fi:items>
    +</fi:group>
    +

    Will display two tabs, one called "Personal info" and the other one "Internet +data". When the user clicks on "Personal info" the field name and surname will +be displayed, while when the user clicks on "Internet data" the field email and +icqaccount will be displayed.

    +

    You can specify a widget that will be used to store and retrieve which tab is +curently active. This way you can control from the flow which tab will be active +when the form will be displayed, or check which tab was active when the user +submitted the form. To specify this special field use :

    +
    <fi:group>
    +  <fi:styling type="tabs"/>
    +  <fi:state>
    +    <ft:widget id="activetab"/>
    +  </fi:state>
    +  ....
    +</fi:group>
    +

    Obviously you can call the widget whatever you want, and the suggested +datatype is integer, since the field will contain a number indicating the active +tab, the field must be declared in the definition, and can be used in binding if +needed. For example :

    +
    <fd:field id="activetab">
       <fd:datatype base="integer"/>
     </fd:field>
    -

    Bind this value to whatever you want. In the form template you need then -following code:

    +

    The group of type choice is identical to the tabs group, +but instead of a row of tabs, a drop down is displayed, and selecting one +element of the drop down will display the relative group.

    +

    You can specify a client side javascript that will be executed when a tab is +clicked or when an option of the choice drop down is selected. This is +done simply adding an attribute to the items of the group, for example :

    <fi:group>
    -  <fi:styling type="choice"/>
    -  <fi:state>
    -    <ft:widget id="state"/> <!-- refering to the above defined field -->
    -  </fi:state>
    -  <fi:items>
    -    ...
    -  </fi:items>
    +  <fi:styling type="tabs"/>
    +  <fi:items>
    +    <fi:group formsOnShow="personalSelected()">
    +      <fi:label>Personal info</fi:label>
    +      ...
    +    </fi:group>
    +    <fi:group formsOnShow="internetSelected()">
    +      <fi:label>Iternet data</fi:label>
    +      ...
    +    </fi:group>
    +  </fi:items>
     </fi:group>
    +

    Have a look at forms-page-styling.xsl , all fi:groups are +formatted there.

    - +

    Miscellaneous

    - +

    fi:validation-errors

    The fi:validation-errors tag is used to display all validation errors of all widgets in a form at one location, i.e. a the top of the form.

    Modified: cocoon/site/site/2.1/userdocs/widgetconcepts/datatypes.html URL: http://svn.apache.org/viewcvs/cocoon/site/site/2.1/userdocs/widgetconcepts/datatypes.html?rev=405620&r1=405619&r2=405620&view=diff ============================================================================== --- cocoon/site/site/2.1/userdocs/widgetconcepts/datatypes.html (original) +++ cocoon/site/site/2.1/userdocs/widgetconcepts/datatypes.html Tue May 9 20:53:07 2006 @@ -1416,10 +1416,30 @@ + + + + +

    char

    + + + + +

    java.lang.Char

    + + + + +

    only the default char convertor

    + + + + + - +

    Enumerated datatype

    The enum datatype is meant to be used with types implementing Joshua Bloch's @@ -1456,10 +1476,10 @@

    The enum datatype is typically used together with the enum selection list type.

    - +

    Available convertors

    - +

    formatting (decimal)

    This convertor uses the java.text.DecimalFormat class (or com.ibm.icu.text.DecimalFormat class if it is present in the @@ -1479,15 +1499,15 @@ javadoc of the DecimalFormat class for the supported pattern syntax. CForms will always use the pattern that is most specific for the current locale.

    - +

    plain

    This convertor is not locale-dependent. It shows the full precision of the number and uses dot as the decimal separator.

    - +

    date convertors

    The date datatype can be used both for dates as times. The date datatype supports the following convertors:

    - +

    formatting (date)

    This convertor uses the java.text.SimpleDateFormat class (or com.ibm.icu.text.SimpleDateFormat class if it is present in the @@ -1532,7 +1552,7 @@ default is lenient, which means that the convertor will try to convert a somewhat invalid date like "Dec. 32, 2005" into "Jan. 1, 2006". If the value of the "lenient" attribute is false, such a date won't validate.

    - +

    millis

    The millis convertor for dates uses the number of milliseconds since January 1, 1970, 00:00:00 GMT as string representation. This will likely not be used to Modified: cocoon/site/site/2.1/userdocs/widgetconcepts/eventhandling.html URL: http://svn.apache.org/viewcvs/cocoon/site/site/2.1/userdocs/widgetconcepts/eventhandling.html?rev=405620&r1=405619&r2=405620&view=diff ============================================================================== --- cocoon/site/site/2.1/userdocs/widgetconcepts/eventhandling.html (original) +++ cocoon/site/site/2.1/userdocs/widgetconcepts/eventhandling.html Tue May 9 20:53:07 2006 @@ -1219,7 +1219,8 @@

    Some types of widgets can emit events. For example, the action widget produces ActionEvents and the field widget produces ValueChangedEvents. Next to these events, there are also ProcessingPhaseEvents, fired in between the various -phases of the processing of a request.

    +phases of the processing of a request, and RepeaterEvents fired by a repeater +when rows are added, removed or cleared.

    Handling events can be done in three ways:

      @@ -1373,7 +1374,11 @@ org.apache.cocoon.forms.event.ActionEvent org.apache.cocoon.forms.event.ProcessingPhaseListener -org.apache.cocoon.forms.event.ProcessingPhaseEvent +org.apache.cocoon.forms.event.ProcessingPhaseEvent + +org.apache.cocoon.forms.event.RepeaterListener +org.apache.cocoon.forms.event.RepeaterEvent +

      The table below gives an overview of what events are supported on what widgets.

      @@ -1397,6 +1402,11 @@

      Supports ActionEvents

      + @@ -1409,6 +1419,7 @@ + @@ -1426,6 +1437,7 @@ + @@ -1438,6 +1450,7 @@ + @@ -1450,6 +1463,7 @@ + @@ -1462,6 +1476,7 @@ + @@ -1474,6 +1489,7 @@ + @@ -1486,6 +1502,7 @@ + @@ -1498,6 +1515,7 @@ + @@ -1510,6 +1528,7 @@ + @@ -1526,6 +1545,7 @@ + @@ -1538,6 +1558,7 @@ + @@ -1550,6 +1571,20 @@ + + + + + + + + + + Modified: cocoon/site/site/2.1/userdocs/widgetconcepts/selectionlists.html URL: http://svn.apache.org/viewcvs/cocoon/site/site/2.1/userdocs/widgetconcepts/selectionlists.html?rev=405620&r1=405619&r2=405620&view=diff ============================================================================== --- cocoon/site/site/2.1/userdocs/widgetconcepts/selectionlists.html (original) +++ cocoon/site/site/2.1/userdocs/widgetconcepts/selectionlists.html Tue May 9 20:53:07 2006 @@ -1325,8 +1325,17 @@ </fi:selection-list>

      If you don't want an initial null value, add a nullable="false" attribute to the -fd:selection-list element. This applies only to +fd:selection-list element. You can specify an i18n key to use +as a label for the null element using the +null-text="i18.key.here" attribute. This applies only to enum type selection lists.

      +

      Note : since the enum pattern is based on Class.getDeclaredFields() method, +it's not always granted that the enum selection list items will be in the same +order the fields are declared in the enumeration class. This is reported to +happen expecially on IBM JRE. A good solution to this problem is to use the +apache commons Enum as a super class of your enumeration classes. Due to the way +this enumeration pattern is implemented, it's possible to grant the element +orders in a portable way.

      - +

      Template

      - +

      Before Cocoon 2.1.8

      The following elements are available for formatting a repeater in a template:

      @@ -1295,7 +1307,7 @@ </tbody> </table> - +

      From Cocoon 2.1.8

      Cocoon 2.1.8 introduced a slightly extended manner to format repeaters, which is required when using the new Ajax features. Instead of @@ -1329,7 +1341,7 @@ </table> </ft:repeater> - +

      Tips

      When using JXTemplate, it is possible to test if a repeater is empty and show something else in that case. For example:

      Modified: cocoon/site/site/2.1/userdocs/widgets/widget_tree.html URL: http://svn.apache.org/viewcvs/cocoon/site/site/2.1/userdocs/widgets/widget_tree.html?rev=405620&r1=405619&r2=405620&view=diff ============================================================================== --- cocoon/site/site/2.1/userdocs/widgets/widget_tree.html (original) +++ cocoon/site/site/2.1/userdocs/widgets/widget_tree.html Tue May 9 20:53:07 2006 @@ -1215,10 +1215,203 @@ +-->

      Tree widget

      - -

      + +

      Concept

      -

      TODO

      +

      The tree widget is for displaying trees of "things". The tree widget supports +expanding and collapsing of nodes, single or multiple selections, and a flexible +TreeModel interface to provide its data.

      +
      + +

      Definition

      +
      +
      <fd:tree id="..." state="..." root-visible="true" selection="multiple|single">
      +  <fd:tree-model type="..."/>
      +  <fd:on-selection-changed>
      +   ...
      +  </fd:on-selection-changed>
      +  <fd:on-create>
      +    ...
      +  </fd:on-create>
      +  <fd:validation>
      +    ...
      +  </fd:validation>
      +  <fd:attributes>
      +    ...
      +  </fd:attributes>
      +</fd:tree>
      +
      +

      All elements and attributes, except for id, are optional.

      +

      See the field widget for information on common +attributes and elements.

      +
      + +

      The tree model

      +
      +

      See the interface +TreeModel. +Essentially, can be a tree of any sort of objects (there is no interface for the +nodes in the tree). Each parent node should be able to identify its children +uniquely by means of a key (some string).

      +

      CForms ships with two implementations of TreeModel: one generic +implementation (DefaultTreeModel), and one for browsing over Cocoon/Avalon +sources (= filesystem-like structures).

      +

      You can set the form model in the form definition, or set it at runtime using +the setModel method on the tree widget.

      + +

      Source tree model

      +

      Syntax:

      +
      <fd:tree-model type="source" src="...">
      +  <fd:fileset>
      +    <fd:include pattern="..."/>
      +    <fd:exclude pattern="..."/>
      +  </fd:fileset>
      +  <fd:dirset>
      +    <fd:include pattern="..."/>
      +    <fd:exclude pattern="..."/>
      +  </fd:dirset>
      +</fd:tree-model>
      +
      +

      The src attribute defines the root of the content to be browsed. For +example, to browse the content of the webapp directory, specify +src="context://". Of course, you can also use "file://" or other +traversable sources [todo: link to some page with info about sources].

      +

      The fd:fileset and fd:dirset elements are optional. The +fileset patterns are used to filter files based on their name, and the dirset +patterns are used to filter directories based on their names.

      +

      There can be multiple (or none at all) fd:include and +fd:exclude elements inside fd:fileset or fd:dirset. +The include patterns will be evaluated first, the exclude patterns next, so the +exclude patterns have higher precendence.

      +

      The patterns are wildcard patterns. They are the same as for the wildcard +matcher in the sitemap, thus simply use a * as wildcard (the ** syntax makes no +sense here, as the pattern is evaluated on individual names, not on full paths). +

      + +

      Custom models

      +

      Syntax:

      +
      <fd:tree-model type="java" class="..."/>
      +
      +

      whereby the class attribute specifies a class implementing +TreeModel. +The class can implement Avalon interfaces to get the Logger, ServiceManager and +Context.

      + +

      Programmatically assigning a model

      +

      Here's an example of how to build a tree model programatically using the +provided DefaultTreeModel in flowscript:

      +
      importClass(Packages.org.apache.cocoon.forms.formmodel.tree.DefaultTreeModel);
      +
      +[...]
      +
      +var node1 = new DefaultTreeModel.DefaultTreeNode("node 1")
      +var node2 = new DefaultTreeModel.DefaultTreeNode("node 2")
      +var root = new DefaultTreeModel.DefaultTreeNode("root")
      +root.add("node1", node1);
      +node1.add("node2", node2);
      +var treeModel = new DefaultTreeModel(root);
      +
      +var treeWidget = form.getChild("mytree");
      +treeWidget.setModel(treeModel);
      +
      +
      + +

      Template

      +
      +

      For the display of a tree widget, three special template elements are +available:

      +
        + +
      • +ft:tree: global element to insert a tree widget in the template. +This also inserts two hidden fields, ":path" and ":action" to communicate a node +action to the server, see below.
      • + +
      • +ft:tree-nodes: the template to be executed for each tree node.
      • + +
      • +ft:tree-children: used inside ft:tree-nodes to recursively apply +the ft:tree-nodes template to the child nodes.
      • + +
      +

      A very rough example is:

      +
      <ft:tree id="mytree">
      +  <div>
      +    <ft:tree-nodes>
      +      <div>
      +        ${treeNode.node.data}
      +      </div>
      +      <ft:tree-children/>
      +    </ft:tree-nodes>
      +  </div>
      +</ft:tree>
      +
      +

      This example just shows the typical structural rendering, but doesn't contain +any styling and javascript actions to trigger expansion and collapsion of nodes. +

      +

      Inside ft:tree you have access to two variables:

      +
        + +
      • +treeWidget, just a synonym for the normal "widget" variable that is +available in the template of each widget.
      • + +
      • +treeNode, provides access to the current tree node being rendered. +More specifically it is a +TreeWalker +instance. Its node property gives access to the actual tree node.
      • + +
      +
      +
      Note
      +
      The ${treeNode.node.data} expression in the template +example above is specific to the form model you are using, since the node can be +any object. The data property exists in the DefaultTreeModel nodes, however in +the source tree model the nodes are Source objects, so you would use name +instead of data.
      +
      +
      + +

      Tree node actions

      +
      +

      An action can be executed on a certain node in the tree. The available +actions are:

      +
        + +
      • expand
      • + +
      • collapse
      • + +
      • toggle-collapse
      • + +
      • select
      • + +
      • unselect
      • + +
      • toggle-select
      • + +
      +

      To execute an action, set the hidden field named tree-widget-full-name + +":action" to one of the actions listed above. The node on which the action is +applied is specified in the hidden field named tree-widget-full-name + ":path". +The node is specified as a slash-separated path of node keys. In the template +you can access this easily with treeNode.path.

      +
      + +

      A more functional template

      +
      +

      For a complete example of a tree template, see e.g. the +file_explorer_template.xml file in the CForms samples. From there, you can +"steal" the styling and the javascript to perform tree node actions.

      +
      + +

      API notes

      +
      +

      See the API +docs of the tree widgets for more information on how to access e.g. the +selected nodes.

      + +

      Supports RepeaterEvents

      + +
      + +

      repeater

      + +