[Wicket-user] do not want to log ERROR when visiting a nonexistant page

2007-07-09 Thread Lowell Kirsh
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?

2007-06-01 Thread Lowell Kirsh
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(span id='foo' class='bar'*/span);
}
}
});

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(span id='foo' class='bar'*/span);
 }
 });

 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?

2007-05-31 Thread Lowell Kirsh
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] creating a tree - not using the wicket tree classes

2007-05-31 Thread Lowell Kirsh
I'd like to create a tree on a page and have something like this in my template:

span wicket:id=myTreeTree Goes Here/span

and have the rendered result look something along the lines of:

ul
 lifoobar
   ul
 libaz
   ul
 libaz2/li
 libaz3/li
   /ul
 /li
 libang/li
   /ul
 /li
/ul

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?

2007-05-31 Thread Lowell Kirsh
My use case is actually turning out slightly more complex than I
posted. What I actually have is:

span wicket:id=fooTEXTspan wicket:id=star*/spanspan

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:
 
  ...
  span wicket:id=removeMeHello bW/borld/span
  ...
 
  Is it possible to remove this markup?

 new WebMarkupContainer(removeMe) {
 protected void onBeforeRender() {
 super.onBeforeRender();
 setVisible(sometimesFalse());
 }
 }

 - Timo

 --
 Timo Rantalaiho
 Reaktor Innovations OyURL: http://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


Re: [Wicket-user] Is it possible to remove something from a page?

2007-05-31 Thread Lowell Kirsh
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:
 
  span wicket:id=fooTEXTspan wicket:id=star*/spanspan
 
  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] creating a tree - not using the wicket tree classes

2007-05-31 Thread Lowell Kirsh
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:
 
  span wicket:id=myTreeTree Goes Here/span
 
  and have the rendered result look something along the lines of:
 
  ul
   lifoobar
 ul
   libaz
 ul
   libaz2/li
   libaz3/li
 /ul
   /li
   libang/li
 /ul
   /li
  /ul
 
  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?

2007-05-31 Thread Lowell Kirsh
But I get the following error:

...WicketMessage: Expected close tag for 'span wicket:id=foobar'
Possible attempt to embed component(s) 'span wicket:id=star' 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:
   
span wicket:id=fooTEXTspan wicket:id=star*/spanspan
   
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] Is it possible to remove something from a page?

2007-05-31 Thread Lowell Kirsh
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 span wicket:id=foo 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 'span wicket:id=foobar'
   Possible attempt to embed component(s) 'span wicket:id=star' 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:
  
   span wicket:id=fooTEXTspan wicket:id=star*/spanspan
  
   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

Re: [Wicket-user] Is it possible to remove something from a page?

2007-05-31 Thread Lowell Kirsh
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 'span wicket:id=foobar'
  Possible attempt to embed component(s) 'span wicket:id=star' 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:
 
  span wicket:id=fooTEXTspan wicket:id=star*/spanspan
 
  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
 

 -
 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

Re: [Wicket-user] Is it possible to remove something from a page?

2007-05-31 Thread Lowell Kirsh
Basically what I want to do is from this markup:

span wicket:id=fooTEXTspan wicket:id=star*span/span

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 'span wicket:id=foobar'
   Possible attempt to embed component(s) 'span wicket:id=star' 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:
  
   span wicket:id=fooTEXTspan wicket:id=star*/spanspan
  
   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

Re: [Wicket-user] Is it possible to remove something from a page?

2007-05-31 Thread Lowell Kirsh
Oh, if this helps, what I want could be achieved with this:

span wicket:id=foobar
   span wicket:id=textTEXT/span
   span wicket:id=star*/span
/span

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:

 span wicket:id=fooTEXTspan wicket:id=star*span/span

 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 'span wicket:id=foobar'
Possible attempt to embed component(s) 'span wicket:id=star' 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:
   
span wicket:id=fooTEXTspan wicket:id=star*/spanspan
   
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

Re: [Wicket-user] Is it possible to remove something from a page?

2007-05-31 Thread Lowell Kirsh
 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


[Wicket-user] Is it possible to remove something from a page?

2007-05-30 Thread Lowell Kirsh
I making a web page which contains some markup that I'd like to remove
(sometimes). I imagine it would look like:

...
span wicket:id=removeMeHello bW/borld/span
...

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] repeating the same text in several places on one page

2007-05-14 Thread Lowell Kirsh
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


