What exactly are you trying to do? Different view elements based on the state of your model or its type. On Oct 31, 2011 9:50 AM, "Bertrand Guay-Paquet" <[email protected]> wrote:
> Hi, > > Was is the proper way to choose which panel to add to a page based on a > model's object value? Currently, I directly access the model and check the > value during construction of the page. However, this is wrong since a > model's object shouldn't be accessed until component rendering (see thread > "LDMs load too early - hold outdated application data"). > > One obvious approach is to add all possible panels to the page and > override their isVisible() method to inspect the model objects. This seems > like wasted processing and memory so I'd like to avoid it. > > The page's onConfigure() and onBeforeRender() methods are the candidates I > can think of to inspect the model object's value and add the proper panel. > Is one better or is there another solution? Are there other issues with > this approach? > > Regards, > Bertrand > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > users-unsubscribe@wicket.**apache.org<[email protected]> > For additional commands, e-mail: [email protected] > >
