[Wicket-user] do not want to log ERROR when visiting a nonexistant page
In my web app, when someone visits a page that doesn't exist (eg. by manually mucking with the url), they might end up at an error page with a stack trace, and also when that happens, wicket logs an ERROR like: "ERROR [RequestCycle] - Unable to load class with name: com.foo.bar". I don't like that this is an ERROR, since our monitoring picks it up and will send spurious warning emails to our team. Is there a better way I can be dealing with this? Thanks, Lowell - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Is it possible to remove something from a page?
Cool, that looks sensical to me. I like how I don't have to actually have the stars in my html file. But one thing - the isEnabled() method does not exist in the AbstractBehavior class. But I think the following will work: label.add(new AbstractBehavior() { @Override public void onRendered(Component component) { if (starIsVisible) { Response response = component.getResponse(); response.write("*"); } } }); On 5/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > Lowell, > > Sorry for my bad answers today, I was doing too many things at the > same time, and now that I re-read your use case I think I understand > better what you want. > > If I'm correct, you want to decorate a label with a star, and use some > css class or id with that star and have the ability to turn the star > off or on depending on a condition. > > Disregard the rest of the thread, because indeed Labels (or any > component replacing their bodies) don't allow nested components. Your > best choice is to use a behavior: > > label.add(new AbstractBehavior() { > > @Override > public boolean isEnabled(Component component) { > return myCondition(); > } > > @Override > public void onRendered(Component component) { > Response response = component.getResponse(); > response.write("*"); > } > }); > > The behavior writes directly to the response (after the component > itself is rendered) and the visibility can be steered using isEnabled. > > Do note that if it wasn't for the fact that you're trying to decorate > labels, you could have used Borders instead of a behavior. Not to say > that this is better, just be aware of the alternative (in case you are > annotating markupcontainers). > > Hope this helps, > > Eelco > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Is it possible to remove something from a page?
> Some CSS gurus claim that CSS could be used to append or > prepend content to elements, so maybe you would be easier > off by doing just that and toggling the css class > programmatically. That would work. I tried googling how to do that, with no luck. Anybody have any pointers or links? lowell - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Is it possible to remove something from a page?
Oh, if this helps, what I want could be achieved with this: TEXT * and then doing something like: foobar = new MarkupContainer("foobar"); foobar.add(new Label("text", ...)) foobar.add(new WebMarkupContainer("removeMe") { public boolean isVisible() { return sometimesFalse(); } }); add(foobar); but I find the template html to be less readable in this case and was hoping to not have to do it this way. Lowell On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > Basically what I want to do is from this markup: > > * > > I'd like to replace 'TEXT' with some text from my java code, and would > like to set the visibility of the 'star' span from within my code. > > Replacing TEXT seems similar to what a Label does, but a Label won't > support the embedded 'star' span. So I tried to mimic Label my > creating my own component (I tried WebMarkupContainer) and mimic the > behavior of Label, but also allow for the embedded component. So I > tried to override the onComponentTagBody() method with one that calls > replaceComponentTagBody() but that didn't work because that removed > the 'star' span. > > So what I'd really like to do would be to create my custom component > and somehow tell it to replace the text of its body (ie. the 'TEXT') > but to do so without removing child components. > > Make sense? > > On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > And which Panel method do I need to call to set its text without > > removing the star Component? > > > > On 5/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > LabelWithStar should extend Panel. > > > > > > Eelco > > > > > > On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > But I get the following error: > > > > > > > > ...WicketMessage: Expected close tag for '' > > > > Possible attempt to embed component(s) '' in > > > > the body of this component which discards its body > > > > > > > > Doesn't that mean my approach is flawed? > > > > > > > > On 5/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > > > Then you should be able to use that label idea and embed it in your > > > > > component. > > > > > > > > > > Eelco > > > > > > > > > > On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > > > Once again I left out a detail - the reason I have the span is that > > > > > > I > > > > > > want to apply a CSS class to the star. Also, I like to have the star > > > > > > as a child of the other component, because that way I don't have to > > > > > > assign unique names to each star, and also, I can package the text > > > > > > and > > > > > > the star as one object type (or just use a single method to deal > > > > > > with > > > > > > both at once) so that I don't have duplicated code. > > > > > > > > > > > > On 5/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > > > > > On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > > > > > My use case is actually turning out slightly more complex than I > > > > > > > > posted. What I actually have is: > > > > > > > > > > > > > > > > TEXT* > > > > > > > > > > > > > > > > and I'd like to sometimes remove the star. So my java (which > > > > > > > > doesn't > > > > > > > > work) looks like: > > > > > > > > > > > > > > > >private static class LabelWithStar extends WebMarkupContainer > > > > > > > > { > > > > > > > > public LabelWithStar(String id, String model, final > > > > > > > > boolean > > > > > > > > starIsVisible) > > > > > > > > { > > > > > > > > super(id, new Model(model)); > > > > > > > > this.add(new WebMarkupContainer("star") { > > > > > > > > public boolean isVisible() > > > > > > > >
Re: [Wicket-user] Is it possible to remove something from a page?
Basically what I want to do is from this markup: * I'd like to replace 'TEXT' with some text from my java code, and would like to set the visibility of the 'star' span from within my code. Replacing TEXT seems similar to what a Label does, but a Label won't support the embedded 'star' span. So I tried to mimic Label my creating my own component (I tried WebMarkupContainer) and mimic the behavior of Label, but also allow for the embedded component. So I tried to override the onComponentTagBody() method with one that calls replaceComponentTagBody() but that didn't work because that removed the 'star' span. So what I'd really like to do would be to create my custom component and somehow tell it to replace the text of its body (ie. the 'TEXT') but to do so without removing child components. Make sense? On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > And which Panel method do I need to call to set its text without > removing the star Component? > > On 5/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > LabelWithStar should extend Panel. > > > > Eelco > > > > On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > But I get the following error: > > > > > > ...WicketMessage: Expected close tag for '' > > > Possible attempt to embed component(s) '' in > > > the body of this component which discards its body > > > > > > Doesn't that mean my approach is flawed? > > > > > > On 5/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > > Then you should be able to use that label idea and embed it in your > > > > component. > > > > > > > > Eelco > > > > > > > > On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > > Once again I left out a detail - the reason I have the span is that I > > > > > want to apply a CSS class to the star. Also, I like to have the star > > > > > as a child of the other component, because that way I don't have to > > > > > assign unique names to each star, and also, I can package the text and > > > > > the star as one object type (or just use a single method to deal with > > > > > both at once) so that I don't have duplicated code. > > > > > > > > > > On 5/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > > > > On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > > > > My use case is actually turning out slightly more complex than I > > > > > > > posted. What I actually have is: > > > > > > > > > > > > > > TEXT* > > > > > > > > > > > > > > and I'd like to sometimes remove the star. So my java (which > > > > > > > doesn't > > > > > > > work) looks like: > > > > > > > > > > > > > >private static class LabelWithStar extends WebMarkupContainer > > > > > > > { > > > > > > > public LabelWithStar(String id, String model, final > > > > > > > boolean > > > > > > > starIsVisible) > > > > > > > { > > > > > > > super(id, new Model(model)); > > > > > > > this.add(new WebMarkupContainer("star") { > > > > > > > public boolean isVisible() > > > > > > > { > > > > > > > return starIsVisible; > > > > > > > } > > > > > > > }); > > > > > > > } > > > > > > > > > > > > > > protected void onComponentTagBody(MarkupStream > > > > > > > markupStream, > > > > > > > ComponentTag openTag) > > > > > > > { > > > > > > > replaceComponentTagBody(markupStream, openTag, > > > > > > > getModelObjectAsString()); > > > > > > > } > > > > > > > } > > > > > > > > > > > > > > This doesn't work because the call to replaceComponentTagBody() > > > > > > > removes the span with the star. How should I be doing this > > > > > > > instead? > > > > > > > > > > &
Re: [Wicket-user] Is it possible to remove something from a page?
And which Panel method do I need to call to set its text without removing the star Component? On 5/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > LabelWithStar should extend Panel. > > Eelco > > On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > But I get the following error: > > > > ...WicketMessage: Expected close tag for '' > > Possible attempt to embed component(s) '' in > > the body of this component which discards its body > > > > Doesn't that mean my approach is flawed? > > > > On 5/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > Then you should be able to use that label idea and embed it in your > > > component. > > > > > > Eelco > > > > > > On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > Once again I left out a detail - the reason I have the span is that I > > > > want to apply a CSS class to the star. Also, I like to have the star > > > > as a child of the other component, because that way I don't have to > > > > assign unique names to each star, and also, I can package the text and > > > > the star as one object type (or just use a single method to deal with > > > > both at once) so that I don't have duplicated code. > > > > > > > > On 5/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > > > On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > > > My use case is actually turning out slightly more complex than I > > > > > > posted. What I actually have is: > > > > > > > > > > > > TEXT* > > > > > > > > > > > > and I'd like to sometimes remove the star. So my java (which doesn't > > > > > > work) looks like: > > > > > > > > > > > >private static class LabelWithStar extends WebMarkupContainer > > > > > > { > > > > > > public LabelWithStar(String id, String model, final boolean > > > > > > starIsVisible) > > > > > > { > > > > > > super(id, new Model(model)); > > > > > > this.add(new WebMarkupContainer("star") { > > > > > > public boolean isVisible() > > > > > > { > > > > > > return starIsVisible; > > > > > > } > > > > > > }); > > > > > > } > > > > > > > > > > > > protected void onComponentTagBody(MarkupStream markupStream, > > > > > > ComponentTag openTag) > > > > > > { > > > > > > replaceComponentTagBody(markupStream, openTag, > > > > > > getModelObjectAsString()); > > > > > > } > > > > > > } > > > > > > > > > > > > This doesn't work because the call to replaceComponentTagBody() > > > > > > removes the span with the star. How should I be doing this instead? > > > > > > > > > > You mean you need to have the span? Why is that? > > > > > > > > > > Alternatively, you can do something like > > > > > > > > > > add(new Label("star", new AbstractReadOnlyModel() { > > > > > > > > > > @Override > > > > > public Object getObject() { > > > > > return isStarVisible() ? "*" : ""; > > > > > } > > > > > })); > > > > > } > > > > > > > > > > > > > > > Eelco > > > > > > > > > > - > > > > > This SF.net email is sponsored by DB2 Express > > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > > control of your XML. No limits. Just data. Click to get it now. > > > > > http://sourceforge.net/powerbar/db2/ > > > > > ___ > > > > > Wicket-user mailing list > > > > > Wicket-user@lists.sourceforge.net > > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > >
Re: [Wicket-user] Is it possible to remove something from a page?
Well, I need some way of setting the text from within my java code so i don't see how I could get away without it. On 5/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > Actually, do you need at all? > > Eelco > > On 5/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > LabelWithStar should extend Panel. > > > > Eelco > > > > On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > But I get the following error: > > > > > > ...WicketMessage: Expected close tag for '' > > > Possible attempt to embed component(s) '' in > > > the body of this component which discards its body > > > > > > Doesn't that mean my approach is flawed? > > > > > > On 5/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > > Then you should be able to use that label idea and embed it in your > > > > component. > > > > > > > > Eelco > > > > > > > > On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > > Once again I left out a detail - the reason I have the span is that I > > > > > want to apply a CSS class to the star. Also, I like to have the star > > > > > as a child of the other component, because that way I don't have to > > > > > assign unique names to each star, and also, I can package the text and > > > > > the star as one object type (or just use a single method to deal with > > > > > both at once) so that I don't have duplicated code. > > > > > > > > > > On 5/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > > > > On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > > > > My use case is actually turning out slightly more complex than I > > > > > > > posted. What I actually have is: > > > > > > > > > > > > > > TEXT* > > > > > > > > > > > > > > and I'd like to sometimes remove the star. So my java (which > > > > > > > doesn't > > > > > > > work) looks like: > > > > > > > > > > > > > >private static class LabelWithStar extends WebMarkupContainer > > > > > > > { > > > > > > > public LabelWithStar(String id, String model, final > > > > > > > boolean > > > > > > > starIsVisible) > > > > > > > { > > > > > > > super(id, new Model(model)); > > > > > > > this.add(new WebMarkupContainer("star") { > > > > > > > public boolean isVisible() > > > > > > > { > > > > > > > return starIsVisible; > > > > > > > } > > > > > > > }); > > > > > > > } > > > > > > > > > > > > > > protected void onComponentTagBody(MarkupStream > > > > > > > markupStream, > > > > > > > ComponentTag openTag) > > > > > > > { > > > > > > > replaceComponentTagBody(markupStream, openTag, > > > > > > > getModelObjectAsString()); > > > > > > > } > > > > > > > } > > > > > > > > > > > > > > This doesn't work because the call to replaceComponentTagBody() > > > > > > > removes the span with the star. How should I be doing this > > > > > > > instead? > > > > > > > > > > > > You mean you need to have the span? Why is that? > > > > > > > > > > > > Alternatively, you can do something like > > > > > > > > > > > > add(new Label("star", new AbstractReadOnlyModel() { > > > > > > > > > > > > @Override > > > > > > public Object getObject() { > > > > > > return isStarVisible() ? "*" : ""; > > > > > > } > > > > > > })); > > > > > > } > > > > > > > > > > > > > > > > > > Eelco > > > > > > > > > > > > --
Re: [Wicket-user] Is it possible to remove something from a page?
But I get the following error: ...WicketMessage: Expected close tag for '' Possible attempt to embed component(s) '' in the body of this component which discards its body Doesn't that mean my approach is flawed? On 5/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > Then you should be able to use that label idea and embed it in your component. > > Eelco > > On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > Once again I left out a detail - the reason I have the span is that I > > want to apply a CSS class to the star. Also, I like to have the star > > as a child of the other component, because that way I don't have to > > assign unique names to each star, and also, I can package the text and > > the star as one object type (or just use a single method to deal with > > both at once) so that I don't have duplicated code. > > > > On 5/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > My use case is actually turning out slightly more complex than I > > > > posted. What I actually have is: > > > > > > > > TEXT* > > > > > > > > and I'd like to sometimes remove the star. So my java (which doesn't > > > > work) looks like: > > > > > > > >private static class LabelWithStar extends WebMarkupContainer > > > > { > > > > public LabelWithStar(String id, String model, final boolean > > > > starIsVisible) > > > > { > > > > super(id, new Model(model)); > > > > this.add(new WebMarkupContainer("star") { > > > > public boolean isVisible() > > > > { > > > > return starIsVisible; > > > > } > > > > }); > > > > } > > > > > > > > protected void onComponentTagBody(MarkupStream markupStream, > > > > ComponentTag openTag) > > > > { > > > > replaceComponentTagBody(markupStream, openTag, > > > > getModelObjectAsString()); > > > > } > > > > } > > > > > > > > This doesn't work because the call to replaceComponentTagBody() > > > > removes the span with the star. How should I be doing this instead? > > > > > > You mean you need to have the span? Why is that? > > > > > > Alternatively, you can do something like > > > > > > add(new Label("star", new AbstractReadOnlyModel() { > > > > > > @Override > > > public Object getObject() { > > > return isStarVisible() ? "*" : ""; > > > } > > > })); > > > } > > > > > > > > > Eelco > > > > > > - > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > ___ > > > Wicket-user mailing list > > > Wicket-user@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] creating a tree - not using the wicket tree classes
At a glance, that looks like what I want. Thanks. On 5/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > Take a look at the nested example and see if that helps you. > > Eelco > > On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > I'd like to create a tree on a page and have something like this in my > > template: > > > > Tree Goes Here > > > > and have the rendered result look something along the lines of: > > > > > > foobar > > > > baz > > > > baz2 > > baz3 > > > > > > bang > > > > > > > > > > How do I do this? > > > > Thanks, > > Lowell > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Is it possible to remove something from a page?
Once again I left out a detail - the reason I have the span is that I want to apply a CSS class to the star. Also, I like to have the star as a child of the other component, because that way I don't have to assign unique names to each star, and also, I can package the text and the star as one object type (or just use a single method to deal with both at once) so that I don't have duplicated code. On 5/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > On 5/31/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > My use case is actually turning out slightly more complex than I > > posted. What I actually have is: > > > > TEXT* > > > > and I'd like to sometimes remove the star. So my java (which doesn't > > work) looks like: > > > >private static class LabelWithStar extends WebMarkupContainer > > { > > public LabelWithStar(String id, String model, final boolean > > starIsVisible) > > { > > super(id, new Model(model)); > > this.add(new WebMarkupContainer("star") { > > public boolean isVisible() > > { > > return starIsVisible; > > } > > }); > > } > > > > protected void onComponentTagBody(MarkupStream markupStream, > > ComponentTag openTag) > > { > > replaceComponentTagBody(markupStream, openTag, > > getModelObjectAsString()); > > } > > } > > > > This doesn't work because the call to replaceComponentTagBody() > > removes the span with the star. How should I be doing this instead? > > You mean you need to have the span? Why is that? > > Alternatively, you can do something like > > add(new Label("star", new AbstractReadOnlyModel() { > > @Override > public Object getObject() { > return isStarVisible() ? "*" : ""; > } > })); > } > > > Eelco > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Is it possible to remove something from a page?
My use case is actually turning out slightly more complex than I posted. What I actually have is: TEXT* and I'd like to sometimes remove the star. So my java (which doesn't work) looks like: private static class LabelWithStar extends WebMarkupContainer { public LabelWithStar(String id, String model, final boolean starIsVisible) { super(id, new Model(model)); this.add(new WebMarkupContainer("star") { public boolean isVisible() { return starIsVisible; } }); } protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { replaceComponentTagBody(markupStream, openTag, getModelObjectAsString()); } } This doesn't work because the call to replaceComponentTagBody() removes the span with the star. How should I be doing this instead? Thanks Lowell On 5/30/07, Timo Rantalaiho <[EMAIL PROTECTED]> wrote: > On Wed, 30 May 2007, Lowell Kirsh wrote: > > I making a web page which contains some markup that I'd like to remove > > (sometimes). I imagine it would look like: > > > > ... > > Hello World > > ... > > > > Is it possible to remove this markup? > > new WebMarkupContainer("removeMe") { > protected void onBeforeRender() { > super.onBeforeRender(); > setVisible(sometimesFalse()); > } > } > > - Timo > > -- > Timo Rantalaiho > Reaktor Innovations Oyhttp://www.ri.fi/ > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] creating a tree - not using the wicket tree classes
I'd like to create a tree on a page and have something like this in my template: Tree Goes Here and have the rendered result look something along the lines of: foobar baz baz2 baz3 bang How do I do this? Thanks, Lowell - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Is it possible to remove something from a page?
Cool. So no need to 'add' it? On 5/30/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > new WebMarkupContainer("removeMe") { > > protected void onBeforeRender() { > > super.onBeforeRender(); > > setVisible(sometimesFalse()); > > } > > } > > That, or alternatively, > > new WebMarkupContainer("removeMe") { > public boolean isVisible() { > return sometimesFalse(); > } > } > > Eelco > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Is it possible to remove something from a page?
I making a web page which contains some markup that I'd like to remove (sometimes). I imagine it would look like: ... Hello World ... Is it possible to remove this markup? Thanks Lowell - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] "Exception loading sessions from persistent storage"
Ok, I will move this discussion to a tomcat mailing list. Thanks. On 5/14/07, Johan Compagner <[EMAIL PROTECTED]> wrote: > i did say that tomcat does load it. not wicket. > > and why do you have to restart tomcat? you just should loose sessions > nothing more > > johan > > > > On 5/14/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > But this is annoying for me because when i get this exception I have > > to manually restart tomcat again - which is not a big deal, but during > > development this is something I have to do many times a day. So is it > > possible to tell wicket not to save session data to disk? > > > > On 5/12/07, Johan Compagner <[EMAIL PROTECTED]> wrote: > > > that doesn't matter to much, i think you just changed classes a bit to > much > > > and > > > therefore tomcat could load the session store from disk that tomcat does > > > save when you close down tomcat > > > > > > johan > > > > > > > > > > > > On 5/12/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > > > > > I am getting an exception occasionally when I restart my instance of > > > > tomcat from within eclipse: "Exception loading sessions from > > > > persistent storage". This only happens sometimes and I can't figure > > > > out why. But rather than get to the root, since I'm not running in a > > > > clustered environment, I imagine I could solve this simply by turning > > > > off session saving to disk, right? How do I do that? > > > > > > > > Thanks, > > > > Lowell > > > > > > > > > > > > - > > > > This SF.net email is sponsored by DB2 Express > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > control of your XML. No limits. Just data. Click to get it now. > > > > http://sourceforge.net/powerbar/db2/ > > > > ___ > > > > Wicket-user mailing list > > > > Wicket-user@lists.sourceforge.net > > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > > > > > > - > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > ___ > > > Wicket-user mailing list > > > Wicket-user@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket and web services
But I want the browser to ask that, because a re-post is dangerous. Perhpas the dangerous logic should be in the submission page instead of the results page. On 5/14/07, Johan Compagner <[EMAIL PROTECTED]> wrote: > you should do a redirect. > > Because if i do a refresh of the browser with the form url in it > i think think the browser ask me do you want to resubmit it (and i guess > that is a post again??) > > johan > > > On 5/14/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > Hi, I'm not sure I understand what you just said. I think I do have > > the url of the post in my browser. That is, now that I have set > > redirect=false, when you reload the results page, it will execute the > > logic (with side effects) again. But I'm thinking perhaps I'm doing > > this wrong. > > > > Basically, I have a form and a results page. The way I have it now is > > that during the rendering of the results page, the side-effect-having > > logic gets executed. But I just realized another way of doing this > > would be to have that logic execute in the form page, and then pass > > the results of that to the results page. In general, when you have a > > form and a results page, do you want to put the side effect logic (eg. > > a database insert) in the form page or in the results page? > > > > On 5/13/07, Johan Compagner <[EMAIL PROTECTED]> wrote: > > > but you don't submit again because in the browser you never > > > have the url of the post (at least in the default settings of wicket) > > > because then we always do a redirect after post > > > > > > johan > > > > > > > > > > > > On 5/12/07, Lowell Kirsh < [EMAIL PROTECTED]> wrote: > > > > > why would you test for post in the resulting page? > > > > > > > > The page has side effects, so if you are viewing it in your browser > > > > and press refresh, it should not execute again. Or at least, there > > > > should be a warning before submitting. > > > > > > > > I think my best bet is to not try to overload the functionality of > > > > this page. I will probably create another page for programmatic > > > > access. > > > > > > > > > A form will be submitted to a page. (that will be done in a page and > > > then > > > > > method should be post) > > > > > then a redirect will happen to a page that you set as a result page > (or > > > it > > > > > is the same) > > > > > and that page will not be in a post but will be in a get > > > > > > > > > > but how do you set the result page? > > > > > you can try setRedirect(false) after you set the result page. > > > > > > > > > > How is your webservice access your page? that does the post to the > form? > > > > > But then you are in the submit and you know you are ok. > > > > > > > > > > johan > > > > > > > > > > > > > > > > > > > > On 5/11/07, Lowell Kirsh <[EMAIL PROTECTED] > wrote: > > > > > > > > > > > > I want some of my pages to be accessed programatically. Basically, > > > > > > that page may be accessed as a 'web service'. So the same page may > be > > > > > > arrived at in 2 ways - the result of a form submission from > another > > > > > > page in the same app, or the result of a direct http connection. > When > > > > > > accessed as a web service, there are a few extra requirements - > the > > > > > > page must be POSTed to, and there must be an extra http request > header > > > > > > for authorization. > > > > > > > > > > > > I was thinking that the page could make sure that it always is > POSTed > > > > > > to, but when arrived at in the context of a form submission in the > > > > > > application, it apparently ends up being the result of a redirect > > > > > > after the form post, so the page does not think it was posted to. > So I > > > > > > think perhaps the page should only ensure it was posted to if it's > > > > > > from outside the application. Is there a way for the page to know > that > > > > > > its referrer is another page in the same application? Check the > > > > > > referrer header? > > > > > > > > >
Re: [Wicket-user] repeating the same text in several places on one page
Is there an idiom for naming these labels, or do people tend to call them user1, user2, user3...? On 5/13/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > you cannot reuse the same label more then once in markup. there are various > reasons for this that have to do with how wicket works internally. > > what you can do is reuse the instance of model that drives the labels. > > -igor > > > > On 5/13/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > I'd like to repeat the same thing in several spots on the same page. > > Does this mean that I have to create several labels? Or is there a way > > I could have them all reference the same label? > > > > Thanks, > > Lowell > > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] repeating the same text in several places on one page
I'd like to repeat the same thing in several spots on the same page. Does this mean that I have to create several labels? Or is there a way I could have them all reference the same label? Thanks, Lowell - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] "Exception loading sessions from persistent storage"
But this is annoying for me because when i get this exception I have to manually restart tomcat again - which is not a big deal, but during development this is something I have to do many times a day. So is it possible to tell wicket not to save session data to disk? On 5/12/07, Johan Compagner <[EMAIL PROTECTED]> wrote: > that doesn't matter to much, i think you just changed classes a bit to much > and > therefore tomcat could load the session store from disk that tomcat does > save when you close down tomcat > > johan > > > > On 5/12/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > I am getting an exception occasionally when I restart my instance of > > tomcat from within eclipse: "Exception loading sessions from > > persistent storage". This only happens sometimes and I can't figure > > out why. But rather than get to the root, since I'm not running in a > > clustered environment, I imagine I could solve this simply by turning > > off session saving to disk, right? How do I do that? > > > > Thanks, > > Lowell > > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] 1.3 & 1.2.6
On 5/13/07, howzat <[EMAIL PROTECTED]> wrote: > ... My only concern is the documentation, but the > forum seems very active... You should get a copy of the Pro Wicket book. It is well worth the money. > I was planning to stay put with 1.2.6 until 2.0 is closer to production, but > perhaps I should go via 1.3 as this is very close to the 2.0 apis (minus the > java 5 stuff, like generics etc) if I understand correctly(?). Someone correct me if I'm wrong, but it's my understanding that 2.0 has been abandoned for now in favor of putting all new functionality in 1.3. If you want to keep track of wicket's development, you will probably find this blog useful: http://martijndashorst.com/blog/ and in particular this post: http://martijndashorst.com/blog/2007/04/20/wicket-130-roadmap/ Lowell - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket and web services
Hi, I'm not sure I understand what you just said. I think I do have the url of the post in my browser. That is, now that I have set redirect=false, when you reload the results page, it will execute the logic (with side effects) again. But I'm thinking perhaps I'm doing this wrong. Basically, I have a form and a results page. The way I have it now is that during the rendering of the results page, the side-effect-having logic gets executed. But I just realized another way of doing this would be to have that logic execute in the form page, and then pass the results of that to the results page. In general, when you have a form and a results page, do you want to put the side effect logic (eg. a database insert) in the form page or in the results page? On 5/13/07, Johan Compagner <[EMAIL PROTECTED]> wrote: > but you don't submit again because in the browser you never > have the url of the post (at least in the default settings of wicket) > because then we always do a redirect after post > > johan > > > > On 5/12/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > why would you test for post in the resulting page? > > > > The page has side effects, so if you are viewing it in your browser > > and press refresh, it should not execute again. Or at least, there > > should be a warning before submitting. > > > > I think my best bet is to not try to overload the functionality of > > this page. I will probably create another page for programmatic > > access. > > > > > A form will be submitted to a page. (that will be done in a page and > then > > > method should be post) > > > then a redirect will happen to a page that you set as a result page (or > it > > > is the same) > > > and that page will not be in a post but will be in a get > > > > > > but how do you set the result page? > > > you can try setRedirect(false) after you set the result page. > > > > > > How is your webservice access your page? that does the post to the form? > > > But then you are in the submit and you know you are ok. > > > > > > johan > > > > > > > > > > > > On 5/11/07, Lowell Kirsh <[EMAIL PROTECTED] > wrote: > > > > > > > > I want some of my pages to be accessed programatically. Basically, > > > > that page may be accessed as a 'web service'. So the same page may be > > > > arrived at in 2 ways - the result of a form submission from another > > > > page in the same app, or the result of a direct http connection. When > > > > accessed as a web service, there are a few extra requirements - the > > > > page must be POSTed to, and there must be an extra http request header > > > > for authorization. > > > > > > > > I was thinking that the page could make sure that it always is POSTed > > > > to, but when arrived at in the context of a form submission in the > > > > application, it apparently ends up being the result of a redirect > > > > after the form post, so the page does not think it was posted to. So I > > > > think perhaps the page should only ensure it was posted to if it's > > > > from outside the application. Is there a way for the page to know that > > > > its referrer is another page in the same application? Check the > > > > referrer header? > > > > > > > > Is trying to overload this page like this crazy? I thought it would be > > > > less work and a cleaner design, but am not sure when I should just > > > > give up. > > > > > > > > Lowell > > > > > > > > > > > > - > > > > This SF.net email is sponsored by DB2 Express > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > control of your XML. No limits. Just data. Click to get it now. > > > > http://sourceforge.net/powerbar/db2/ > > > > ___ > > > > Wicket-user mailing list > > > > Wicket-user@lists.sourceforge.net > > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > > > > > > - > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML
Re: [Wicket-user] Wicket and web services
> why would you test for post in the resulting page? The page has side effects, so if you are viewing it in your browser and press refresh, it should not execute again. Or at least, there should be a warning before submitting. I think my best bet is to not try to overload the functionality of this page. I will probably create another page for programmatic access. > A form will be submitted to a page. (that will be done in a page and then > method should be post) > then a redirect will happen to a page that you set as a result page (or it > is the same) > and that page will not be in a post but will be in a get > > but how do you set the result page? > you can try setRedirect(false) after you set the result page. > > How is your webservice access your page? that does the post to the form? > But then you are in the submit and you know you are ok. > > johan > > > > On 5/11/07, Lowell Kirsh <[EMAIL PROTECTED] > wrote: > > > > I want some of my pages to be accessed programatically. Basically, > > that page may be accessed as a 'web service'. So the same page may be > > arrived at in 2 ways - the result of a form submission from another > > page in the same app, or the result of a direct http connection. When > > accessed as a web service, there are a few extra requirements - the > > page must be POSTed to, and there must be an extra http request header > > for authorization. > > > > I was thinking that the page could make sure that it always is POSTed > > to, but when arrived at in the context of a form submission in the > > application, it apparently ends up being the result of a redirect > > after the form post, so the page does not think it was posted to. So I > > think perhaps the page should only ensure it was posted to if it's > > from outside the application. Is there a way for the page to know that > > its referrer is another page in the same application? Check the > > referrer header? > > > > Is trying to overload this page like this crazy? I thought it would be > > less work and a cleaner design, but am not sure when I should just > > give up. > > > > Lowell > > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] url mounting and PageParameters
Thanks for the link. Did the proposed solution work for you? On 5/11/07, smallufo <[EMAIL PROTECTED]> wrote: > Hi > > There is already a jira issue here (1.2.x) : > http://issues.apache.org/jira/browse/WICKET-400 > > > 2007/5/9, Igor Vaynberg < [EMAIL PROTECTED]>: > > still, the query string params should be merged. please file a jira issue > if you are using 1.3 > > > > -igor > > > > > > > > > > On 5/9/07, Lowell Kirsh < [EMAIL PROTECTED]> wrote: > > > I have figured this one out. Is seems that when my urls are mounted, > > > the parameters are passed in as "/param/value/" rather than as > > > "¶m=value". This is actually kind of nice :-) > > > > > > On 5/8/07, Lowell Kirsh < [EMAIL PROTECTED] > wrote: > > > > I have just started mounting my pages (for nice urls) and it seems > > > > that the PageParameters is always empty now. Before I had mounted the > > > > pages, I could manually append "&foo=bar" to my url and it would get > > > > into the PageParams, but not that they are mounted, I have been trying > > > > to append "?foo=bar" but it seems to vanish into the ether. What am I > > > > missing? > > > > > > > > Thanks, > > > > Lowell > > > > > > > > > > > - > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > ___ > > > Wicket-user mailing list > > > Wicket-user@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] "Exception loading sessions from persistent storage"
I am getting an exception occasionally when I restart my instance of tomcat from within eclipse: "Exception loading sessions from persistent storage". This only happens sometimes and I can't figure out why. But rather than get to the root, since I'm not running in a clustered environment, I imagine I could solve this simply by turning off session saving to disk, right? How do I do that? Thanks, Lowell - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Wicket and web services
I want some of my pages to be accessed programatically. Basically, that page may be accessed as a 'web service'. So the same page may be arrived at in 2 ways - the result of a form submission from another page in the same app, or the result of a direct http connection. When accessed as a web service, there are a few extra requirements - the page must be POSTed to, and there must be an extra http request header for authorization. I was thinking that the page could make sure that it always is POSTed to, but when arrived at in the context of a form submission in the application, it apparently ends up being the result of a redirect after the form post, so the page does not think it was posted to. So I think perhaps the page should only ensure it was posted to if it's from outside the application. Is there a way for the page to know that its referrer is another page in the same application? Check the referrer header? Is trying to overload this page like this crazy? I thought it would be less work and a cleaner design, but am not sure when I should just give up. Lowell - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] POST form submissions being converted to GETs
Thanks for the advice. That is unfortunate in my case. But that's a bit off topic from this, so I will post another message. On 5/10/07, Erik van Oosten <[EMAIL PROTECTED]> wrote: > > Wicket will always do a redirect after the POST. So the information you are > seeing is from the second request, which is a GET. > > You can install LiveHTTPHeaders in FireFox. There is something similar for > IE. > > Regards, > Erik. > > > > Lowell Kirsh wrote: > > > > I have a wicket form which is supposed to be POSTing its data. Looking > > at the generated page, it is indeed method="post". But the page that > > it redirects to thinks that it is a GET. I found this information by > > doing: > > > > WebRequest request = (WebRequest) RequestCycle.get().getRequest(); > > String method = request.getHttpServletRequest().getMethod(); > > > > In this case, method is "GET". I don't get why this is not "POST". So > > right now I'm not sure if it's mistakenly thinking it's a GET when it > > is indeed a POST, or if it's really a GET. Does anyone have any > > recommendation on how I can figure this out (eg. some tool not > > associated with wicket)? > > > > Thanks, > > Lowell > > > > > -- > Erik van Oosten > http://2007.rubyenrails.nl/ > http://www.day-to-day-stuff.blogspot.com/ > > -- > View this message in context: > http://www.nabble.com/POST-form-submissions-being-converted-to-GETs-tf3725515.html#a10426535 > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] POST form submissions being converted to GETs
I have a wicket form which is supposed to be POSTing its data. Looking at the generated page, it is indeed method="post". But the page that it redirects to thinks that it is a GET. I found this information by doing: WebRequest request = (WebRequest) RequestCycle.get().getRequest(); String method = request.getHttpServletRequest().getMethod(); In this case, method is "GET". I don't get why this is not "POST". So right now I'm not sure if it's mistakenly thinking it's a GET when it is indeed a POST, or if it's really a GET. Does anyone have any recommendation on how I can figure this out (eg. some tool not associated with wicket)? Thanks, Lowell - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] AbortWithWebErrorCodeException not working as expected
Thanks for your attention to this. Is there a roadmap of when 1.2.7 will be out? Or is 1.3.0 the next version? On 5/10/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > It was a bug we didn't support it properly, and in trunk it's fixed > now (note that the issue is set to 'resolved'). So put in that > exception again, and you should be good. > > Eelco > > On 5/10/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > The solution you posted there looks workable. Instead of throwing an > > AbortException, I'd just call > > RequestCycle.get().setRequestTarget(...). However, it seems that to > > prevent the rest of my constructor from running (due to the error), I > > have to explicitly call 'return' (ie. can't use exception to get out > > of constructor). Is there any way I could exit without calling > > 'return'? > > > > Ok, if that wasn't clear, what I'd like to do is to have a method > > requireParameter(PageParams pp, String paramName) in my BasePage, so > > that if the paramName value is missing, the constructor would exit > > immediately with a redirect or error page. Using exceptions, I'd be > > able to simply call: > > > > requireParameter(...) > > > > and it could throw an exception which would take care of the control > > flow of the program. But instead, what I seem to be doing now is: > > > > if (isMissingParameter(params, paramName)) return; > > > > which is more verbose, but definitely not hideous. > > > > On 5/10/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > See https://issues.apache.org/jira/browse/WICKET-552 > > > > > > On 5/10/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > I easily reproduced this problem. I did not use svn access, but > > > > instead went to the wicket main page and downloaded the 1.2.6 > > > > quickstart. I ran it and it worked. Then I went to the Index.java and > > > > inserted the following line in the constructor: > > > > > > > > throw new > > > > AbortWithWebErrorCodeException(HttpServletResponse.SC_BAD_REQUEST, > > > > "FOOBAR"); > > > > > > > > I went to my web browser, and again, blank page. Then I went to the > > > > command line and typed: > > > > > > > > $ wget http://localhost:8081/quickstart/app > > > > > > > > I get a 200 status code, with empty body: > > > > > > > > --14:50:42-- http://localhost:8081/quickstart/app > > > >=> `app.1' > > > > Resolving localhost... done. > > > > Connecting to localhost[127.0.0.1]:8081... connected. > > > > HTTP request sent, awaiting response... 200 OK > > > > Length: unspecified > > > > > > > > [ <=> > > > > ] 0 > > > > --.--K/s > > > > > > > > 14:50:42 (0.00 B/s) - `app.1' saved [0] > > > > > > > > > > > > So do you think this is a bug? > > > > > > > > Lowell > > > > > > > > On 5/9/07, Johan Compagner <[EMAIL PROTECTED]> wrote: > > > > > yes see our quickstart project in svn > > > > > > > > > > i can try to build an example for this > > > > > for example if i change one of the wicket examples homepages that it > > > > > throws > > > > > such an exception > > > > > does it fail then? > > > > > > > > > > johan > > > > > > > > > > > > > > > On 5/9/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > do you have a quickstart that you can attach to a jira issue? > > > > > > > > > > > > What do you mean by this? Is a quickstart some sort of > > > > > > self-contained > > > > > > minimal jar? > > > > > > > > > > > > > > > > > - > > > > > > This SF.net email is sponsored by DB2 Express > > > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > > > control of your XML. No limits. Just data. Click to get it now. > > > > > > http://sourceforge.
Re: [Wicket-user] AbortWithWebErrorCodeException not working as expected
The solution you posted there looks workable. Instead of throwing an AbortException, I'd just call RequestCycle.get().setRequestTarget(...). However, it seems that to prevent the rest of my constructor from running (due to the error), I have to explicitly call 'return' (ie. can't use exception to get out of constructor). Is there any way I could exit without calling 'return'? Ok, if that wasn't clear, what I'd like to do is to have a method requireParameter(PageParams pp, String paramName) in my BasePage, so that if the paramName value is missing, the constructor would exit immediately with a redirect or error page. Using exceptions, I'd be able to simply call: requireParameter(...) and it could throw an exception which would take care of the control flow of the program. But instead, what I seem to be doing now is: if (isMissingParameter(params, paramName)) return; which is more verbose, but definitely not hideous. On 5/10/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > See https://issues.apache.org/jira/browse/WICKET-552 > > On 5/10/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > I easily reproduced this problem. I did not use svn access, but > > instead went to the wicket main page and downloaded the 1.2.6 > > quickstart. I ran it and it worked. Then I went to the Index.java and > > inserted the following line in the constructor: > > > > throw new AbortWithWebErrorCodeException(HttpServletResponse.SC_BAD_REQUEST, > > "FOOBAR"); > > > > I went to my web browser, and again, blank page. Then I went to the > > command line and typed: > > > > $ wget http://localhost:8081/quickstart/app > > > > I get a 200 status code, with empty body: > > > > --14:50:42-- http://localhost:8081/quickstart/app > >=> `app.1' > > Resolving localhost... done. > > Connecting to localhost[127.0.0.1]:8081... connected. > > HTTP request sent, awaiting response... 200 OK > > Length: unspecified > > > > [ <=> > > ] 0 > > --.--K/s > > > > 14:50:42 (0.00 B/s) - `app.1' saved [0] > > > > > > So do you think this is a bug? > > > > Lowell > > > > On 5/9/07, Johan Compagner <[EMAIL PROTECTED]> wrote: > > > yes see our quickstart project in svn > > > > > > i can try to build an example for this > > > for example if i change one of the wicket examples homepages that it > > > throws > > > such an exception > > > does it fail then? > > > > > > johan > > > > > > > > > On 5/9/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > > > > > > do you have a quickstart that you can attach to a jira issue? > > > > > > > > What do you mean by this? Is a quickstart some sort of self-contained > > > > minimal jar? > > > > > > > > > > > - > > > > This SF.net email is sponsored by DB2 Express > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > control of your XML. No limits. Just data. Click to get it now. > > > > http://sourceforge.net/powerbar/db2/ > > > > ___ > > > > Wicket-user mailing list > > > > Wicket-user@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > > > > > - > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > ___ > > > Wicket-user mailing list > > > Wicket-user@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net
Re: [Wicket-user] programmatic access to a wicket site
Strange, it says in the javadoc that it can return 404, for example. But it also says it'll throw an exception on a bad connection. Confusing indeed. On 5/10/07, Erik van Oosten <[EMAIL PROTECTED]> wrote: > Yeah, weird it is. Perhaps that method only returns something when there > was a result code representing a successful retrieval, so anything in > the 200-299 range. I am positively very sure that non-2XX codes will > trigger an IOException. > > Regards, > Erik. > > > Lowell Kirsh wrote: > > Really? What about the getResponseCode() method? > > > > http://java.sun.com/j2se/1.4.2/docs/api/java/net/HttpURLConnection.html#getResponseCode() > > > > But I'm sure if you are right about not being able to get it from that > > class, my clients will use the jakarta (or other) client instead. > > > > So the idea of using a POS (plain old servlet ;-) did cross my mind, > > but I was hoping to make my web page serve both purposes so that I > > could minimize the amount of coding I would have to do. Hopefully I > > can actually use the AbortWithWebErrorCodeException to serve this > > purpose. > > > > > > > > -- > Erik van Oosten > http://2007.rubyenrails.nl/ > http://www.day-to-day-stuff.blogspot.com/ > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] programmatic access to a wicket site
Really? What about the getResponseCode() method? http://java.sun.com/j2se/1.4.2/docs/api/java/net/HttpURLConnection.html#getResponseCode() But I'm sure if you are right about not being able to get it from that class, my clients will use the jakarta (or other) client instead. So the idea of using a POS (plain old servlet ;-) did cross my mind, but I was hoping to make my web page serve both purposes so that I could minimize the amount of coding I would have to do. Hopefully I can actually use the AbortWithWebErrorCodeException to serve this purpose. On 5/9/07, Erik van Oosten <[EMAIL PROTECTED]> wrote: > Lowell, > > Yes, it matters a great deal. The class java.net.HttpURLConnection does > not give you return codes, it just throws an exception. You need to use > something like apache commons HttpClient. > > Btw, if you can not massage Wicket into doing what you want, you can > always add a self-written servlet (or a servlet from any other > web-framework) in the same web-application. > > Regards, > Erik. > > > Lowell Kirsh wrote: > > I think they will be using a java.net.HttpURLConnection. Does it matter? > > > > -- > Erik van Oosten > http://www.day-to-day-stuff.blogspot.com/ > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] programmatic access to a wicket site
I think they will be using a java.net.HttpURLConnection. Does it matter? On 5/9/07, Jeremy Thomerson <[EMAIL PROTECTED]> wrote: > What are they going to use to "call" it? wget? perl? etc > > Jeremy Thomerson > > > On 5/9/07, Lowell Kirsh < [EMAIL PROTECTED]> wrote: > > > > One of the requirements of the site that I'm building is that oneof > > the pages be exposed programatically so that other programs can 'call' > > it. They would know whether they'd succeeded or not by inspecting the > > http status code returned. Since this is just a regular page of the > > site, when the call is successful a web page is rendered and returned. > > In this case it would be ignored. But when there is an error, I'd like > > to relay that to clients. > > > > One thing I've been trying to do (without any success) is to throw an > > AbortWithWebErrorCodeException from my constructor with a non-200 code > > and a message. Now supposing that it works, I'd like to know how a > > client could extract the message from the response. Is it sent as a > > header, the entire body, or part of the body? > > > > And if there is another approach that would work in my case, I'd love > > to hear about it. > > > > Thanks, > > Lowell > > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] programmatic access to a wicket site
One of the requirements of the site that I'm building is that oneof the pages be exposed programatically so that other programs can 'call' it. They would know whether they'd succeeded or not by inspecting the http status code returned. Since this is just a regular page of the site, when the call is successful a web page is rendered and returned. In this case it would be ignored. But when there is an error, I'd like to relay that to clients. One thing I've been trying to do (without any success) is to throw an AbortWithWebErrorCodeException from my constructor with a non-200 code and a message. Now supposing that it works, I'd like to know how a client could extract the message from the response. Is it sent as a header, the entire body, or part of the body? And if there is another approach that would work in my case, I'd love to hear about it. Thanks, Lowell - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] url mounting and PageParameters
I'm using 1.2.6. Unless you think otherwise, I will not file a jira issue. On 5/9/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > still, the query string params should be merged. please file a jira issue if > you are using 1.3 > > -igor > > > > On 5/9/07, Lowell Kirsh < [EMAIL PROTECTED]> wrote: > > > > I have figured this one out. Is seems that when my urls are mounted, > > the parameters are passed in as "/param/value/" rather than as > > "¶m=value". This is actually kind of nice :-) > > > > On 5/8/07, Lowell Kirsh <[EMAIL PROTECTED] > wrote: > > > I have just started mounting my pages (for nice urls) and it seems > > > that the PageParameters is always empty now. Before I had mounted the > > > pages, I could manually append "&foo=bar" to my url and it would get > > > into the PageParams, but not that they are mounted, I have been trying > > > to append "?foo=bar" but it seems to vanish into the ether. What am I > > > missing? > > > > > > Thanks, > > > Lowell > > > > > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] AbortWithWebErrorCodeException not working as expected
I easily reproduced this problem. I did not use svn access, but instead went to the wicket main page and downloaded the 1.2.6 quickstart. I ran it and it worked. Then I went to the Index.java and inserted the following line in the constructor: throw new AbortWithWebErrorCodeException(HttpServletResponse.SC_BAD_REQUEST, "FOOBAR"); I went to my web browser, and again, blank page. Then I went to the command line and typed: $ wget http://localhost:8081/quickstart/app I get a 200 status code, with empty body: --14:50:42-- http://localhost:8081/quickstart/app => `app.1' Resolving localhost... done. Connecting to localhost[127.0.0.1]:8081... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [ <=> ] 0 --.--K/s 14:50:42 (0.00 B/s) - `app.1' saved [0] So do you think this is a bug? Lowell On 5/9/07, Johan Compagner <[EMAIL PROTECTED]> wrote: > yes see our quickstart project in svn > > i can try to build an example for this > for example if i change one of the wicket examples homepages that it throws > such an exception > does it fail then? > > johan > > > On 5/9/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > > do you have a quickstart that you can attach to a jira issue? > > > > What do you mean by this? Is a quickstart some sort of self-contained > > minimal jar? > > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How do I do this - several similar links to another page
Thanks. That looks like a good reusable solution. On 5/9/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > yes, and you can ignore that part if you are on 1.2.x > > -igor > > > > On 5/9/07, Lowell Kirsh <[EMAIL PROTECTED] > wrote: > > Is IComponentAssignedModel only in 1.3? > > > > On 5/9/07, Igor Vaynberg < [EMAIL PROTECTED]> wrote: > > > you can also factor out the javascript confirmation into a behavior and > > > reuse it across any links classes like > > > > > > Link link=new Link("foo") { onclick(){..}}.add(new > > > LinkConfirmation("sure?")); > > > BookmarkablePageLink link=new BPL(...).add(new > LinkConfirmation("sure?")); > > > > > > -igor > > > > > > > > > public class LinkConfirmation extends AbstractBehavior { > > > > > > private final IModel msg; > > > > > > public LinkConfirmation(String msg) { this(new Model(msg)); } > > > > > > public LinkConfirmation(IModel msg) { this.msg = msg; } > > > > > > @Override > > > public void onComponentTag(Component component, ComponentTag tag) { > > > super.onComponentTag(component, tag); > > > > > > String onclick = tag.getAttributes().getString("onclick"); > > > > > > IModel model = msg; > > > if (model instanceof IComponentAssignedModel) { > > > model = ((IComponentAssignedModel) > > > model).wrapOnAssignment(component); > > > } > > > > > > onclick = "if (!confirm('" + model.getObject().toString() + "')) > > > return false; " + onclick; > > > tag.getAttributes().put("onclick", onclick); > > > > > > model.detach(); > > > msg.detach(); > > > } > > > > > > } > > > > > > -igor > > > > > > > > > On 5/9/07, Shams Mahmood <[EMAIL PROTECTED] > wrote: > > > > > > > > To help reduce some code, why not extend the BookmarkablePageLink > class to > > > > form your JavascriptConfirmLink and then no need to write the > onclick(). > > > > > > > > also try > > > > new JavascriptConfirmLink(id, cls, new > > > PageParameters("method=method1"), msg) > > > > > > > > and the id will be used here: > > > > > > > > > > href="anotherPage?method=method1">method1 > > > > > > > > You can ignore the href, as wicket will insert it for u. > > > > > > > > > > > > > > > > > > > > > I'm trying to make a page with several similar links to another > page: > > > > > > > > > > method2 > > > > > "return > > > > > confirm"+confirmationMessage+");"); > > > > > } > > > > > > > > > > onClick() { > > > > >setResponsePage(_pageClass, _params); > > > > > } > > > > > } > > > > > > > > > > Then I'd populate my page with several of these links using this > code: > > > > > > > > > > add(new ListView("theLinks", theLinks) { > > > > >@Override protected void populateItem(ListItem item) > > > > >{ > > > > >Link link = (Link) item.getModelObject(); > > > > >item.add(link); > > > > >} > > > > >}); > > > > > > > > > > Does this look correct? > > > > > > > > > > Now I have gotten myself a little confused about a couple of things: > > > > > - what is the purpose of the id? Since I will be populating the page > > > > > with my links using a ListView, I don't see where the id of each > link > > > > > will ever be referred to. > > > > > > > > > > Finally, creating these links is quite verbose. PageParameters is > > > > > final, so I can't create my links like: > > > > > > > > > > new JavascriptConfirmLink(id, cls, new PageParameters() {{ > > > > > add("method", "method1"); }}, msg) > > > > > > > > > like I'd like so I end up having to new a P
Re: [Wicket-user] How do I do this - several similar links to another page
Is IComponentAssignedModel only in 1.3? On 5/9/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > you can also factor out the javascript confirmation into a behavior and > reuse it across any links classes like > > Link link=new Link("foo") { onclick(){..}}.add(new > LinkConfirmation("sure?")); > BookmarkablePageLink link=new BPL(...).add(new LinkConfirmation("sure?")); > > -igor > > > public class LinkConfirmation extends AbstractBehavior { > > private final IModel msg; > > public LinkConfirmation(String msg) { this(new Model(msg)); } > > public LinkConfirmation(IModel msg) { this.msg = msg; } > > @Override > public void onComponentTag(Component component, ComponentTag tag) { > super.onComponentTag(component, tag); > > String onclick = tag.getAttributes().getString("onclick"); > > IModel model = msg; > if (model instanceof IComponentAssignedModel) { > model = ((IComponentAssignedModel) > model).wrapOnAssignment(component); > } > > onclick = "if (!confirm('" + model.getObject().toString() + "')) > return false; " + onclick; > tag.getAttributes().put("onclick", onclick); > > model.detach(); > msg.detach(); > } > > } > > -igor > > > On 5/9/07, Shams Mahmood <[EMAIL PROTECTED]> wrote: > > > > To help reduce some code, why not extend the BookmarkablePageLink class to > > form your JavascriptConfirmLink and then no need to write the onclick(). > > > > also try > > new JavascriptConfirmLink(id, cls, new > PageParameters("method=method1"), msg) > > > > and the id will be used here: > > > > href="anotherPage?method=method1">method1 > > > > You can ignore the href, as wicket will insert it for u. > > > > > > > > > > > I'm trying to make a page with several similar links to another page: > > > > > > method2 > > > > > confirm"+confirmationMessage+");"); > > > } > > > > > > onClick() { > > >setResponsePage(_pageClass, _params); > > > } > > > } > > > > > > Then I'd populate my page with several of these links using this code: > > > > > > add(new ListView("theLinks", theLinks) { > > >@Override protected void populateItem(ListItem item) > > >{ > > >Link link = (Link) item.getModelObject(); > > >item.add(link); > > >} > > >}); > > > > > > Does this look correct? > > > > > > Now I have gotten myself a little confused about a couple of things: > > > - what is the purpose of the id? Since I will be populating the page > > > with my links using a ListView, I don't see where the id of each link > > > will ever be referred to. > > > > > > Finally, creating these links is quite verbose. PageParameters is > > > final, so I can't create my links like: > > > > > > new JavascriptConfirmLink(id, cls, new PageParameters() {{ > > > add("method", "method1"); }}, msg) > > > > > like I'd like so I end up having to new a PageParameters for each link > > > and add to it before creating the JavascriptConfirmLink, which is > > > seeming quite verbose. > > > > > > There may be some holes in my approach. Is there a better way to do > this? > > > > > > Thanks, > > > Lowell > > > > > > > > > > > > > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Struts 2 Vs. Wicket (Need some highlights)
I don't think they're wrong - I just think they are actually plusses ;-) On 5/9/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > some wicket cons in that presentation are not true. too bad matt only spent > a weekend learning wicket before writing that presentation. > > -igor > > > > On 5/9/07, Francisco Diaz Trepat - gmail <[EMAIL PROTECTED]> > wrote: > > Great ! > > > > Thanks for the link, I get right on it. > > > > Cheers, > > f(t) > > > > > > On 5/8/07, Xavier Hanin < [EMAIL PROTECTED] > wrote: > > > > > You can find a pretty interesting comparison done by matt raible at > ApacheCon: > > > > http://raibledesigns.com/rd/entry/apachecon_eu_comparing_java_web > > > > > > It's not dedicated to struts 2 vs wicket, but might be interesting > though. > > > > > > In a few words my opinion is that the main difference between the two is > that wicket is a component framework while struts is an action based > framework. So I think you have to evaluate which kind of framework you want > first (and this depends on a lot of factors, including developers skills and > the type of application you're developing). If you choose a component > framework, wicket really shines in several ways. Among my favorites is the > truly simple way of writing your own components, which makes the code reuse > promise of a component framework absolutely true with wicket. > > > > > > My 2c. > > > > > > Xavier > > > > > > > > > > > > On 5/9/07, Francisco Diaz Trepat - gmail < > [EMAIL PROTECTED] > wrote: > > > > > > > > Guys I need some points I could talk to highlight Wicket over Struts 2 > in a professional matter. > > > > > > > > Inside I'll think wicket rulz and struts sucked and know struts-2 > sucks a little less. But still. > > > > > > > > > > > > Can you please contribute to make some sounded statements that would > better point out Wicket over Struts-2? > > > > > > > > On a not so formal decision board I would like to vote in favor of > Wicket. I already did this for Wicket Vs. Click. > > > > > > > > Thanks in advance, > > > > > > > > /f(t) > > > > > > > > > > > > > > > > > - > > > > This SF.net email is sponsored by DB2 Express > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > control of your XML. No limits. Just data. Click to get it now. > > > > http://sourceforge.net/powerbar/db2/ > > > > ___ > > > > Wicket-user mailing list > > > > Wicket-user@lists.sourceforge.net > > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > > > > > > > > > > > > -- > > > Xavier Hanin - Independent Java Consultant > > > Manage your dependencies with Ivy! > > > http://incubator.apache.org/ivy/ > > > > - > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > ___ > > > Wicket-user mailing list > > > Wicket-user@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] AbortWithWebErrorCodeException not working as expected
I will look into it tomorrow... On 5/9/07, Johan Compagner <[EMAIL PROTECTED]> wrote: > yes see our quickstart project in svn > > i can try to build an example for this > for example if i change one of the wicket examples homepages that it throws > such an exception > does it fail then? > > johan > > > On 5/9/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > > do you have a quickstart that you can attach to a jira issue? > > > > What do you mean by this? Is a quickstart some sort of self-contained > > minimal jar? > > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How do I do this - several similar links to another page
D'oh! Of course. And I assume you mean instead of . On 5/9/07, Shams Mahmood <[EMAIL PROTECTED]> wrote: > Why not just add a label to the link. > > > href="anotherPage?method=method1"> > method1 > > > > add(new ListView("theLinks", theLinks) { > @Override protected void populateItem(ListItem item) > { > Link link = (Link) item.getModelObject (); > Label label = new Label( "theLabelId", "Method-xxx" ); > // label.setRenderBodyOnly( true ); > link.add( label ); > item.add(link); > } > }); > > > Shams > > > > > That looks pretty reasonable to me (though my code is not in front of > > me right now). I like how you can pass a String to 'new > > PageParameters()'. A little unexpected but nice (I should have read > > the javadoc more thoroughly). > > > > So I have another question: How to you set the link's title? That is, > > how do you set the text between the and the ? > > > > Thanks > > > > On 5/9/07, Shams Mahmood <[EMAIL PROTECTED] > wrote: > > > To help reduce some code, why not extend the BookmarkablePageLink class > to > > > form your JavascriptConfirmLink and then no need to write the onclick(). > > > > > > also try > > > new JavascriptConfirmLink(id, cls, new > > > PageParameters("method=method1"), msg) > > > > > > and the id will be used here: > > > > > > > > href="anotherPage?method=method1">method1 > > > > > > You can ignore the href, as wicket will insert it for u. > > > > > > > > > > > > > I'm trying to make a page with several similar links to another page: > > > > > > > > method2 > > > > > > > confirm"+confirmationMessage+");"); > > > > } > > > > > > > > onClick() { > > > >setResponsePage(_pageClass, _params); > > > > } > > > > } > > > > > > > > Then I'd populate my page with several of these links using this code: > > > > > > > > add(new ListView("theLinks", theLinks) { > > > >@Override protected void populateItem(ListItem item) > > > >{ > > > >Link link = (Link) item.getModelObject(); > > > >item.add(link); > > > >} > > > >}); > > > > > > > > Does this look correct? > > > > > > > > Now I have gotten myself a little confused about a couple of things: > > > > - what is the purpose of the id? Since I will be populating the page > > > > with my links using a ListView, I don't see where the id of each link > > > > will ever be referred to. > > > > > > > > Finally, creating these links is quite verbose. PageParameters is > > > > final, so I can't create my links like: > > > > > > > > new JavascriptConfirmLink(id, cls, new PageParameters() {{ > > > > add("method", "method1"); }}, msg) > > > > like I'd like so I end up having to new a PageParameters for each link > > > > and add to it before creating the JavascriptConfirmLink, which is > > > > seeming quite verbose. > > > > > > > > There may be some holes in my approach. Is there a better way to do > this? > > > > > > > > Thanks, > > > > Lowell > > > > > > > > > > > > > > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] AbortWithWebErrorCodeException not working as expected
> do you have a quickstart that you can attach to a jira issue? What do you mean by this? Is a quickstart some sort of self-contained minimal jar? - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How do I do this - several similar links to another page
That looks pretty reasonable to me (though my code is not in front of me right now). I like how you can pass a String to 'new PageParameters()'. A little unexpected but nice (I should have read the javadoc more thoroughly). So I have another question: How to you set the link's title? That is, how do you set the text between the and the ? Thanks On 5/9/07, Shams Mahmood <[EMAIL PROTECTED]> wrote: > To help reduce some code, why not extend the BookmarkablePageLink class to > form your JavascriptConfirmLink and then no need to write the onclick(). > > also try > new JavascriptConfirmLink(id, cls, new > PageParameters("method=method1"), msg) > > and the id will be used here: > > href="anotherPage?method=method1">method1 > > You can ignore the href, as wicket will insert it for u. > > > > > I'm trying to make a page with several similar links to another page: > > > > method2 > > > confirm"+confirmationMessage+");"); > > } > > > > onClick() { > >setResponsePage(_pageClass, _params); > > } > > } > > > > Then I'd populate my page with several of these links using this code: > > > > add(new ListView("theLinks", theLinks) { > >@Override protected void populateItem(ListItem item) > >{ > >Link link = (Link) item.getModelObject(); > >item.add(link); > >} > >}); > > > > Does this look correct? > > > > Now I have gotten myself a little confused about a couple of things: > > - what is the purpose of the id? Since I will be populating the page > > with my links using a ListView, I don't see where the id of each link > > will ever be referred to. > > > > Finally, creating these links is quite verbose. PageParameters is > > final, so I can't create my links like: > > > > new JavascriptConfirmLink(id, cls, new PageParameters() {{ > > add("method", "method1"); }}, msg) > > like I'd like so I end up having to new a PageParameters for each link > > and add to it before creating the JavascriptConfirmLink, which is > > seeming quite verbose. > > > > There may be some holes in my approach. Is there a better way to do this? > > > > Thanks, > > Lowell > > > > > > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Struts 2 Vs. Wicket (Need some highlights)
Just curious, when you say developers' skills play a role, do you think that either component or action based frameworks are considerably harder to program in than the other? Lowell On 5/8/07, Xavier Hanin <[EMAIL PROTECTED]> wrote: > So I think you have to evaluate which kind of framework you want > first (and this depends on a lot of factors, including developers skills and > the type of application you're developing). - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] url mounting and PageParameters
I have figured this one out. Is seems that when my urls are mounted, the parameters are passed in as "/param/value/" rather than as "¶m=value". This is actually kind of nice :-) On 5/8/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > I have just started mounting my pages (for nice urls) and it seems > that the PageParameters is always empty now. Before I had mounted the > pages, I could manually append "&foo=bar" to my url and it would get > into the PageParams, but not that they are mounted, I have been trying > to append "?foo=bar" but it seems to vanish into the ether. What am I > missing? > > Thanks, > Lowell > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] AbortWithWebErrorCodeException not working as expected
I throw an AbortWithWebErrorCodeException with status=HttpServletResponse.SC_BAD_REQUEST from my WebPage constructor and my web browser receives a 200 status code and shows a blank page. What am I doing wrong? Thanks, Lowell - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] How do I do this - several similar links to another page
I'm trying to make a page with several similar links to another page: method2 http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] url mounting and PageParameters
I have just started mounting my pages (for nice urls) and it seems that the PageParameters is always empty now. Before I had mounted the pages, I could manually append "&foo=bar" to my url and it would get into the PageParams, but not that they are mounted, I have been trying to append "?foo=bar" but it seems to vanish into the ether. What am I missing? Thanks, Lowell - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] What's the best way to optionally add markup?
Thanks Igor, As for what you've outlined in #2, I just have one question: suppose that I had some conditional code in my java which said to add the number and star iff some condition was true, otherwise just add the number. Now in the case where I'm adding the star, how do I 'attach' it to the number? The only way I can think of off hand would be to put a string like "88 wrote: > that is usually not the wicket way. > > there are two different ways to do it based on your usecase. > > 1) you can always add the span with * into markup, but hide it by overriding > isvisible or directly calling setvisible. this is good if you dont have too > many of these on the screen and so dont care about taking the hit on having > components that are not visible in your hierarchy. > 2) conditionally adding the markup with or without the *. this will involve > having a fragment that contains just the number, and one that contains the > number and the star, and conditionally adding one or the other. > > but like i said it really depends directly on your usecase. > > -igor > > > > On 4/30/07, Lowell Kirsh <[EMAIL PROTECTED] > wrote: > > > > I have a table of numbers, and I want to flag each some of them by > > putting a red star next to them. What's the easiest way to do this? I > > imagine I'll have many red stars on the page. Would this be best done > > with a subclass of Label which renders itself as normal and also > > appends a '*' to the text from within the java > > code? > > > > Thanks, > > Lowell > > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] What's the best way to optionally add markup?
Thanks Martijn. How does one go about using css to add markup to a file? Do you have an example I could look at? On 4/30/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote: > Or you could add an attribute modifier and add a class to the > components, using css to prepend the elements with a * > > Martijn > > On 5/1/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > that is usually not the wicket way. > > > > there are two different ways to do it based on your usecase. > > > > 1) you can always add the span with * into markup, but hide it by overriding > > isvisible or directly calling setvisible. this is good if you dont have too > > many of these on the screen and so dont care about taking the hit on having > > components that are not visible in your hierarchy. > > 2) conditionally adding the markup with or without the *. this will involve > > having a fragment that contains just the number, and one that contains the > > number and the star, and conditionally adding one or the other. > > > > but like i said it really depends directly on your usecase. > > > > -igor > > > > > > > > On 4/30/07, Lowell Kirsh <[EMAIL PROTECTED] > wrote: > > > I have a table of numbers, and I want to flag each some of them by > > > putting a red star next to them. What's the easiest way to do this? I > > > imagine I'll have many red stars on the page. Would this be best done > > > with a subclass of Label which renders itself as normal and also > > > appends a '*' to the text from within the java > > > code? > > > > > > Thanks, > > > Lowell > > > > > > > > - > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > ___ > > > Wicket-user mailing list > > > Wicket-user@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > -- > Learn Wicket at ApacheCon Europe: http://apachecon.com > Join the wicket community at irc.freenode.net: ##wicket > Wicket 1.2.6 contains a very important fix. Download Wicket now! > http://wicketframework.org > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] What's the best way to optionally add markup?
I have a table of numbers, and I want to flag each some of them by putting a red star next to them. What's the easiest way to do this? I imagine I'll have many red stars on the page. Would this be best done with a subclass of Label which renders itself as normal and also appends a '*' to the text from within the java code? Thanks, Lowell - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] newbie: how do I put wicket-injected objects into an html comment?
Would that be usable for what I want to do (in addition to what you proposed)? On 4/27/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > what about it? > > -igor > > > > On 4/27/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > What about the Comment class? > > > > "Class representing a comment in an HTML document." > > > > > http://wicketframework.org/wicket-1.2/apidocs/wicket/protocol/http/documentvalidation/Comment.html > > > > > > On 4/27/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > > we do not support this, the only way i can think of doing something like > > > this is: > > > > > > add(new label("foo", "")); > > > > > > -igor > > > > > > > > > > > > On 4/27/07, Lowell Kirsh <[EMAIL PROTECTED] > wrote: > > > > > > > > What I'd like to do is something like: > > > > > > > > > > > > > > > > Does this make sense? How can I do that? > > > > > > > > Thanks, > > > > Lowell > > > > > > > > > > > > - > > > > This SF.net email is sponsored by DB2 Express > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > control of your XML. No limits. Just data. Click to get it now. > > > > http://sourceforge.net/powerbar/db2/ > > > > ___ > > > > Wicket-user mailing list > > > > Wicket-user@lists.sourceforge.net > > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > > > > > > - > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > ___ > > > Wicket-user mailing list > > > Wicket-user@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] newbie: how do I put wicket-injected objects into an html comment?
What about the Comment class? "Class representing a comment in an HTML document." http://wicketframework.org/wicket-1.2/apidocs/wicket/protocol/http/documentvalidation/Comment.html On 4/27/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > we do not support this, the only way i can think of doing something like > this is: > > add(new label("foo", "")); > > -igor > > > > On 4/27/07, Lowell Kirsh <[EMAIL PROTECTED]> wrote: > > > > What I'd like to do is something like: > > > > > > > > Does this make sense? How can I do that? > > > > Thanks, > > Lowell > > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] newbie: how do I put wicket-injected objects into an html comment?
What I'd like to do is something like: Does this make sense? How can I do that? Thanks, Lowell - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user