>I think it's too kludgy to be forced to write a setupRender() and a test
>against null/0/false just to initialize a member.
Although I don't mind the method call to be honest, this is the one point I 
kinda agree with, the one thing that can be a bit annoying is having to 'think' 
about initialization, which is something I want to do and then forget about, 
having to test all the permutations of initialized values, and having to think 
about the effects of rendering, is a bit kludgy. 

----- Original Message -----
From: "Olle Hallin" <olle.hal...@gmail.com>
To: "Tapestry users" <users@tapestry.apache.org>
Sent: Tuesday, 16 December, 2008 12:43:52 AM GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: T5: How to initialize page members

Well, I'm not totally convinced.
I think it's too kludgy to be forced to write a setupRender() and a test
against null/0/false just to initialize a member.

There must be a simpler way...

Perhaps a field-level annotation?

Olle

2008/12/16 Thiago H. de Paula Figueiredo <thiag...@gmail.com>

> Em Mon, 15 Dec 2008 10:32:00 -0300, Olle Hallin <olle.hal...@gmail.com>
> escreveu:
>
>  You're correct about static final. Didn't think of that [?].
>>
>
> Sometimes a good solution is so simple that we try the complex ones first.
> :P
>
>  Why is it prohibited to initialize rowsPerPage in the declaration? An int
>> is definitely immutable. It's not even an object...
>>
>
> Tapestry polls pages. When it needs one instance, it would need to know if
> it is a never used one or a used one and initialize it accordingly. How
> would Tapestry know that, as primitives do not accept null values?
>
> AFAIK, the Tapestry philosphy is to have just one way to do things.
> Accepting initialization of primitive fiels and not acception other fields
> would not fit. ;)
>
> Nice discussion. :)
>
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Olle Hallin
Senior Java Developer and Architect
olle.hal...@crisp.se
www.crisp.se

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to