cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 27147] New: - Woody field styling: selection lists with optgroups
Date Sun, 22 Feb 2004 21:57:45 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27147>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27147

Woody field styling: selection lists with optgroups

           Summary: Woody field styling: selection lists with optgroups
           Product: Cocoon 2
           Version: Current CVS 2.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Samples
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: okrasz@o2.pl


I've needed optgroups in my selection lists. I found that I can wrap wd:item
elements by other elements so I modified woody-field-styling.xsl so that it
creates optgroup elements, when wd:items are wrapped in
wi:group[wi:styling/@type='optgroup']/wi:items

Example:

<wd:selection-list>
  <wd:item value="1">
    <wd:label>option 1</wd:label>
  </wd:item>
  <wd:item value="1">
    <wd:label>option 2</wd:label>
  </wd:item>

  <wi:group>
    <wi:styling type="optgroup"/>
    <wi:label>group I</wi:label>
    <wi:items>

      <wd:item value="I.1">
        <wd:label>option I.1</wd:label>
      </wd:item>

      <wd:item value="I.2">
        <wd:label>option I.2</wd:label>
      </wd:item>
    </wi:items>
  </wi:group>
  
  <wi:group>
    <wi:styling type="optgroup"/>
    <wi:label>group II</wi:label>
    <wi:items>

      <wd:item value="II.1">
        <wd:label>option II.1</wd:label>
      </wd:item>

      <wd:item value="II.2">
        <wd:label>option II.2</wd:label>
      </wd:item>
    </wi:items>
  </wi:group>
  
</wd:selection-list>

Mime
View raw message