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 write my own wicket component called XYZ that have the following
markup
wicket:panel
div wicket:id=id_xxx
/div
/wicket:panel
How can I inject some js code into this markup so when it's rendered in a
page, I got something like
wicket:panel
div wicket:id=id_xxx
script
: 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
wicket:panel
div wicket:id
am trying to Carig's
suggestion to get the MarkupStream and alter it with my stuff.
--
View this message in context:
http://www.nabble.com/how-to-inject-arbitrary-javascript-code-to-a-component-markup--tp25833726p25834380.html
Sent from the Wicket - User mailing list archive at Nabble.com
: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
in my test page,
but somehow deleted it when posting my previous message. The same 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
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
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));
: 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
.
--
View this message in context:
http://www.nabble.com/how-to-inject-arbitrary-javascript-code-to-a-component-markup--tp25833726p25837324.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe
:
http://www.nabble.com/how-to-inject-arbitrary-javascript-code-to-a-component-markup--tp25833726p25837543.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: users-unsubscr
11 matches
Mail list logo