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
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
Of course. In the toy example I attached, the obvious solution is to add an
id parameter.
However, in some cases, for instance when the factory methods contain longer
parameter lists, the extra identifier parameter tends to clutter the API. I
really like the encapsulation that Panels offer, but
On Mon, Jun 9, 2008 at 9:21 PM, Peter Gardfjell
[EMAIL PROTECTED] wrote:
Just to make things absolutely clear: can a Panel only be assigned an
identifier at the time its constructor is called?
Yes.
Martijn
--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache
it is possible. you can write a component that is only allowed to have
one child with any id using an IComponentResolver. is that a good
practice? if i were implementing your factory interface i would be
confused as to what id i should use since the panel takes it as a
constructor arg...so which