Hi,
I wouldn't use a factory for each and every component (e.g. label).
But any sufficiently large Wicket project will benefit from separating
it into separate parts which very light interdependencies only: a
plugin-based architecture.
If you're using Spring factories, you just have to take care that no
references to Spring beans leak into the components - something you have
easily with inner classes (as in the example listing 15 in the Wicket
guide).
Have fun
Sven
On 18.02.2016 09:01, Martin Grigorov wrote:
Hi,
I don't share the option in the guide.
Using factories when needed is perfectly fine.
Apache Isis uses factories to provide custom UI for almost any part of the
Wicket viewer.
BrixCMS also uses factories to create tiles.
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Thu, Feb 18, 2016 at 7:21 AM, Arjun Dhar <[email protected]> wrote:
Hi,
I have a bunch of Admin panels but i want to be able to override them. The
issue is the pages obviously use "add(new SomeAdminPanel(....))";
To overcome this I was thinking or writing a Factory, that via can create
the desired instance of the Panel and pass it to the Page. The factory
internally can use Spring to make this highly configurable.
however, I came across
https://ci.apache.org/projects/wicket/guide/6.x/guide/bestpractices.html#bestpractices_12
(Do not use factories for components)
... can anyone validate if I should let that stop me from doing what I
intend? Maybe Panels are an exception to this rule?!
thanks
-----
Software documentation is like sex: when it is good, it is very, very
good; and when it is bad, it is still better than nothing!
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Use-a-Factory-to-create-a-Panel-Yay-or-Nay-tp4673622.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]