users"
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 j
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
> Em Mon, 15 Dec 2008 10:3
Em Mon, 15 Dec 2008 10:32:00 -0300, Olle Hallin
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
Em Mon, 15 Dec 2008 16:59:39 -0300, Olle Hallin
escreveu:
What is most important: consistency or ease of use?
Consistency leads to ease of use. :)
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
--
onday, 15 December, 2008 3:32:00 PM GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> Subject: Re: T5: How to initialize page members
>
> You're correct about static final. Didn't think of that .
>
> But still I think there is room for improvement:
>
confused as to why primitives can be initialized but not Objects?
- Original Message -
From: "Olle Hallin"
To: "Tapestry users"
Sent: Monday, 15 December, 2008 3:32:00 PM GMT +02:00 Athens, Beirut,
Bucharest, Istanbul
Subject: Re: T5: How to initialize page members
Yo
You're correct about static final. Didn't think of that [?].
But still I think there is room for improvement:
Consider this use case that is quite clumsy to implement as it is today:
public class APageThatContainsAGrid {
@Persist private int rowsPerPage = 10; // forbidden!
void onAction(int
Em Mon, 15 Dec 2008 06:47:18 -0300, Olle Hallin
escreveu:
Hi,
Hi!
Beginning with 5.0.17 is is forbidden to have initial values on page
members, in order to prohibit state leakage between sessions.
This is fine, since it prevents bugs that can be very tricky to isolate.
You're right.
T
Hi,
Beginning with 5.0.17 is is forbidden to have initial values on page
members, in order to prohibit state leakage between sessions.
This is fine, since it prevents bugs that can be very tricky to isolate.
On the other hand, it leads to clumsy code.
Instead of
*private Foo foo = new Foo();
*