Re: onload

2010-09-23 Thread Ole Hansen
Hi,

2010/9/23 Ole Hansen :
> Hi,
>
> 2010/9/23 Martin Grigorov :
>> Why do you have two components on "bodyElement" ?
>>
>> WebMarkupContainer body = new WebMarkupContainer("bodyElement");
>
> Yes it is redundant, but dosent seem to make a difference weather it
> is there or not.

No need to look further into this. I messed up.



>
> Thanks,
> Jess
>
>
>> add(new WebMarkupContainer("bodyElement") {
>>
>> On Thu, Sep 23, 2010 at 11:00 AM, Ole Hansen  wrote:
>>
>>> Hi,
>>>
>>> Newbee question: I need to add the onload attribute to the body tag (I
>>> can't use other methods to accomplish the same thing...)
>>>
>>> My html:
>>> 
>>> 
>>> ...
>>> 
>>> 
>>> 
>>> ...
>>> 
>>> 
>>> 
>>>
>>> Java:
>>> WebMarkupContainer body = new WebMarkupContainer("bodyElement");
>>>
>>> add(new WebMarkupContainer("bodyElement") {
>>> �...@override
>>>  public boolean isTransparentResolver() {
>>>    return true;
>>>  }
>>> �...@override
>>>  protected void onComponentTag(final ComponentTag tag) {
>>>    super.onComponentTag(tag);
>>>    tag.put("onload", "onload();");
>>>  }
>>> });
>>>
>>> Result html:
>>> 
>>> 
>>> ...
>>> 
>>> 
>>> 
>>> ...
>>>
>>> I now have two body start tags.
>>> The code below results in a runtime exception stating that bodyElement
>>> was not declared..
>>>
>>> 
>>> 
>>> ...
>>> 
>>> 
>>> 
>>>
>>> I have also tried adding:
>>> add(new BodyTagAttributeModifier("onload", true, new Model("onload();"),
>>> this));
>>>
>>> But nothing gets added to the body tag.
>>>
>>> Can someone direct me in the right direction?
>>>
>>>
>>> Wicket version: 1.4.1
>>> JDK: IBM JDK 5.0.10
>>>
>>> Regards,
>>> Jess
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: onload

2010-09-23 Thread Ole Hansen
Hi,

2010/9/23 Martin Grigorov :
> Why do you have two components on "bodyElement" ?
>
> WebMarkupContainer body = new WebMarkupContainer("bodyElement");

Yes it is redundant, but dosent seem to make a difference weather it
is there or not.


Thanks,
Jess


> add(new WebMarkupContainer("bodyElement") {
>
> On Thu, Sep 23, 2010 at 11:00 AM, Ole Hansen  wrote:
>
>> Hi,
>>
>> Newbee question: I need to add the onload attribute to the body tag (I
>> can't use other methods to accomplish the same thing...)
>>
>> My html:
>> 
>> 
>> ...
>> 
>> 
>> 
>> ...
>> 
>> 
>> 
>>
>> Java:
>> WebMarkupContainer body = new WebMarkupContainer("bodyElement");
>>
>> add(new WebMarkupContainer("bodyElement") {
>> �...@override
>>  public boolean isTransparentResolver() {
>>    return true;
>>  }
>> �...@override
>>  protected void onComponentTag(final ComponentTag tag) {
>>    super.onComponentTag(tag);
>>    tag.put("onload", "onload();");
>>  }
>> });
>>
>> Result html:
>> 
>> 
>> ...
>> 
>> 
>> 
>> ...
>>
>> I now have two body start tags.
>> The code below results in a runtime exception stating that bodyElement
>> was not declared..
>>
>> 
>> 
>> ...
>> 
>> 
>> 
>>
>> I have also tried adding:
>> add(new BodyTagAttributeModifier("onload", true, new Model("onload();"),
>> this));
>>
>> But nothing gets added to the body tag.
>>
>> Can someone direct me in the right direction?
>>
>>
>> Wicket version: 1.4.1
>> JDK: IBM JDK 5.0.10
>>
>> Regards,
>> Jess
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



onload

2010-09-23 Thread Ole Hansen
Hi,

Newbee question: I need to add the onload attribute to the body tag (I
can't use other methods to accomplish the same thing...)

My html:


...



...




Java:
WebMarkupContainer body = new WebMarkupContainer("bodyElement");

add(new WebMarkupContainer("bodyElement") {
�...@override
 public boolean isTransparentResolver() {
   return true;
 }
�...@override
 protected void onComponentTag(final ComponentTag tag) {
   super.onComponentTag(tag);
   tag.put("onload", "onload();");
 }
});

Result html:


...



...

I now have two body start tags.
The code below results in a runtime exception stating that bodyElement
was not declared..



...




I have also tried adding:
add(new BodyTagAttributeModifier("onload", true, new Model("onload();"), this));

But nothing gets added to the body tag.

Can someone direct me in the right direction?


Wicket version: 1.4.1
JDK: IBM JDK 5.0.10

Regards,
Jess

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



onload

2010-09-23 Thread Ole Hansen
Hi,

Newbee question: I need to add the onload attribute to the body tag (I
can't use other methods to accomplish the same thing...)

My html:
http://www.w3.org/1999/xhtml";
xmlns:wicket="http://org.apache.wicket.sourceforge.net/"; >

...



...




Java:
WebMarkupContainer body = new WebMarkupContainer("bodyElement");

add(new WebMarkupContainer("bodyElement") {
�...@override
 public boolean isTransparentResolver() {
   return true;
 }
�...@override
 protected void onComponentTag(final ComponentTag tag) {
   super.onComponentTag(tag);
   tag.put("onload", "onload();");
 }
});

Result html:


...



...

I now have two body start tags.
The code below results in a runtime exception stating that bodyElement
was not declared..



...




I have also tried adding:
add(new BodyTagAttributeModifier("onload", true, new Model("onload();"), this));

But nothing gets added to the body tag.

Can someone direct me in the right direction?


Wicket version: 1.4.1
JDK: IBM JDK 5.0.10

Regards,
Jess

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org