Re: [Wicket-user] Wicket and web services

2007-05-14 Thread Lowell Kirsh
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?
 
  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

Re: [Wicket-user] Exception loading sessions from persistent storage

2007-05-14 Thread Lowell Kirsh
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

2007-05-13 Thread Lowell Kirsh
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. 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

Re: [Wicket-user] 1.3 1.2.6

2007-05-13 Thread Lowell Kirsh
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] Exception loading sessions from persistent storage

2007-05-13 Thread Lowell Kirsh
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


[Wicket-user] repeating the same text in several places on one page

2007-05-13 Thread Lowell Kirsh
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] POST form submissions being converted to GETs

2007-05-11 Thread Lowell Kirsh
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] Wicket and web services

2007-05-11 Thread Lowell Kirsh
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] programmatic access to a wicket site

2007-05-10 Thread Lowell Kirsh
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

2007-05-10 Thread Lowell Kirsh
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] AbortWithWebErrorCodeException not working as expected

2007-05-10 Thread Lowell Kirsh
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
  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

2007-05-10 Thread Lowell Kirsh
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.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] POST form submissions being converted to GETs

2007-05-10 Thread Lowell Kirsh
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] url mounting and PageParameters

2007-05-09 Thread Lowell Kirsh
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
param=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


Re: [Wicket-user] Struts 2 Vs. Wicket (Need some highlights)

2007-05-09 Thread Lowell Kirsh
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] How do I do this - several similar links to another page

2007-05-09 Thread Lowell Kirsh
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 a and the /a?

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:
 span wicket:id=listViewId
