On Sep 9, 2005, at 1:01 AM, Joose Vettenranta wrote:

Hi,

I have bean like this:

class Bean {
 private Collection foo = new ArrayList();

 public addItem (String[] item) {
 ths.foo.add(foo);
 }

 public getFoo() {..}
 ..
}

in binding file, is iti possible to bind to that datatype, or do I have to use some wrrapper class?

like
  <fb:repeater id="foo" parent-path="." row-path="foo">
    <fb:identity>
      <fb:value id="id" path="String[0]"/>
   </fb:identity>

    <fb:on-bind>
      <fb:value id="value1" path="String[1] direction="load"/>
      <fb:value id="value2" path="String[2]"/>
   </fb:on-bind>

You have to have a bean property to bind to. You've got a getFoo(), but you also need a setFoo() for foo to be a property. Unless you are heinously overloading "foo" in your example above :-), you would not set [EMAIL PROTECTED] to 'foo' (and let's not call the repeater 'foo', too! :-).

"String[0]" etc. are not going to be valid jxpath components either (because that would have to map to a property named 'String'). What you want is "foo[0]", "foo[1]", etc. — corresponding to the 'foo' that is Bean.foo (forget all those other 'foo's! :-)

cheers,
—ml—


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to