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

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

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

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

2009-10-10 Thread Fatih Mehmet UCAR
:58 To: users@wicket.apache.org Subject: Re: how to inject arbitrary javascript code to a component markup? 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

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: html head meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 titleInsert title here/title /head body div wicket:id=csp/div /body /html Thanks Fatih, Indeed, I had div wicket:id=csp/div in

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 script.../script string? -igor On Sat, Oct 10, 2009 at 5:34 AM, Paul Huang paulhuan...@gmail.com wrote: Suppose I write my own wicket component called XYZ that have the following markup wicket:panel div wicket:id=id_xxx /div

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

2009-10-10 Thread Anton Veretennikov
For example I use this markup: script wicket:id=focusScript/script and associate it with simple class: public class FocusScript extends Label { public FocusScript(String id, String focusFieldMarkupId, boolean selectAll) { super(id, getFocusScript(focusFieldMarkupId, selectAll));

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

2009-10-10 Thread McIlwee, Craig
: Anton Veretennikov [mailto:anton.veretenni...@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: script wicket:id=focusScript/script and associate

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: script wicket:id=focusScript/script and associate it with simple class: public class FocusScript extends Label { public FocusScript(String id, String focusFieldMarkupId, boolean selectAll) { super(id,

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 String