Re: how to inject arbitrary javascript code to a component markup?

2009-10-11 Thread nino martinez wael
This is a clear case for a behavior, and would be simple too.. Like so: https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/artwork-parent/artwork/src/main/java/org/wicketstuff/artwork/niftycorners/NiftyCornersBehavior.java 2009/10/10 Paul Huang > Suppose I wri

Re: how to inject arbitrary javascript code to a component markup?

2009-10-10 Thread PaulH98
McIlwee, Craig wrote: > > Didn't think of that approach, looks good. But to clear up my previous > suggestion since I guess I wasn't clear enough and its useful in other > situations also, you need to _override_ > getAssociatedMarkupStream(boolean), not just call it. > > public static final S

Re: how to inject arbitrary javascript code to a component markup?

2009-10-10 Thread PaulH98
Anton Veretennikov wrote: > > For example I use this markup: > > > > and associate it with simple class: > > public class FocusScript extends Label { > > public FocusScript(String id, String focusFieldMarkupId, boolean > selectAll) { > super(id, getFocusScript(focusFieldMarkupId, sel

Re: how to inject arbitrary javascript code to a component markup?

2009-10-10 Thread McIlwee, Craig
nni...@gmail.com] To: users@wicket.apache.org Sent: Sat, 10 Oct 2009 11:24:12 -0400 Subject: Re: how to inject arbitrary javascript code to a component markup? For example I use this markup: and associate it with simple class: public class FocusScript extends Label { public F

Re: how to inject arbitrary javascript code to a component markup?

2009-10-10 Thread Anton Veretennikov
For example I use this markup: and associate it with simple class: public class FocusScript extends Label { public FocusScript(String id, String focusFieldMarkupId, boolean selectAll) { super(id, getFocusScript(focusFieldMarkupId, selectAll)); setEscapeModelStrings(false); } @Ov

Re: how to inject arbitrary javascript code to a component markup?

2009-10-10 Thread Igor Vaynberg
can you not just use a label whose model is the "..." string? -igor On Sat, Oct 10, 2009 at 5:34 AM, Paul Huang wrote: > Suppose I write my own wicket component called XYZ that have the following > markup > > > > > > > > How can I inject some js code into this markup so when it's render

RE: how to inject arbitrary javascript code to a component markup?

2009-10-10 Thread PaulH98
Fatih Mehmet UCAR wrote: > > Add a div to your page like below: > > > > Insert title here > > > > > > > > Thanks Fatih, Indeed, I had "" in my test page, but somehow deleted it when posting my previous message. The same problem persists. -- View this message in context:

RE: how to inject arbitrary javascript code to a component markup?

2009-10-10 Thread Fatih Mehmet UCAR
Add a div to your page like below: Insert title here -Original Message- From: PaulH98 [mailto:paulhuan...@gmail.com] Sent: 10 October 2009 14:58 To: users@wicket.apache.org Subject: Re: how to inject arbitrary javascript code to a component markup? McIlwee, Craig

Re: how to inject arbitrary javascript code to a component markup?

2009-10-10 Thread PaulH98
McIlwee, Craig wrote: > > If your component is a MarkupContainer you can override > getAssociatedMarkupStream(boolean) and build the markup on the fly. So > maybe still have the HTML file that you read in as a template with some > place holder string and in the override you replace the place h

Re: how to inject arbitrary javascript code to a component markup?

2009-10-10 Thread McIlwee, Craig
If your component is a MarkupContainer you can override getAssociatedMarkupStream(boolean) and build the markup on the fly. So maybe still have the HTML file that you read in as a template with some place holder string and in the override you replace the place holder with stuff you want to be