RE: table component

"Luke Galea" <[email protected]>
Newsgroups gmane.comp.java.tapestry.devel
Message-ID <[email protected]>
Why not just construct a DirectLink from within the getValueRenderer
method of your TableColumn? Alternatively you could have the DirectLink
component defined in the .page/.jwc and refer to it. I haven't done that
yet either..

As for the checkbox, I believe that using the normal checkbox component
will work.. but ideally the TableComponent would work similar to a
ListEdit component.. ie. You could have a "selected"/"tag" binding that
is set for each row.. and a listener that would then update the data
model based on the users selections. 

Luke Galea 
Software Development
BlueCat Networks
905-762-5225
 

-----Original Message-----
From: Joseph Panico [mailto:[email protected]] 
Sent: December 2, 2002 5:59 PM
To: Luke Galea; [email protected]
Subject: RE: [Tapestry-developer] table component

Haven't tried the checkbox yet. But I am wondering if there is a 
straightforward way to embed Tapestry Links into the Table.

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.