Ah, you're right :) Here is the check I didn't consider:
if (bodyContainer == null) {
...
}
2007/4/29, Igor Vaynberg <[EMAIL PROTECTED]>:
> well if you look at the code, the way it works is: only do it if it hasnt
> been done already. so this code only does anything on the first attach, then
>
well if you look at the code, the way it works is: only do it if it hasnt
been done already. so this code only does anything on the first attach, then
it becomes a noop.
-igor
On 4/29/07, Rüdiger Schulz <[EMAIL PROTECTED]> wrote:
Hello Igor,
thanks for your help, it was a very close hit :) I
Hello Igor,
thanks for your help, it was a very close hit :) I actually had to put
the code into internalOnttatch like this:
protected void internalOnAttach() {
super.internalOnAttach();
Component body=get(BodyOnLoadHandler.BODY_ID);
if (body!=null) {
if (!(body instanceof MyHtmlBodyCont
you can most likely move that code to page.onattach() and do
Component body=get(BodyOnLoadHandler.BODY_ID);
if (body!=null) {
if (!(body instanceof MyHtmlBodyContainer)) {
remove(BodyOnLoadHandler.BODY_ID);
body=null;
}
}
if (body==null) {
add(new ...);
}
-igor
On 4/29