You can do something like this.

In the html file
<label wicket:id="some-text"></label>

In Java
        Label label = new Label("some-text", "<script
type=\"text/javascript\">alert('some txt must set');</script>");
        label.setRenderBodyOnly(true);
        label.setEscapeModelStrings(false);
        add(label);

I know this is not an ideal solution, but it will work.

--Mohan



JohnSmith333 wrote:
> 
> Thanks for your kindly reply and help.
> I have read the FeedbackPanel  source code and know the use of
> HeaderContributor.
> But I still don't know how to do . Could you or anyone help me more?
> Thanks!
> 
> HeaderContributor.forJavaScript("/js/default.js");
> 
> 
> 
> igor.vaynberg wrote:
>> 
>> see how feedbackpanel is implemented, you can write a header
>> contributor to spit feedback messages to a js function
>> 
>> -igor
>> 
>> 
>> On Dec 31, 2007 7:51 AM, JohnSmith333 <[EMAIL PROTECTED]> wrote:
>>>
>>> Could anyone tell me how to set the feedback message to js function like
>>> alert("some txt must set")?
>>> thanks!
>>> --
>>> View this message in context:
>>> http://www.nabble.com/set-the-feedback-message-to-js-function-tp14558865p14558865.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/set-the-feedback-message-to-js-function-tp14558865p14565413.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to