You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ralph Churchill <mr...@yahoo.com> on 2004/05/04 16:27:06 UTC
source and columns parameters must be specified
I only ask this, because it doesn't seem to make
sense... I have a plain contrib:Table, like so:
<property-specification name="customerProducts"
type="java.util.List"/>
<property-specification name="customerProduct"
type="CustomerProductView"/>
<component id="customerProductsTable"
type="contrib:Table">
<binding name="source"
expression="customerProducts"/>
<binding name="columns">
'productGrade:Product Grade:productGrade, '+
'volumeLimit:Volume Remaining:volumeLimit, '+
'accountType:Account Type:accountType, '+
'authorizationType:Authorization
Type:authorizationType'
</binding>
<binding name="row"
expression="customerProduct"/>
As you can see, I *have* set both the "source" and
"columns"... Now, the FIRST page of the table displays
just fine, but when I try to page forward or resort
the columns, I get:
Either the tableModel parameter or both source and
columns parameters must be specified by component
SupplierLoadingControl/customerProductsTable.tableView
What gives??
RMC
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: source and columns parameters must be specified
Posted by Vjeran Marcinko <vj...@tis.hr>.
----- Original Message -----
From: "Ralph Churchill" <mr...@yahoo.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, May 04, 2004 8:55 PM
Subject: RE: source and columns parameters must be specified
> If I make 'customerProducts' a persistent property,
> then this goes away. Of course, I don't really want
> this data to just sit in the session... So, should I
> instead make it a property of the page's class...
> rather than in the .page file? I know there's a name
> for those, but I happened to leave 'Tapestry In
> Action' at home today :(
Those are called transient properties, but I never worked with them, so
dunno when initialization takes place.
Anyway, I have written about that same problem few days ago - you probably
reset 'customerProducts' property to null in pageDetached() method or
initialize(), and in second request when some table action is triggered,
processing of this action asks for this property, but since page rendering
has not yet started, your property is still null, not yet
initilized/constructed in maybe some pageBeginRender(), and table brings
conclusion like that parameter has never been set, thus raising exception
that you have written about.
Since there is no proper initialization method where you could place
initialization of your page properties before it renders, you could use lazy
instantiation :
public List getCustomerProducts() {
if (customerProducts == null) {
customerProducts = new CustomerProducts(....)
}
return customerProducts;
}
Thus, your page would return constructed variable whenever it is requested,
without worrying about lifecycle stuff.
-Vjeran
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: source and columns parameters must be specified
Posted by Ralph Churchill <mr...@yahoo.com>.
If I make 'customerProducts' a persistent property,
then this goes away. Of course, I don't really want
this data to just sit in the session... So, should I
instead make it a property of the page's class...
rather than in the .page file? I know there's a name
for those, but I happened to leave 'Tapestry In
Action' at home today :(
RMC
--- Mind Bridge <mi...@yahoo.com> wrote:
> Could 'customerProducts' be null when that happens?
>
> -----Original Message-----
> From: Ralph Churchill [mailto:mrchucho@yahoo.com]
> Sent: Tuesday, May 04, 2004 5:27 PM
> To: tapestry-user@jakarta.apache.org
> Subject: source and columns parameters must be
> specified
>
>
> I only ask this, because it doesn't seem to make
> sense... I have a plain contrib:Table, like so:
>
> <property-specification name="customerProducts"
> type="java.util.List"/>
> <property-specification name="customerProduct"
> type="CustomerProductView"/>
> <component id="customerProductsTable"
> type="contrib:Table">
> <binding name="source"
> expression="customerProducts"/>
> <binding name="columns">
> 'productGrade:Product Grade:productGrade, '+
> 'volumeLimit:Volume Remaining:volumeLimit,
> '+
> 'accountType:Account Type:accountType, '+
> 'authorizationType:Authorization
> Type:authorizationType'
> </binding>
> <binding name="row"
> expression="customerProduct"/>
>
> As you can see, I *have* set both the "source" and
> "columns"... Now, the FIRST page of the table
> displays
> just fine, but when I try to page forward or resort
> the columns, I get:
>
> Either the tableModel parameter or both source and
> columns parameters must be specified by component
>
SupplierLoadingControl/customerProductsTable.tableView
>
> What gives??
>
> RMC
>
>
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Win a $20,000 Career Makeover at Yahoo! HotJobs
> http://hotjobs.sweepstakes.yahoo.com/careermakeover
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
>
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: source and columns parameters must be specified
Posted by Manuel Martin <ma...@med.cornell.edu>.
All,
I've got the same problem, and I know that my source Set is not null when I
get the "Either the tableModel parameter or both source and
columns parameters must be specified by component
SupplierLoadingControl/customerProductsTable.tableView"
Here is a part of my *.jwc file (largely inspired by the localeList
component of the tapestry workbench example):
<component-specification
class="org.sigpath.tapestry.model.table.SpEntityList"
allow-body="no" allow-informal-parameters="yes">
<!-- direction = in : must be linked to a property -->
<parameter name="spEntitySet"
direction="in"
required="yes"
type="java.util.Set"/>
...
<component id="tableView" type="contrib:TableView">
<binding name="source" expression="spEntitySet"/>
<binding name="columns">
'* ID:getId(), spidLink, !delete'
</binding>
</component>
Please note that this works fine when I do not pass the source as a
parameter (as above with the spEntityList parameter), using for instance :
<component id="tableView" type="contrib:TableView">
<binding name="source"
expression="@org.sigpath.tapestry.model.table.TempEntity@getAvailableEntitie
s()"/>
<binding name="columns">
'* ID:getId(), spidLink, !delete'
</binding>
</component>
Thank you in advance, Manuel
-----Original Message-----
From: Mind Bridge [mailto:mindbridgeweb@yahoo.com]
Sent: Tuesday, May 04, 2004 10:34 AM
To: Tapestry users
Subject: RE: source and columns parameters must be specified
Could 'customerProducts' be null when that happens?
-----Original Message-----
From: Ralph Churchill [mailto:mrchucho@yahoo.com]
Sent: Tuesday, May 04, 2004 5:27 PM
To: tapestry-user@jakarta.apache.org
Subject: source and columns parameters must be specified
I only ask this, because it doesn't seem to make
sense... I have a plain contrib:Table, like so:
<property-specification name="customerProducts"
type="java.util.List"/>
<property-specification name="customerProduct"
type="CustomerProductView"/>
<component id="customerProductsTable"
type="contrib:Table">
<binding name="source"
expression="customerProducts"/>
<binding name="columns">
'productGrade:Product Grade:productGrade, '+
'volumeLimit:Volume Remaining:volumeLimit, '+
'accountType:Account Type:accountType, '+
'authorizationType:Authorization
Type:authorizationType'
</binding>
<binding name="row"
expression="customerProduct"/>
As you can see, I *have* set both the "source" and
"columns"... Now, the FIRST page of the table displays
just fine, but when I try to page forward or resort
the columns, I get:
Either the tableModel parameter or both source and
columns parameters must be specified by component
SupplierLoadingControl/customerProductsTable.tableView
What gives??
RMC
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: source and columns parameters must be specified
Posted by Mind Bridge <mi...@yahoo.com>.
Could 'customerProducts' be null when that happens?
-----Original Message-----
From: Ralph Churchill [mailto:mrchucho@yahoo.com]
Sent: Tuesday, May 04, 2004 5:27 PM
To: tapestry-user@jakarta.apache.org
Subject: source and columns parameters must be specified
I only ask this, because it doesn't seem to make
sense... I have a plain contrib:Table, like so:
<property-specification name="customerProducts"
type="java.util.List"/>
<property-specification name="customerProduct"
type="CustomerProductView"/>
<component id="customerProductsTable"
type="contrib:Table">
<binding name="source"
expression="customerProducts"/>
<binding name="columns">
'productGrade:Product Grade:productGrade, '+
'volumeLimit:Volume Remaining:volumeLimit, '+
'accountType:Account Type:accountType, '+
'authorizationType:Authorization
Type:authorizationType'
</binding>
<binding name="row"
expression="customerProduct"/>
As you can see, I *have* set both the "source" and
"columns"... Now, the FIRST page of the table displays
just fine, but when I try to page forward or resort
the columns, I get:
Either the tableModel parameter or both source and
columns parameters must be specified by component
SupplierLoadingControl/customerProductsTable.tableView
What gives??
RMC
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org