I'm not well versed in grid/gridcell... but one thing that jumps out is that
you have _model=_model in your parameters. Shouldn't that be
model=_model ? Also, are you passing the model parameter in your template?
Your Parameter isn't required so null may be the correct value.
I also haven't done inheritance like you are doing, but it looks like you
are redefining the _model attribute from the superclass? Should you maybe be
using datamodel provided by the superclass instead? model=datamodel?
http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/corelib/components/Grid.html
I haven't written the code, but that seems to be what makes sense to me...
Josh
On 9/27/07, Britske [EMAIL PROTECTED] wrote:
Hi all,
I guess I'm missing something here, maybe a trival thing so bear with me
please.;-)
I'm trying to extend the T5 grid / griddatasource for my requirements. For
some event-handling in GridColumn I need to reference the field _model of
type BeanModel which exists in the Grid-class from GridColumn. So I both
extended Grid -- LazyConfigurableGrid and GridColumns --
LazyGridColumns.
next,I supplied field _model as a parameter from the gridclass to the
gridcolum-class.
My problem:
_model==null in GridColumn all the time. I guess this is some
binding-thing
that I can't quite get my head around. (_model == null on initialization
of
the component, but i thought it would be updated later on)
The general question: how to pass objects by reference as parameters,
since
they always seem to be null.
the relevant bits:
LazyConfigurableGrid:
@Parameter
private BeanModel _model;
@SuppressWarnings(unused)
@Component(parameters =
{ sortColumnId=sortColumnId, sortAscending=sortAscending,
source=_source, _model=_model })
private LazyGridColumns _columns;
LazyGridColumns:
@Parameter
private BeanModel _model;
Thanks in advance,
Geert-Jan
--
View this message in context:
http://www.nabble.com/-T5-%3A-binding-issue%3A--supplying-parameter-to-component---%3E-always-null-tf4530634.html#a12928987
Sent from the Tapestry - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.