On 3/28/07, Chris Colman <[EMAIL PROTECTED]> wrote:
i am against this because i do not think the value it brings is worth the
complexity it adds.

you can persuade me by coming up with examples that actually demonstrate the
advantage. it is common practice in wicket to use imodel to deffer lookup of
values until render-time, so your usecase below is trivial to fix.

class BasePage
{
        public BasePage(params)
        {
                addTitleComponent();
        }

        public void addTitleComponent()
        {
                add(new Label("title", new PropertyModel(this, "title"));
        }

        public abstract String getTitle();
}

class MyPage extends BasePage
{
        String title = null;

        public MyPage(params)
        {
                title = use params to lookup a particular
                        object in database andget its name
        }

        // !! this gets called before the constructor has initialized
title !!


          // no it doesnt, it will be called at render time

       public String getTitle() { return title; }
}


-igor
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to