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
try { > is.close(); > } catch (IOException e) { > e.printStackTrace(); > } > } > > return sb.toString(); >

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

2009-10-10 Thread PaulH98
ieldMarkupId + "').select()"):""); > } > > } > > Thanks Igor and Anton. That approach works. One thing to remember is to call "setEscapeModelStrings(false)" to insert string

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
problem persists. -- View this message in context: http://www.nabble.com/how-to-inject-arbitrary-javascript-code-to-a-component-markup--tp25833726p25834544.html Sent from the Wicket - User mailing list archive at Nabble.com.

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
tegorySelectPanel.java:37) > at com.tree.TestPage.(TestPage.java:7) > > Basically, "MarkupStream ms=getAssociatedMarkupStream(true) " caused this exception. Can anyone shed some light on this? I am trying to Carig's suggestion to get the MarkupStream and alter it with my

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

2009-10-10 Thread McIlwee, Craig
__ From: Paul Huang [mailto:paulhuan...@gmail.com] To: users@wicket.apache.org Sent: Sat, 10 Oct 2009 08:34:15 -0400 Subject: how to inject arbitrary javascript code to a component markup? Suppose I write my own wicket component called XYZ that have the following markup

how to inject arbitrary javascript code to a component markup?

2009-10-10 Thread Paul Huang
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 rendered in a page, I got something like var data=["abc", "efg"]; document.write(data[0]); . You may ask why I dont simply