Re: [Wicket-user] using feedback not based on labels
Igor Vaynberg wrote: so you want to use it outside the model? outside of an IModel context, yes. but then feedbackpanel.anyMessage(int level) is just Page.getFeedbackMessages().hasAnyMessage(new ErrorLevelFeedbackMessage(level)) no? no, because the model joins the page messages and session messages -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: it will be too much of a pain, since most issues are because i'm using wicket in an existing application, built on struts. however, i would appriciate it if you could answer some specific questions. i'm trying to create my own feedback panel. an issue i encountered is that FeedbackPanel has the anyMessages() method, which i also need, i can copy the code, but isn't it better to move it to FeedbackMessage, as static utility methods? or, better yet, create a FeedbackMessages class which has the logic found in FeedbackMessagesModel, so it can be reused outside of the context of a model? ittay Igor Vaynberg wrote: give us an html snippet of what you want as the end result and tell us where the components are. it is very difficult to talk on such a huge abstraction level. -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: 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 -- === Ittay Dror Chief architect, openQRM TL, RD, 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=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror Chief architect, openQRM TL, RD, 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] using feedback not based on labels
maybe you can submit a patchhere is what i would suggestextract IFeedbackMessages interface from FeedbackMessages and create a CompoundFeedbackMessages impl, that way you can join the session and page messages yourself and still use the same utility methods in FeedbackMessages on the joined collection. how does that sound?-IgorOn 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote: Igor Vaynberg wrote: so you want to use it outside the model?outside of an IModel context, yes. but then feedbackpanel.anyMessage(int level) is just Page.getFeedbackMessages ().hasAnyMessage(new ErrorLevelFeedbackMessage(level)) no?no, because the model joins the page messages and session messages -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: it will be too much of a pain, since most issues are because i'm using wicket in an existing application, built on struts. however, i would appriciate it if you could answer some specific questions. i'm trying to create my own feedback panel. an issue i encountered is that FeedbackPanel has the anyMessages() method, which i also need, i can copy the code, but isn't it better to move it to FeedbackMessage, as static utility methods? or, better yet, create a FeedbackMessages class which has the logic found in FeedbackMessagesModel, so it can be reused outside of the context of a model? ittay Igor Vaynberg wrote: give us an html snippet of what you want as the end result and tell us where the components are. it is very difficult to talk on such a huge abstraction level. -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: 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 -- === Ittay Dror Chief architect, openQRM TL, RD, 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=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto: Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --===Ittay DrorChief architect, openQRM TL,RD, 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 easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] using feedback not based on labels
yep although i think an abstract base class suffices will try to do it shortly. Igor Vaynberg wrote: maybe you can submit a patch here is what i would suggest extract IFeedbackMessages interface from FeedbackMessages and create a CompoundFeedbackMessages impl, that way you can join the session and page messages yourself and still use the same utility methods in FeedbackMessages on the joined collection. how does that sound? -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Igor Vaynberg wrote: so you want to use it outside the model? outside of an IModel context, yes. but then feedbackpanel.anyMessage(int level) is just Page.getFeedbackMessages ().hasAnyMessage(new ErrorLevelFeedbackMessage(level)) no? no, because the model joins the page messages and session messages -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: it will be too much of a pain, since most issues are because i'm using wicket in an existing application, built on struts. however, i would appriciate it if you could answer some specific questions. i'm trying to create my own feedback panel. an issue i encountered is that FeedbackPanel has the anyMessages() method, which i also need, i can copy the code, but isn't it better to move it to FeedbackMessage, as static utility methods? or, better yet, create a FeedbackMessages class which has the logic found in FeedbackMessagesModel, so it can be reused outside of the context of a model? ittay Igor Vaynberg wrote: give us an html snippet of what you want as the end result and tell us where the components are. it is very difficult to talk on such a huge abstraction level. -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: 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 -- === Ittay Dror Chief architect, openQRM TL, RD, Qlusters Inc. [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [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=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list
Re: [Wicket-user] using feedback not based on labels
ok, i have it. how do i send it? i created an AbstractFeedbackMessages, which has 2 abstract methods: isReadonly() and getMessages(). the rest use them i'm thinking of maybe change it to ReadonlyFeedbackMessages and FeedbackMessages which will extend it, and CompoundFeedbackMessages will extend it also. what do you think? Igor Vaynberg wrote: maybe you can submit a patch here is what i would suggest extract IFeedbackMessages interface from FeedbackMessages and create a CompoundFeedbackMessages impl, that way you can join the session and page messages yourself and still use the same utility methods in FeedbackMessages on the joined collection. how does that sound? -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Igor Vaynberg wrote: so you want to use it outside the model? outside of an IModel context, yes. but then feedbackpanel.anyMessage(int level) is just Page.getFeedbackMessages ().hasAnyMessage(new ErrorLevelFeedbackMessage(level)) no? no, because the model joins the page messages and session messages -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: it will be too much of a pain, since most issues are because i'm using wicket in an existing application, built on struts. however, i would appriciate it if you could answer some specific questions. i'm trying to create my own feedback panel. an issue i encountered is that FeedbackPanel has the anyMessages() method, which i also need, i can copy the code, but isn't it better to move it to FeedbackMessage, as static utility methods? or, better yet, create a FeedbackMessages class which has the logic found in FeedbackMessagesModel, so it can be reused outside of the context of a model? ittay Igor Vaynberg wrote: give us an html snippet of what you want as the end result and tell us where the components are. it is very difficult to talk on such a huge abstraction level. -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: 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 -- === Ittay Dror Chief architect, openQRM TL, RD, Qlusters Inc. [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [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=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
Re: [Wicket-user] using feedback not based on labels
hrm, so now if you want to join the two what do you do in getMessages() of the compound impl?create a new arraylist and merge messages from the other two? do you do the merged array generation on every call or keep it in a transient field? -IgorOn 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote: ok, i have it. how do i send it?i created an AbstractFeedbackMessages, which has 2 abstract methods: isReadonly() and getMessages(). the rest use themi'm thinking of maybe change it to ReadonlyFeedbackMessages and FeedbackMessages which will extend it, and CompoundFeedbackMessages will extend it also. what do you think?Igor Vaynberg wrote: maybe you can submit a patch here is what i would suggest extract IFeedbackMessages interface from FeedbackMessages and create a CompoundFeedbackMessages impl, that way you can join the session and page messages yourself and still use the same utility methods in FeedbackMessages on the joined collection. how does that sound? -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Igor Vaynberg wrote: so you want to use it outside the model? outside of an IModel context, yes. but then feedbackpanel.anyMessage(int level) is just Page.getFeedbackMessages ().hasAnyMessage(new ErrorLevelFeedbackMessage(level)) no? no, because the model joins the page messages and session messages -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: it will be too much of a pain, since most issues are because i'm using wicket in an existing application, built on struts. however, i would appriciate it if you could answer some specific questions. i'm trying to create my own feedback panel. an issue i encountered is that FeedbackPanel has the anyMessages() method, which i also need, i can copy the code, but isn't it better to move it to FeedbackMessage, as static utility methods? or, better yet, create a FeedbackMessages class which has the logic found in FeedbackMessagesModel, so it can be reused outside of the context of a model? ittay Igor Vaynberg wrote: give us an html snippet of what you want as the end result and tell us where the components are. it is very difficult to talk on such a huge abstraction level. -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: 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 -- === Ittay Dror Chief architect, openQRM TL, RD, Qlusters Inc. [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto: [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=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto: Wicket-user@lists.sourceforge.net mailto: Wicket-user@lists.sourceforge.net mailto: Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror Chief architect, openQRM TL, RD, 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
Re: [Wicket-user] using feedback not based on labels
Igor Vaynberg wrote: hrm, so now if you want to join the two what do you do in getMessages() of the compound impl? create a new arraylist and merge messages from the other two? do you do the merged array generation on every call or keep it in a transient field? i copy the code from FeeedbackMessagesModel ;-) (it keeps the array in a transient field) -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: ok, i have it. how do i send it? i created an AbstractFeedbackMessages, which has 2 abstract methods: isReadonly() and getMessages(). the rest use them i'm thinking of maybe change it to ReadonlyFeedbackMessages and FeedbackMessages which will extend it, and CompoundFeedbackMessages will extend it also. what do you think? Igor Vaynberg wrote: maybe you can submit a patch here is what i would suggest extract IFeedbackMessages interface from FeedbackMessages and create a CompoundFeedbackMessages impl, that way you can join the session and page messages yourself and still use the same utility methods in FeedbackMessages on the joined collection. how does that sound? -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Igor Vaynberg wrote: so you want to use it outside the model? outside of an IModel context, yes. but then feedbackpanel.anyMessage(int level) is just Page.getFeedbackMessages ().hasAnyMessage(new ErrorLevelFeedbackMessage(level)) no? no, because the model joins the page messages and session messages -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: it will be too much of a pain, since most issues are because i'm using wicket in an existing application, built on struts. however, i would appriciate it if you could answer some specific questions. i'm trying to create my own feedback panel. an issue i encountered is that FeedbackPanel has the anyMessages() method, which i also need, i can copy the code, but isn't it better to move it to FeedbackMessage, as static utility methods? or, better yet, create a FeedbackMessages class which has the logic found in FeedbackMessagesModel, so it can be reused outside of the context of a model? ittay Igor Vaynberg wrote: give us an html snippet of what you want as the end result and tell us where the components are. it is very difficult to talk on such a huge abstraction level. -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: 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
Re: [Wicket-user] using feedback not based on labels
nice thing about having an interface is that you dont have to do that, you can aggregate on demand and for things like Iterator simply return a compound iterator. but this is more work.i guess your way works too. create a patch and attach it to our sf.net tracker and one of the core devels will merge it in.-IgorOn 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote:Igor Vaynberg wrote: hrm, so now if you want to join the two what do you do in getMessages() of the compound impl? create a new arraylist and merge messages from the other two? do you do the merged array generation on every call or keep it in a transient field?i copy the code from FeeedbackMessagesModel ;-) (it keeps the array in a transient field) -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: ok, i have it. how do i send it? i created an AbstractFeedbackMessages, which has 2 abstract methods: isReadonly() and getMessages(). the rest use them i'm thinking of maybe change it to ReadonlyFeedbackMessages and FeedbackMessages which will extend it, and CompoundFeedbackMessages will extend it also. what do you think? Igor Vaynberg wrote: maybe you can submit a patch here is what i would suggest extract IFeedbackMessages interface from FeedbackMessages and create a CompoundFeedbackMessages impl, that way you can join the session and page messages yourself and still use the same utility methods in FeedbackMessages on the joined collection. how does that sound? -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Igor Vaynberg wrote: so you want to use it outside the model? outside of an IModel context, yes. but then feedbackpanel.anyMessage(int level) is just Page.getFeedbackMessages ().hasAnyMessage(new ErrorLevelFeedbackMessage(level)) no? no, because the model joins the page messages and session messages -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: it will be too much of a pain, since most issues are because i'm using wicket in an existing application, built on struts. however, i would appriciate it if you could answer some specific questions. i'm trying to create my own feedback panel. an issue i encountered is that FeedbackPanel has the anyMessages() method, which i also need, i can copy the code, but isn't it better to move it to FeedbackMessage, as static utility methods? or, better yet, create a FeedbackMessages class which has the logic found in FeedbackMessagesModel, so it can be reused outside of the context of a model? ittay Igor Vaynberg wrote: give us an html snippet of what you want as the end result and tell us where the components are. it is very difficult to talk on such a huge abstraction level. -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: 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 -- === Ittay Dror Chief architect, openQRM TL, RD, Qlusters Inc. [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [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=lnkkid=120709bid=263057dat=121642
[Wicket-user] using feedback not based on labels
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, RD, 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] using feedback not based on labels
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). 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, RD, 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 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=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] using feedback not based on labels
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, RD, 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 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=kkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror Chief architect, openQRM TL, RD, 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] using feedback not based on labels
ok, i got most of it. last question: can the template have a way to loop on a list? if not, then how do you suggest i templatize the messages, so their formatting is kept in the js file? thanx, ittay Ittay Dror 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, RD, 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 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=kkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror Chief architect, openQRM TL, RD, 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] using feedback not based on labels
The templating function is deliberately kept simple. If you want it's pretty easy to create your own template thingies using e.g. Velocity or Freemarker. But in this case, it's probably sufficient to just concatenate the list yourself and do substitution of one variable placeholder. Thus: in your Java code you do the loop and create the 'message' part: messages.append(first feedback\n').append(second feedback\n); or something smarter, and then replace ${messages} function showFeedback() { var '${messages}'; alert(message); } Eelco On 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote: ok, i got most of it. last question: can the template have a way to loop on a list? if not, then how do you suggest i templatize the messages, so their formatting is kept in the js file? thanx, ittay Ittay Dror 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, RD, 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 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=kkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror Chief architect, openQRM TL, RD, 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 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=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] using feedback not based on labels
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, RD, 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 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=kkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror Chief architect, openQRM TL, RD, 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 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=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] using feedback not based on labels
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, RD, 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 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=kkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror Chief architect, openQRM TL, RD, 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 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=kkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror Chief architect, openQRM TL, RD, 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net
Re: [Wicket-user] using feedback not based on labels
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? -IgorOn 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote: thanx, i did look and you do amazing things with wickethowever, 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,ittayEelco 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, RD, 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 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=kkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- === Ittay Dror Chief architect, openQRM TL, RD, 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 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=kkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user--=== Ittay DrorChief architect, openQRM TL,RD, Qlusters
Re: [Wicket-user] using feedback not based on labels
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, RD, 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=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net 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=kkid0709bid3057dat1642 http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] using feedback not based on labels
give us an html snippet of what you want as the end result and tell us where the components are. it is very difficult to talk on such a huge abstraction level.-IgorOn 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote: 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
Re: [Wicket-user] using feedback not based on labels
it will be too much of a pain, since most issues are because i'm using wicket in an existing application, built on struts. however, i would appriciate it if you could answer some specific questions. i'm trying to create my own feedback panel. an issue i encountered is that FeedbackPanel has the anyMessages() method, which i also need, i can copy the code, but isn't it better to move it to FeedbackMessage, as static utility methods? or, better yet, create a FeedbackMessages class which has the logic found in FeedbackMessagesModel, so it can be reused outside of the context of a model? ittay Igor Vaynberg wrote: give us an html snippet of what you want as the end result and tell us where the components are. it is very difficult to talk on such a huge abstraction level. -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: 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 -- === Ittay Dror Chief architect, openQRM TL, RD, 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] using feedback not based on labels
so you want to use it outside the model?but then feedbackpanel.anyMessage(int level) is justPage.getFeedbackMessages().hasAnyMessage(new ErrorLevelFeedbackMessage(level)) no?-Igor On 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote: it will be too much of a pain, since most issues are because i'm using wicket in an existing application, built on struts.however, i would appriciate it if you could answer some specific questions.i'm trying to create my own feedback panel. an issue i encountered is that FeedbackPanel has the anyMessages() method, which i also need, i can copy the code, but isn't it better to move it to FeedbackMessage, as static utility methods? or, better yet, create a FeedbackMessages class which has the logic found in FeedbackMessagesModel, so it can be reused outside of the context of a model? ittayIgor Vaynberg wrote: give us an html snippet of what you want as the end result and tell us where the components are. it is very difficult to talk on such a huge abstraction level. -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: 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--===Ittay DrorChief architect, openQRM TL,RD, Qlusters Inc. [EMAIL PROTECTED]+972-3-6081994 Fax: +972-3-6081841http://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 easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user