://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16975470.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
or return page.
igor.vaynberg wrote:
heh, even though we switched to int we are pretty close to running out
of flag bits already :) but oh well :)
-igor
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16975470.html
Sent
in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16959612.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands
problems or more work for the more standard usecases or anti-patterns.
Exactly why each use should not be left wondering how to approach the
problem themselves - if they even recognise it as a problem.
John
--
View this message in context:
http://www.nabble.com/Alternative-method
.
Exactly why each use should not be left wondering how to approach the
problem themselves - if they even recognise it as a problem.
John
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16959612.html
Sent from the Wicket - User
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16959612.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail
factory methods?
jwcarman wrote:
Would you like me to add something like this to the wiki?
// The interface...
public interface IBeforeFirstRenderListener
{
public void onBeforeFirstRender();
}
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise
First i dont want a boolen in the components that onFirstRender() is called.
I want a boolean that it is not called. So in the constructor of
component we set the flag and clear it when first rendered.
Do remember that in onBeforeRende components/panels and all can be
created again but i think
On Tue, Apr 29, 2008 at 3:59 PM, Johan Compagner [EMAIL PROTECTED] wrote:
First i dont want a boolen in the components that onFirstRender() is called.
I want a boolean that it is not called. So in the constructor of
component we set the flag and clear it when first rendered.
Are we thinking
I am just saying if we make such a thing, that i dont want state after
the fact in a components. But i guess we can then better use a bit
i think we have a few left.
On 4/30/08, James Carman [EMAIL PROTECTED] wrote:
On Tue, Apr 29, 2008 at 3:59 PM, Johan Compagner [EMAIL PROTECTED]
wrote:
heh, even though we switched to int we are pretty close to running out
of flag bits already :) but oh well :)
-igor
On Tue, Apr 29, 2008 at 7:07 PM, Johan Compagner [EMAIL PROTECTED] wrote:
I am just saying if we make such a thing, that i dont want state after
the fact in a components.
wrote:
heh, even though we switched to int we are pretty close to running out
of flag bits already :) but oh well :)
-igor
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16975470.html
Sent from the Wicket - User mailing list archive
usecases or anti-patterns.
John
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16918361.html
Sent from the Wicket - User mailing list archive at Nabble.com
On Mon, Apr 28, 2008 at 5:57 AM, James Carman
[EMAIL PROTECTED] wrote:
On Sat, Apr 26, 2008 at 4:55 PM, Maurice Marrink [EMAIL PROTECTED] wrote:
Such an initialize method can easily be done by users them self with a
simple factory pattern. So why bloat our api with it?
Could one come
James Carman schrieb:
Or, perhaps Wicket could add in some lifecycle method annotations?
pleeease don´t!
using annotations for this kind of lifecycle methods is a simple abuse
of them. non-obvious order, inheritance etc... lesson learned from
jpa,ejb3 etc...
cu uwe
--
THOMAS DAILY
On Sat, Apr 26, 2008 at 4:55 PM, Maurice Marrink [EMAIL PROTECTED] wrote:
Such an initialize method can easily be done by users them self with a
simple factory pattern. So why bloat our api with it?
Could one come up with their own interface which means they want
delayed intialization and use
On Mon, Apr 28, 2008 at 6:27 AM, James Carman
[EMAIL PROTECTED] wrote:
Yes, this would involve making up some rules about the order in which
the parent class' initializer methods are invoked. A couple that come
to mind:
1. There should only be one initializer method declared per class
How well did you test this?
Because i think the biggest problem here is that the
IComponentInstantiationListener is invoked in the constructor of
Component and thus before any childclass constructor has run.
Maurice
On Mon, Apr 28, 2008 at 1:42 PM, James Carman
[EMAIL PROTECTED] wrote:
On Mon,
On Mon, Apr 28, 2008 at 7:58 AM, Maurice Marrink [EMAIL PROTECTED] wrote:
How well did you test this?
Only whipped it up very quickly (based on obviously wrong assumptions :).
Because i think the biggest problem here is that the
IComponentInstantiationListener is invoked in the constructor
On Mon, Apr 28, 2008 at 2:15 PM, James Carman
[EMAIL PROTECTED] wrote:
On Mon, Apr 28, 2008 at 7:58 AM, Maurice Marrink [EMAIL PROTECTED] wrote:
How well did you test this?
Only whipped it up very quickly (based on obviously wrong assumptions :).
Because i think the biggest problem
On Mon, Apr 28, 2008 at 8:31 AM, Maurice Marrink [EMAIL PROTECTED] wrote:
Oh! Nasty. I thought you guys were somehow waiting until the
Component was fully instantiated for this notification to occur. If
Nope. One of the places where this is used, is for security
springbean is ok. although bends the rule rather then breaking it by
not depending on any state of the super class.
if we did it the other way then the dependencies would be null during
the constructor call, which is obviously something we want to avoid.
-igor
On Mon, Apr 28, 2008 at 6:22 AM,
2008/4/28 Uwe Schäfer [EMAIL PROTECTED]:
James Carman schrieb:
Or, perhaps Wicket could add in some lifecycle method annotations?
pleeease don´t!
using annotations for this kind of lifecycle methods is a simple abuse of
them. non-obvious order, inheritance etc... lesson learned
On Mon, Apr 28, 2008 at 10:58 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
2008/4/28 Uwe Schäfer [EMAIL PROTECTED]:
James Carman schrieb:
Or, perhaps Wicket could add in some lifecycle method annotations?
pleeease don´t!
using annotations for this kind of
you can roll that, just use the beforerenderlistener you can install
in the application subclass.
-igor
On Mon, Apr 28, 2008 at 8:03 AM, James Carman
[EMAIL PROTECTED] wrote:
On Mon, Apr 28, 2008 at 10:58 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
2008/4/28 Uwe Schäfer [EMAIL PROTECTED]:
On Mon, Apr 28, 2008 at 11:05 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
you can roll that, just use the beforerenderlistener you can install
in the application subclass.
We just have to make sure we only initialize an instance one time.
The IComponentOnBeforeRenderListeners are called every
yes of course. you have to keep a boolean in the metadata to mark if
the handler has been called already.
-igor
On Mon, Apr 28, 2008 at 8:12 AM, James Carman
[EMAIL PROTECTED] wrote:
On Mon, Apr 28, 2008 at 11:05 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
you can roll that, just use the
On Mon, Apr 28, 2008 at 11:45 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
yes of course. you have to keep a boolean in the metadata to mark if
the handler has been called already.
Ok, gotcha! I need to keep that metadata stuff in my head. That's a
nifty little trick for adding ad-hoc
/Alternative-method-to-initialise-page-tp16742636p16918361.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED
PagingNavigation
so I had to copy-paste it and change some minor parts of the class. But it
was very easy and I take
the default implementations as an example how to work with them.
SS
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page
On Sat, Apr 26, 2008 at 01:58:28PM -0700, John Patterson wrote:
Note to self: don't post messages when half cut. But I have to break that
rule just one more time
Heh, no problem. Been there once or twice myself...
jk
-
To
() is
called from the base class
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16742891.html
Sent from the Wicket - User mailing list archive at Nabble.com
MyCustomisedCompopnent(_parameter.getSomething());
}
}
So _parameter will always be null when
overrideToCreateCustomComponent() is
called from the base class
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page
:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16742891.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED
the base class
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16742891.html
Sent from the Wicket - User mailing list archive at Nabble.com
://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16911887.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
to use in the component (as PagingNavigation allows)
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16912100.html
Sent from the Wicket - User mailing list archive at Nabble.com
On Sat, Apr 26, 2008 at 04:46:11AM -0700, John Patterson wrote:
John Krasnay wrote:
This rule is too strict. Another way to avoid calling overridable
methods from the constructor is to use a model:
Models are fine for providing dynamic values but do not help you customise
John Patterson schrieb:
Thanks. So is this the way we should build all components that could be
extended? If so, how about adding an initialisation hook to avoid this
problem and the need to call super.onBeforeRender() (which I forgot recently
and took me a while to find)... and also to give
On Sat, Apr 26, 2008 at 4:17 AM, John Patterson [EMAIL PROTECTED] wrote:
Sorry, I did find a discussion which was related [1] which ended with Igor
saying:
yes, but its also easy to fix. Just don't call any overridible methods
inside constructors. And for everything else there is
We shouldnt call it onInitialize, onFirstRender is fine, onInitialize
looks like a really after constructor call to me, but it is called
much later, if it is called (onvisible checks and so on)
On 4/26/08, Igor Vaynberg [EMAIL PROTECTED] wrote:
On Sat, Apr 26, 2008 at 4:17 AM, John Patterson
onBeforeFirstRender() ? , onFirstRender() is ambiguous with its
relation to onbeforerender()
-igor
On Sat, Apr 26, 2008 at 9:35 AM, Johan Compagner [EMAIL PROTECTED] wrote:
We shouldnt call it onInitialize, onFirstRender is fine, onInitialize
looks like a really after constructor call to me,
onBeforeFirstRender() or onPageSetup() is called only once and before
rendering.
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16916018.html
Sent from the Wicket - User mailing list archive at Nabble.com
relative to onBeforeRender()? Isn't it enough to
say onBeforeFirstRender() or onPageSetup() is called only once and before
rendering.
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16916018.html
Sent from the Wicket - User mailing list
that
rule just one more time
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16917444.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe
about the component not being rendered if it is not
visible? That is already the case with onBeforeRender(). How is this any
more confusing?
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16917466.html
Sent from the Wicket - User mailing
better - especially if this is a common
pattern.
John
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16918361.html
Sent from the Wicket - User mailing list archive at Nabble.com
. Or is there
already a method that should be used to do this?
Thanks,
John
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16742636.html
Sent from the Wicket - User mailing list archive at Nabble.com
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16742891.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED
overrideToCreateCustomComponent() is
called from the base class
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16742891.html
Sent from the Wicket - User mailing list archive at Nabble.com
be null when overrideToCreateCustomComponent()
is
called from the base class
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16742891.html
Sent from the Wicket - User mailing list archive at Nabble.com
51 matches
Mail list logo