You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Carpels Pascal <Pa...@sycron-it.com> on 2004/08/04 09:20:30 UTC

Tables ...

Hi all,
 
I have a table called 'Products', containing the fields ProductID,
Productname. 
I want to put this information into a table, can someone show me how I
can do it (I am a newbie to Tapestry (:- ) ?
 
Best regards,
Pascal
 

Re: Tables ...

Posted by "Ido M. Tamir" <ta...@imp.univie.ac.at>.
On Wednesday 04 August 2004 09:20, Carpels Pascal wrote:
> Hi all,
>
> I have a table called 'Products', containing the fields ProductID,
> Productname.
> I want to put this information into a table, can someone show me how I
> can do it (I am a newbie to Tapestry (:- ) ?
>
> Best regards,
> Pascal

If you are able to put your Products into a list:

in your: productTable.html:
<table jwcid="productTable"/>
		<span jwcid="idColumnValue@Block">
			<a jwcid="@DirectLink" listener="ognl:listeners.selectProduct" 
parameters="ognl:components.table.tableRow.id" ><span jwcid="@Insert" 
value="ognl:components.table.tableRow.id"/></a>
		</span>


in your productTable.jwc:

<page-specification class="com.my.Products">
<property-specification name="products" type="java.util.List" 
persistent="yes"/>
<component id="table" type="contrib:Table">
		<binding name="source" expression="products"/>
		<binding name="columns">
			'*id:ID:id,' +
			'name:Name:name'
	  	</binding>
</component>
</page-specification>


public abstract class Products extends BasePage {
	public abstract List getProducts();
	public abstract void setProducts(List products);
	public void selectProduct(IRequestCycle cycle){

	}

}


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Tables ...

Posted by Jamie Orchard-Hays <ja...@dang.com>.
I suggest looking at the Workbench and Vlib example code as well as the
component reference. If that doesn't get you where you need to go, perhaps
you'll then be able to ask a more specific question.

http://jakarta.apache.org/tapestry/doc/ComponentReference/index.html

Jamie
----- Original Message ----- 
From: "Carpels Pascal" <Pa...@sycron-it.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Wednesday, August 04, 2004 3:20 AM
Subject: Tables ...


Hi all,

I have a table called 'Products', containing the fields ProductID,
Productname.
I want to put this information into a table, can someone show me how I
can do it (I am a newbie to Tapestry (:- ) ?

Best regards,
Pascal



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org