but what is really a problem then i dont understand? all you want to do is write out some _javascript_ based on feedback messages? instead of using a feedbackpanel add a label that writes out the _javascript_ you want. you can get the messages using Page.getFeedbackMessages()

so something like this:


add(new Label("js", new AbstractReadOnlyModel() {
    Object getObject(Component c) {
          FeedbackMessages msgs=c.getPage().getFeedbackMessages();
          AppendingStringBuffer js=new AppendingStringBuffer();
          //// fill in _javascript_ into js
          return js.toString();
     }).setEscapeModelStrings(false));

and you should be good to go right?

-Igor


On 5/9/06, Ittay Dror <[EMAIL PROTECTED]> wrote:
thanx, i did look and you do amazing things with wicket

however, i still want to do it as i first suggested. the reason is that the function i mentioned is not that simple and has a lot of "gui" logic in it, which i don't want to move inside my java code.

thanx,
ittay

Eelco Hillenius wrote:
> It's explained in the javadocs. And check out the YUI projects from
> wicket-stuff and like at the Slider component which has an example of
> it. Also, see bottom of
> http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/
>
>
> Eelco
>
>
> On 5/9/06, Ittay Dror <[EMAIL PROTECTED]> wrote:
>>
>>
>> Eelco Hillenius wrote:
>> > Or take a look at what's in wicket.extensions.util.resource and look
>> > at the Slider component in YUI for an example. I think it's cleaner
>> > like that (keep the _javascript_ in seperate files and run some variable
>> > substitution over it).
>>
>> what do you mean by 'variable substitution'? how can i do that?
>>
>> >
>> > Eelco
>> >
>> > On 5/9/06, Ittay Dror < [EMAIL PROTECTED]> wrote:
>> >> hi,
>> >>
>> >> i have a feedback based on _javascript_. basically, i want to populate a
>> >> _javascript_ function's body with all messages, so it will show them one
>> >> by one.
>> >>
>> >> the final result will be like:
>> >> function showFeedback() {
>> >>         var message;
>> >>         message += "first feedback\n";
>> >>         message += "second feedback\n";
>> >>
>> >>         alert(message);
>> >> }
>> >>
>> >> theoretically, in wicket, create a panel with something like:
>> >> function showFeedback() {
>> >>         var message;
>> >>         <span wicket:id="feedback">
>> >>         message += "<span wicket:id="message"></span>
>> >>         </span>
>> >>         alert(message);
>> >> }
>> >>
>> >> but, will the parser handle this? will the 'span' tags be replaced? i
>> >> thing that at least the 'message' span will not, since it uses Label,
>> >> which replaces the body, not the tag.
>> >>
>> >> how can i do this?
>> >>
>> >> --
>> >> ===================================
>> >> Ittay Dror
>> >> Chief architect, openQRM TL,
>> >> R&D, Qlusters Inc.
>> >> [EMAIL PROTECTED]
>> >> +972-3-6081994 Fax: +972-3-6081841
>> >>
>> >> http://www.openQRM.org
>> >> - Keeps your Data-Center Up and Running
>> >>
>> >>
>> >> -------------------------------------------------------
>> >> Using Tomcat but need to do more? Need to support web services,
>> security?
>> >> Get stuff done quickly with pre-integrated technology to make your job
>> >> easier
>> >> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> >> Geronimo
>> >>
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> >> _______________________________________________
>> >> Wicket-user mailing list
>> >> [email protected]
>> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >>
>> >
>> >
>> > -------------------------------------------------------
>> > Using Tomcat but need to do more? Need to support web services,
>> security?
>> > Get stuff done quickly with pre-integrated technology to make your job
>> > easier
>> > Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> Geronimo
>> > http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642
>> > _______________________________________________
>> > Wicket-user mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >
>>
>>
>> --
>> ===================================
>> Ittay Dror
>> Chief architect, openQRM TL,
>> R&D, Qlusters Inc.
>> [EMAIL PROTECTED]
>> +972-3-6081994 Fax: +972-3-6081841
>>
>> http://www.openQRM.org
>> - Keeps your Data-Center Up and Running
>>
>>
>> -------------------------------------------------------
>> Using Tomcat but need to do more? Need to support web services, security?
>> Get stuff done quickly with pre-integrated technology to make your job
>> easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> Wicket-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


--
===================================
Ittay Dror
Chief architect, openQRM TL,
R&D, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to