a wicket:id=theLinkId
 href=anotherPage?method=method1method1/a
 /span
 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:
 
  a href=anotherPage?method=method1method1/a
  a href=anotherPage?method=method2method2/a
  a href=anotherPage?method=method3method3/a
 
  This would be really easy to put into my html code, but then it
  becomes fragile to whether or not I'm mounting my urls. I suppose I
  could just make sure to always mount them and make sure to keep these
  links in sync with that mapping. But let's for some reason suppose
  that I want to inject these from my java code. I'm not sure how to do
  this exactly. I was thinking I could do something like I outline
  below. Actually, my links are a bit more complicated than displayed
  above, since I would like to make sure to have a javascript
  confirmation for each click. So I think that for each link what I
  would need would be the class of the page they link to, and a map of
  the parameters. So I think the code might be something like:
 
  class JavascriptConfirmLink extends Link {
   JavascriptConfirmLink(id, pageClass, params, confirmationMessage) {
 super(id);
 _pageClass = pageClass;
 _params = params;
 add(new SimpleAttributeModifier(onclick, 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 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

2007-05-09 Thread Lowell Kirsh
 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

2007-05-09 Thread Lowell Kirsh
D'oh! Of course. And I assume you mean span instead of label.

On 5/9/07, Shams Mahmood [EMAIL PROTECTED] wrote:
 Why not just add a label to the link.

 span wicket:id=listViewId
 a wicket:id=theLinkId
 href=anotherPage?method=method1
  label wicket:id=theLabelIdmethod1/label
 /a
 /span

 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 a and the /a?
 
  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:
   span wicket:id=listViewId
  a wicket:id=theLinkId
   href=anotherPage?method=method1method1/a
   /span
   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:
   
a href=anotherPage?method=method1method1/a
a href=anotherPage?method=method2method2/a
a href=anotherPage?method=method3method3/a
   
This would be really easy to put into my html code, but then it
becomes fragile to whether or not I'm mounting my urls. I suppose I
could just make sure to always mount them and make sure to keep these
links in sync with that mapping. But let's for some reason suppose
that I want to inject these from my java code. I'm not sure how to do
this exactly. I was thinking I could do something like I outline
below. Actually, my links are a bit more complicated than displayed
above, since I would like to make sure to have a javascript
confirmation for each click. So I think that for each link what I
would need would be the class of the page they link to, and a map of
the parameters. So I think the code might be something like:
   
class JavascriptConfirmLink extends Link {
 JavascriptConfirmLink(id, pageClass, params, confirmationMessage) {
   super(id);
   _pageClass = pageClass;
   _params = params;
   add(new SimpleAttributeModifier(onclick, 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 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

Re: [Wicket-user] AbortWithWebErrorCodeException not working as expected

2007-05-09 Thread Lowell Kirsh
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] Struts 2 Vs. Wicket (Need some highlights)

2007-05-09 Thread Lowell Kirsh
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] How do I do this - several similar links to another page

2007-05-09 Thread Lowell Kirsh
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:
  span wicket:id=listViewId
 a wicket:id=theLinkId
 href=anotherPage?method=method1method1/a
  /span
  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:
  
   a href=anotherPage?method=method1method1/a
   a href=anotherPage?method=method2method2/a
   a href=anotherPage?method=method3method3/a
  
   This would be really easy to put into my html code, but then it
   becomes fragile to whether or not I'm mounting my urls. I suppose I
   could just make sure to always mount them and make sure to keep these
   links in sync with that mapping. But let's for some reason suppose
   that I want to inject these from my java code. I'm not sure how to do
   this exactly. I was thinking I could do something like I outline
   below. Actually, my links are a bit more complicated than displayed
   above, since I would like to make sure to have a javascript
   confirmation for each click. So I think that for each link what I
   would need would be the class of the page they link to, and a map of
   the parameters. So I think the code might be something like:
  
   class JavascriptConfirmLink extends Link {
JavascriptConfirmLink(id, pageClass, params, confirmationMessage) {
  super(id);
  _pageClass = pageClass;
  _params = params;
  add(new SimpleAttributeModifier(onclick, 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 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
 

Re: [Wicket-user] url mounting and PageParameters

2007-05-09 Thread Lowell Kirsh
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
  param=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


[Wicket-user] programmatic access to a wicket site

2007-05-09 Thread Lowell Kirsh
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] programmatic access to a wicket site

2007-05-09 Thread Lowell Kirsh
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] url mounting and PageParameters

2007-05-08 Thread Lowell Kirsh
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] How do I do this - several similar links to another page

2007-05-08 Thread Lowell Kirsh
I'm trying to make a page with several similar links to another page:

a href=anotherPage?method=method1method1/a
a href=anotherPage?method=method2method2/a
a href=anotherPage?method=method3method3/a

This would be really easy to put into my html code, but then it
becomes fragile to whether or not I'm mounting my urls. I suppose I
could just make sure to always mount them and make sure to keep these
links in sync with that mapping. But let's for some reason suppose
that I want to inject these from my java code. I'm not sure how to do
this exactly. I was thinking I could do something like I outline
below. Actually, my links are a bit more complicated than displayed
above, since I would like to make sure to have a javascript
confirmation for each click. So I think that for each link what I
would need would be the class of the page they link to, and a map of
the parameters. So I think the code might be something like:

class JavascriptConfirmLink extends Link {
  JavascriptConfirmLink(id, pageClass, params, confirmationMessage) {
super(id);
_pageClass = pageClass;
_params = params;
add(new SimpleAttributeModifier(onclick, 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 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


[Wicket-user] AbortWithWebErrorCodeException not working as expected

2007-05-08 Thread Lowell Kirsh
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


Re: [Wicket-user] What's the best way to optionally add markup?

2007-05-02 Thread Lowell Kirsh
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 'span class=...*/span' 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


Re: [Wicket-user] What's the best way to optionally add markup?

2007-05-02 Thread Lowell Kirsh
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 span... in the java code, but I'm guessing you did
not mean that.

On 4/30/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 'span class=...*/span' 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


[Wicket-user] What's the best way to optionally add markup?

2007-05-01 Thread Lowell Kirsh
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 'span class=...*/span' 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


[Wicket-user] newbie: how do I put wicket-injected objects into an html comment?

2007-04-27 Thread Lowell Kirsh
What I'd like to do is something like:

!-- p wicket:id=foosome data that should only be visible when
viewing the page's source code/p --

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


Re: [Wicket-user] newbie: how do I put wicket-injected objects into an html comment?

2007-04-27 Thread Lowell Kirsh
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, !-- bar --));

 -igor



 On 4/27/07, Lowell Kirsh [EMAIL PROTECTED] wrote:
 
  What I'd like to do is something like:
 
  !-- p wicket:id=foosome data that should only be visible when
  viewing the page's source code/p --
 
  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


Re: [Wicket-user] newbie: how do I put wicket-injected objects into an html comment?

2007-04-27 Thread Lowell Kirsh
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, !-- bar --));
  
   -igor
  
  
  
   On 4/27/07, Lowell Kirsh [EMAIL PROTECTED]  wrote:
   
What I'd like to do is something like:
   
!-- p wicket:id=foosome data that should only be visible when
viewing the page's source code/p --
   
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