Very odd, I'll have to write up a simpler version of my code when I get
time.
Basically all I do is change contrib:FormTable to contrib:Table (yes it's
within a Form). When I use FormTable my converter class gets used (debug
messages show) if I use Table, it never gets used... I don't change
anything else...
The difference I see from your code and mine, is that I'm using a custom
ITableColumnModel/IBasicTableModel implementation.
----- Original Message -----
From: "Ben Gidley" <[EMAIL PROTECTED]>
To: "Tapestry users" <[email protected]>
Sent: Wednesday, February 01, 2006 2:08 AM
Subject: Re: Fw: T4 conrib:Table converter binding doesn't work within a
Form.
This works for me! It only gets called however if your table is inside a
form component.
On my page I have
public IPrimaryKeyConverter getBookingRowConverter() {
return new IPrimaryKeyConverter() {
public Object getPrimaryKey(Object
object) {
Booking booking = (Booking)
object;
return booking.getBookingId
();
}
public Object getValue(Object object) {
Integer bookingId =
(Integer) object;
return getSession().load(
Booking.class, bookingId);
}
};
}
And in the spec file I have
<component id="currentTimeTable" type="contrib:Table">
<binding name="source" value="bookings"/>
<binding name="columns" value="literal:bookingId,
hoursBooked, timeRemaining, comment, !delete"/>
<binding name="converter" value="ognl:bookingRowConverter"/>
</component>
On 1/31/06, Daniel Lydiard <[EMAIL PROTECTED]> wrote:
> When using Table. the "converter" binding is NEVER used, but if I use
the
> deprecated FormTable my converter binding method is used.
Nobody else has experienced this problem with T4?
Also, I noticed in debug messages for my IBasicTableModel implementation
that getRowCount() is called 3x first than getCurrentPageRows() is called
right after that. What is up with the 3 called to getRowCount() for ever
page render?
My Table setup is the typical source/column/converter method.
> The FormTable component is deprectated so I simply changed it to Table,
in
> which the doucmentation says it will automaitcally perform the FormTable
> functions when within a Form.
>
>
> I verified this by doing a view source and looking at the hidden
variables
> within the form, and with debug messages.
>
> What am I doing wrong?
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]