Re: Trouble creating a behaviour that adds JS and also a Body onLoad event

2010-07-31 Thread Mark Doyle
Ah ok, I'll test that.  I never thought of just adding it to the Page.


What, if any, is the difference between this and adding the behaviour to the
WebPage which is a kind of Component?


On Fri, Jul 30, 2010 at 7:03 PM, Martin Makundi 
martin.maku...@koodaripalvelut.com wrote:

 Hi!

 You could try this:

 public class HomePage extends WebPage implements IHeaderContributor {
  @Override
  public void renderHead(IHeaderResponse response) {
response.renderOnLoadJavascript(javascript)
  }


 **
 Martin

 2010/7/30 Mark Doyle markjohndo...@googlemail.com:
  Firstly, I'm having some trouble finding a decent behaviour tutorial.  If
  anybody knows of one post a link up.
 
  Now, the problem I am having is creating a behaviour that adds some JS to
  the head and sets an onLoad method.  The JS project instructs users to
 add:
 
  body onload=jsfunctionhere ( options, callback );
 
  but I'm not sure how Wicket supports this.
 
  Any ideas?
 
  Cheers
 

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




Re: Trouble creating a behaviour that adds JS and also a Body onLoad event

2010-07-31 Thread Martin Makundi
Headercontribution can be added to many things ...

2010/7/31 Mark Doyle markjohndo...@googlemail.com:
 Ah ok, I'll test that.  I never thought of just adding it to the Page.


 What, if any, is the difference between this and adding the behaviour to the
 WebPage which is a kind of Component?


 On Fri, Jul 30, 2010 at 7:03 PM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 Hi!

 You could try this:

 public class HomePage extends WebPage implements IHeaderContributor {
 �...@override
  public void renderHead(IHeaderResponse response) {
    response.renderOnLoadJavascript(javascript)
  }


 **
 Martin

 2010/7/30 Mark Doyle markjohndo...@googlemail.com:
  Firstly, I'm having some trouble finding a decent behaviour tutorial.  If
  anybody knows of one post a link up.
 
  Now, the problem I am having is creating a behaviour that adds some JS to
  the head and sets an onLoad method.  The JS project instructs users to
 add:
 
  body onload=jsfunctionhere ( options, callback );
 
  but I'm not sure how Wicket supports this.
 
  Any ideas?
 
  Cheers
 

 -
 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: Trouble creating a behaviour that adds JS and also a Body onLoad event

2010-07-31 Thread Mark Doyle
Yeah, I actually messed up the behaviour because I never noticed the
rendOnLoad method.

I've done as you suggested in the behaviour and then simply added that to
the component.  It works perfectly, thanks Martin.


The progression to more advanced Wicket certainly requires more web specific
knowledge that Wicket has shielded me from in the past :)


On Sat, Jul 31, 2010 at 12:48 PM, Martin Makundi 
martin.maku...@koodaripalvelut.com wrote:

 Headercontribution can be added to many things ...

 2010/7/31 Mark Doyle markjohndo...@googlemail.com:
  Ah ok, I'll test that.  I never thought of just adding it to the Page.
 
 
  What, if any, is the difference between this and adding the behaviour to
 the
  WebPage which is a kind of Component?
 
 
  On Fri, Jul 30, 2010 at 7:03 PM, Martin Makundi 
  martin.maku...@koodaripalvelut.com wrote:
 
  Hi!
 
  You could try this:
 
  public class HomePage extends WebPage implements IHeaderContributor {
   @Override
   public void renderHead(IHeaderResponse response) {
 response.renderOnLoadJavascript(javascript)
   }
 
 
  **
  Martin
 
  2010/7/30 Mark Doyle markjohndo...@googlemail.com:
   Firstly, I'm having some trouble finding a decent behaviour tutorial.
  If
   anybody knows of one post a link up.
  
   Now, the problem I am having is creating a behaviour that adds some JS
 to
   the head and sets an onLoad method.  The JS project instructs users to
  add:
  
   body onload=jsfunctionhere ( options, callback );
  
   but I'm not sure how Wicket supports this.
  
   Any ideas?
  
   Cheers
  
 
  -
  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: Trouble creating a behaviour that adds JS and also a Body onLoad event

2010-07-31 Thread Martin Makundi
Wicket is wicked ;)

**
Martin

2010/7/31 Mark Doyle markjohndo...@googlemail.com:
 Yeah, I actually messed up the behaviour because I never noticed the
 rendOnLoad method.

 I've done as you suggested in the behaviour and then simply added that to
 the component.  It works perfectly, thanks Martin.


 The progression to more advanced Wicket certainly requires more web specific
 knowledge that Wicket has shielded me from in the past :)


 On Sat, Jul 31, 2010 at 12:48 PM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 Headercontribution can be added to many things ...

 2010/7/31 Mark Doyle markjohndo...@googlemail.com:
  Ah ok, I'll test that.  I never thought of just adding it to the Page.
 
 
  What, if any, is the difference between this and adding the behaviour to
 the
  WebPage which is a kind of Component?
 
 
  On Fri, Jul 30, 2010 at 7:03 PM, Martin Makundi 
  martin.maku...@koodaripalvelut.com wrote:
 
  Hi!
 
  You could try this:
 
  public class HomePage extends WebPage implements IHeaderContributor {
  �...@override
   public void renderHead(IHeaderResponse response) {
     response.renderOnLoadJavascript(javascript)
   }
 
 
  **
  Martin
 
  2010/7/30 Mark Doyle markjohndo...@googlemail.com:
   Firstly, I'm having some trouble finding a decent behaviour tutorial.
  If
   anybody knows of one post a link up.
  
   Now, the problem I am having is creating a behaviour that adds some JS
 to
   the head and sets an onLoad method.  The JS project instructs users to
  add:
  
   body onload=jsfunctionhere ( options, callback );
  
   but I'm not sure how Wicket supports this.
  
   Any ideas?
  
   Cheers
  
 
  -
  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




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



Trouble creating a behaviour that adds JS and also a Body onLoad event

2010-07-30 Thread Mark Doyle
Firstly, I'm having some trouble finding a decent behaviour tutorial.  If
anybody knows of one post a link up.

Now, the problem I am having is creating a behaviour that adds some JS to
the head and sets an onLoad method.  The JS project instructs users to add:

body onload=jsfunctionhere ( options, callback );

but I'm not sure how Wicket supports this.

Any ideas?

Cheers


Re: Trouble creating a behaviour that adds JS and also a Body onLoad event

2010-07-30 Thread Martin Makundi
Hi!

You could try this:

public class HomePage extends WebPage implements IHeaderContributor {
  @Override
  public void renderHead(IHeaderResponse response) {
response.renderOnLoadJavascript(javascript)
  }


**
Martin

2010/7/30 Mark Doyle markjohndo...@googlemail.com:
 Firstly, I'm having some trouble finding a decent behaviour tutorial.  If
 anybody knows of one post a link up.

 Now, the problem I am having is creating a behaviour that adds some JS to
 the head and sets an onLoad method.  The JS project instructs users to add:

 body onload=jsfunctionhere ( options, callback );

 but I'm not sure how Wicket supports this.

 Any ideas?

 Cheers


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