Joseph Panico
[EMAIL PROTECTED]
From: "Luke Galea" <[EMAIL PROTECTED]>
To: "Joseph Panico" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
Subject: RE: [Tapestry-developer] table component
Date: Mon, 2 Dec 2002 17:54:57 -0500
Funny.. I just went through that recently. I think that is the only way
to do it.. at least the only way I could think of (modifying the Image
component).
I am curious, I have what I think is a common case: I want to have a
column of check boxes (ie. To indicate which entries to delete ). Did
you find that you needed to write a custom component for that as well?
Or did you find a way of doing it using the base components?
Thanks
Luke Galea
Software Development
BlueCat Networks
905-762-5225
-----Original Message-----
From: Joseph Panico [mailto:[EMAIL PROTECTED]]
Sent: December 2, 2002 5:32 PM
To: [EMAIL PROTECTED]
Subject: [Tapestry-developer] table component
Hats off to mindbridge-- this is a really well done component.
I have a question about embedding Tapestry components as the values
(cell
content) of the table. Specifically, I'm trying to embed Images into the
table cells. It was fairly straightforward, since the Column just looks
for
an IRender to do the heavy lifting and all Tapestry Components are
IRender.
But I did have to trivially subclass Image to null out a couple of
methods.
That's because the standard Image implementation has expectations of how
it
will be used (namely, with Bindings looking for parameters) that weren't
true the way I used it.
Basically, I put the IAsset for the Image in the DataModel. Then I have
a
simple TableColumn class:
public class PXImageTableColumn extends ExpressionTableColumn
{
...
public IRender getValueRenderer(IRequestCycle objCycle,
ITableModelSource objSource,
Object objRow)
{
IAsset aValue = (IAsset)this.getColumnValue( objRow);
Image aRenderer = new PXTableImage();
aRenderer.setImage( aValue);
return aRenderer;
}
and
public class PXTableImage extends Image
{
protected void prepareForRender(IRequestCycle cycle) throws
RequestCycleException
{}
protected void cleanupAfterRender(IRequestCycle cycle)
{}
}
Is this the most straightforward path for what I'm trying to do?
thanks,
Joseph Panico
[EMAIL PROTECTED]
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus
-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail
-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer
