Igor Vaynberg wrote:
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?

the javascript has a lot of GUI code in it, so it looks to me like something from the 
early days of servlets. i'm not looking for something that works, but, for something that 
works "the wicket way"


-Igor


On 5/9/06, *Ittay Dror* <[EMAIL PROTECTED] <mailto:[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]
    <mailto:[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]
    <mailto:[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] <mailto:[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
    <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
     >> >> _______________________________________________
     >> >> Wicket-user mailing list
     >> >> [email protected]
    <mailto:[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
    <http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642>
     >> > _______________________________________________
     >> > Wicket-user mailing list
     >> > [email protected]
    <mailto:[email protected]>
     >> > https://lists.sourceforge.net/lists/listinfo/wicket-user
     >> >
     >>
     >>
     >> --
     >> ===================================
     >> Ittay Dror
     >> Chief architect, openQRM TL,
     >> R&D, Qlusters Inc.
     >> [EMAIL PROTECTED] <mailto:[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
    <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
     >> _______________________________________________
     >> Wicket-user mailing list
     >> [email protected]
    <mailto:[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
    <http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642>
     > _______________________________________________
     > Wicket-user mailing list
     > [email protected]
    <mailto:[email protected]>
     > https://lists.sourceforge.net/lists/listinfo/wicket-user
     >


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

    http://www.openQRM.org <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
    <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
    _______________________________________________
    Wicket-user mailing list
    [email protected]
    <mailto:[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