pass the id into the createPanel method -igor
On Mon, Jun 9, 2008 at 11:51 AM, Peter Gardfjell <[EMAIL PROTECTED]> wrote: > > Hi, > > a quick question. Is it possible to assign a new id to a Panel after it has > been constructed? > Something similar to: > > public Panel createPanel() { > return new MyPanel("dummyID", ...); > } > ... > ... > Panel myPanel = createPanel(); > myPanel.setId("newID"); > > I would like to have a component that acts as a Panel factory (the > createPanel method above), without requiring the factory to now about the > markup context of the calling code. Hence, the factory method would create > it with a dummy id that is replaced by the consumer to adapt it to its > markup context. > > Is something along these lines possible in Wicket? Or is there perhaps > another ("wicket way") for achieving tasks like these. > > regards, Peter > > -- > View this message in context: > http://www.nabble.com/Can-a-Panel%27s-id-be-re-assigned-after-construction--tp17739309p17739309.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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]