cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karel Vervaeke <>
Subject [cforms] union case="integer-widget"
Date Wed, 08 Sep 2004 22:02:21 GMT
When you run the example below, you get a ClassCastException,
when you make the change indicated by the comments, the example works fine

Should it be considered a bug or not?

-- def --
<fd:field id="case-widget">
  <fd:datatype base="integer"/> <!-- change this to string and it works -->

<fd:union id="extra-widgets" case="case-widget">
    <fd:field id="extra-field">
      <fd:datatype base="string"/>

-- bind --
<fb:value id="case-widget" path="pathToAnInteger" />

-- template --
<ft:union id="extra-widgets">
  <ft:case id="0">
    <ft:widget id="extra-field"/>

(partial) workaround:
If you only need on-load binding, you can work around the problem by 
making case-widget/datatype/@base="string" and putting this in the binding:

<fb:value id="case-widget" path="concat('',pathToAnInteger)" 

View raw message