(Tapestry newb, using 4.1.3, maybe answered before but I couldn't find it.)

Is it possible to bind to a sub-property? Eg, this works:

  Home.html:
  <input jwcid="@TextField" value="ognl:num" />

  Home.java:
  public abstract class Home extends BasePage implements PageBeginRender {
    public abstract int getNum();
    public abstract void setNum(int num);
    ...
  }

This does not work:

  Home.html:
  <input jwcid="@TextField" value="ognl:foo.num" />
    or
  <input jwcid="@TextField" value="ognl:getFoo().num" />

  public abstract class Home extends BasePage implements PageBeginRender {
    public abstract Wrapper getFoo();
    public abstract void setFoo(Wrapper wrap);
    ...
  }

  public class Wrapper {
    private int num;
    public int getNum() { return num; }
    public void setNum(int n) { num = n; }
  }

The reason I'd like to do this is to collect the values of a number of
<input>s
into one object to simplify some other areas of code.

Thanks,
Jesse

Reply via email to