Re: Migrating to 1.4-SNAPSHOT: how to rid of generic warnings?

2008-04-12 Thread Johan Compagner
You mean now ofcourse that you will pick this up now right matej? :)

On 4/11/08, Matej Knopp [EMAIL PROTECTED] wrote:
 That's only question of time, Johan hasn't yet had time to generify pages.

 -Matej

 On Fri, Apr 11, 2008 at 3:10 AM, Jonathan Locke
 [EMAIL PROTECTED] wrote:
 
 
   uh, i meant WebPage obviously
 
 
 
 
   Jonathan Locke wrote:
   
   
i didn't say it shouldn't be.  i was just saying /if it was not going
 to
be/ (i'm not working on 1.4 yet, so i don't know why it's not generic
already) it shouldn't create generics warnings.  in fact, i agree with
 you
and people should ideally just say MyPage extends WebPage? if their
 page
has no model.
   
   
igor.vaynberg wrote:
   
why wouldnt page be generic?
   
class edituserpage extends webpageuser {
  public edituserpage(imodeluser user) {...}}
   
-igor
   
   
On Thu, Apr 10, 2008 at 5:22 PM, Jonathan Locke
[EMAIL PROTECTED] wrote:
   
   
 yeah.  if Page/WebPage are not going to be generic, maybe they
 should
extend
 (Web)MarkupContainer? or something?
   
   
 MYoung wrote:
 
  public class HomePage extends WebPage {
   

  ERROR: The type WebPage is not generic; it cannot be parameterized
with
  arguments
 
 
 
   
you COULD use the @SuppressWarnings({unchecked})
 
  I would rather not use @SupressWarnings if I can do the right
 thing.
 
  On Thu, Apr 10, 2008 at 4:49 PM, Matej Knopp
 [EMAIL PROTECTED]
  wrote:
 
  Problem is that WebPage is generic class but your instance
 doesn't
  have the type specified. Since you page doesn't have a model
 object
  the type is not really necessary, but the compiler doesn't know
that.
 
  You can try this:
 
 
  public class HomePage extends WebPage {
   
   

  This should get rid of the wanings when adding components.
 
  -Matej
 
  On Fri, Apr 11, 2008 at 1:19 AM, Matthew Young
 [EMAIL PROTECTED]
wrote:
   Oh mine, some many generic warnings after moving to 1.4.  I got
rid of
  them
by putting in type parameters but I'm not sure if I'm doing
 the
right
  thing.
There is one warning I don't know how to fix:
  
WARNING: Type safety: the method add(Component) belongs to the
raw
  type
MarkupContainer. Reference to generic type MarkupContainerT
should
  be
parameterized.
  
  
What are the benefits of generifying Wicket? I only know one
 is
type
  safe
model.  What else?
  
  
  
Here is a little test page, please take a look and see if I'm
doing
  thing
correctly?
  
public class HomePage extends WebPage {
  
   private static final long serialVersionUID = 1L;
  
   private String hi =;
   private int count;
  
   public HomePage(final PageParameters parameters) {
  
   // WARNING HERE and next line
   add(new LabelHomePage(message, If you see this
message
  wicket
is properly configured and running));
   add(new FeedbackPanel(feedback));
   FormHomePage form = new FormHomePage(form, new
CompoundPropertyModelHomePage(this)) {
   private static final long serialVersionUID = 1L;
   @Override public void onSubmit() {
   ++count;
   }
   };
   add(form);// WARNING HERE
   form.add(new
 TextFieldHomePage(hi).setRequired(true));
   // WARNING HERE
   add(new LabelHomePage(hihi, new
  PropertyModelHomePage(this,
hello)));
   }
  
   public String getHello() {
   return hi + : you say hello  + count +  times.;
   }
}
  
 
 
 
  --
  Resizable and reorderable grid components.
  http://www.inmethod.com
 
 
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
   
 --
 View this message in context:
   
 http://www.nabble.com/Migrating-to-1.4-SNAPSHOT%3A-how-to-rid-of-generic-warnings--tp16622159p16622850.html
 Sent from the Wicket - User mailing list archive at Nabble.com.
   
   
   
   
   
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
   
   
 
   --
   View this message in context:
 

Re: Migrating to 1.4-SNAPSHOT: how to rid of generic warnings?

2008-04-11 Thread Matej Knopp
That's only question of time, Johan hasn't yet had time to generify pages.

-Matej

On Fri, Apr 11, 2008 at 3:10 AM, Jonathan Locke
[EMAIL PROTECTED] wrote:


  uh, i meant WebPage obviously




  Jonathan Locke wrote:
  
  
   i didn't say it shouldn't be.  i was just saying /if it was not going to
   be/ (i'm not working on 1.4 yet, so i don't know why it's not generic
   already) it shouldn't create generics warnings.  in fact, i agree with you
   and people should ideally just say MyPage extends WebPage? if their page
   has no model.
  
  
   igor.vaynberg wrote:
  
   why wouldnt page be generic?
  
   class edituserpage extends webpageuser {
 public edituserpage(imodeluser user) {...}}
  
   -igor
  
  
   On Thu, Apr 10, 2008 at 5:22 PM, Jonathan Locke
   [EMAIL PROTECTED] wrote:
  
  
yeah.  if Page/WebPage are not going to be generic, maybe they should
   extend
(Web)MarkupContainer? or something?
  
  
MYoung wrote:

 public class HomePage extends WebPage {
  
   
 ERROR: The type WebPage is not generic; it cannot be parameterized
   with
 arguments



  
   you COULD use the @SuppressWarnings({unchecked})

 I would rather not use @SupressWarnings if I can do the right thing.

 On Thu, Apr 10, 2008 at 4:49 PM, Matej Knopp [EMAIL PROTECTED]
 wrote:

 Problem is that WebPage is generic class but your instance doesn't
 have the type specified. Since you page doesn't have a model object
 the type is not really necessary, but the compiler doesn't know
   that.

 You can try this:


 public class HomePage extends WebPage {
  
  
   
 This should get rid of the wanings when adding components.

 -Matej

 On Fri, Apr 11, 2008 at 1:19 AM, Matthew Young [EMAIL PROTECTED]
   wrote:
  Oh mine, some many generic warnings after moving to 1.4.  I got
   rid of
 them
   by putting in type parameters but I'm not sure if I'm doing the
   right
 thing.
   There is one warning I don't know how to fix:
 
   WARNING: Type safety: the method add(Component) belongs to the
   raw
 type
   MarkupContainer. Reference to generic type MarkupContainerT
   should
 be
   parameterized.
 
 
   What are the benefits of generifying Wicket? I only know one is
   type
 safe
   model.  What else?
 
 
 
   Here is a little test page, please take a look and see if I'm
   doing
 thing
   correctly?
 
   public class HomePage extends WebPage {
 
  private static final long serialVersionUID = 1L;
 
  private String hi =;
  private int count;
 
  public HomePage(final PageParameters parameters) {
 
  // WARNING HERE and next line
  add(new LabelHomePage(message, If you see this
   message
 wicket
   is properly configured and running));
  add(new FeedbackPanel(feedback));
  FormHomePage form = new FormHomePage(form, new
   CompoundPropertyModelHomePage(this)) {
  private static final long serialVersionUID = 1L;
  @Override public void onSubmit() {
  ++count;
  }
  };
  add(form);// WARNING HERE
  form.add(new TextFieldHomePage(hi).setRequired(true));
  // WARNING HERE
  add(new LabelHomePage(hihi, new
 PropertyModelHomePage(this,
   hello)));
  }
 
  public String getHello() {
  return hi + : you say hello  + count +  times.;
  }
   }
 



 --
 Resizable and reorderable grid components.
 http://www.inmethod.com


   -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




  
--
View this message in context:
   
 http://www.nabble.com/Migrating-to-1.4-SNAPSHOT%3A-how-to-rid-of-generic-warnings--tp16622159p16622850.html
Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  

  --
  View this message in context: 
 http://www.nabble.com/Migrating-to-1.4-SNAPSHOT%3A-how-to-rid-of-generic-warnings--tp16622159p16623297.html


 Sent from the Wicket - User mailing list archive at Nabble.com.


  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Resizable and 

Re: Migrating to 1.4-SNAPSHOT: how to rid of generic warnings?

2008-04-10 Thread Matej Knopp
Problem is that WebPage is generic class but your instance doesn't
have the type specified. Since you page doesn't have a model object
the type is not really necessary, but the compiler doesn't know that.

You can try this:


public class HomePage extends WebPageObject {

This should get rid of the wanings when adding components.

-Matej

On Fri, Apr 11, 2008 at 1:19 AM, Matthew Young [EMAIL PROTECTED] wrote:
 Oh mine, some many generic warnings after moving to 1.4.  I got rid of them
  by putting in type parameters but I'm not sure if I'm doing the right thing.
  There is one warning I don't know how to fix:

  WARNING: Type safety: the method add(Component) belongs to the raw type
  MarkupContainer. Reference to generic type MarkupContainerT should be
  parameterized.


  What are the benefits of generifying Wicket? I only know one is type safe
  model.  What else?



  Here is a little test page, please take a look and see if I'm doing thing
  correctly?

  public class HomePage extends WebPage {

 private static final long serialVersionUID = 1L;

 private String hi =;
 private int count;

 public HomePage(final PageParameters parameters) {

 // WARNING HERE and next line
 add(new LabelHomePage(message, If you see this message wicket
  is properly configured and running));
 add(new FeedbackPanel(feedback));
 FormHomePage form = new FormHomePage(form, new
  CompoundPropertyModelHomePage(this)) {
 private static final long serialVersionUID = 1L;
 @Override public void onSubmit() {
 ++count;
 }
 };
 add(form);// WARNING HERE
 form.add(new TextFieldHomePage(hi).setRequired(true));
 // WARNING HERE
 add(new LabelHomePage(hihi, new PropertyModelHomePage(this,
  hello)));
 }

 public String getHello() {
 return hi + : you say hello  + count +  times.;
 }
  }




-- 
Resizable and reorderable grid components.
http://www.inmethod.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Migrating to 1.4-SNAPSHOT: how to rid of generic warnings?

2008-04-10 Thread Robby O'Connor
you COULD use the @SuppressWarnings({unchecked}) annotation. More
info: http://mindprod.com/jgloss/annotations.html#SUPPRESSWARNINGS
Matthew Young wrote:
 Oh mine, some many generic warnings after moving to 1.4.  I got rid of them
 by putting in type parameters but I'm not sure if I'm doing the right thing.
 There is one warning I don't know how to fix:
 
 WARNING: Type safety: the method add(Component) belongs to the raw type
 MarkupContainer. Reference to generic type MarkupContainerT should be
 parameterized.
 
 
 What are the benefits of generifying Wicket? I only know one is type safe
 model.  What else?
 
 
 
 Here is a little test page, please take a look and see if I'm doing thing
 correctly?
 
 public class HomePage extends WebPage {
 
 private static final long serialVersionUID = 1L;
 
 private String hi =;
 private int count;
 
 public HomePage(final PageParameters parameters) {
 
 // WARNING HERE and next line
 add(new LabelHomePage(message, If you see this message wicket
 is properly configured and running));
 add(new FeedbackPanel(feedback));
 FormHomePage form = new FormHomePage(form, new
 CompoundPropertyModelHomePage(this)) {
 private static final long serialVersionUID = 1L;
 @Override public void onSubmit() {
 ++count;
 }
 };
 add(form);// WARNING HERE
 form.add(new TextFieldHomePage(hi).setRequired(true));
 // WARNING HERE
 add(new LabelHomePage(hihi, new PropertyModelHomePage(this,
 hello)));
 }
 
 public String getHello() {
 return hi + : you say hello  + count +  times.;
 }
 }
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Migrating to 1.4-SNAPSHOT: how to rid of generic warnings?

2008-04-10 Thread Matthew Young
 public class HomePage extends WebPageObject {

ERROR: The type WebPage is not generic; it cannot be parameterized with
arguments Object



you COULD use the @SuppressWarnings({unchecked})

I would rather not use @SupressWarnings if I can do the right thing.

On Thu, Apr 10, 2008 at 4:49 PM, Matej Knopp [EMAIL PROTECTED] wrote:

 Problem is that WebPage is generic class but your instance doesn't
 have the type specified. Since you page doesn't have a model object
 the type is not really necessary, but the compiler doesn't know that.

 You can try this:


 public class HomePage extends WebPageObject {

 This should get rid of the wanings when adding components.

 -Matej

 On Fri, Apr 11, 2008 at 1:19 AM, Matthew Young [EMAIL PROTECTED] wrote:
  Oh mine, some many generic warnings after moving to 1.4.  I got rid of
 them
   by putting in type parameters but I'm not sure if I'm doing the right
 thing.
   There is one warning I don't know how to fix:
 
   WARNING: Type safety: the method add(Component) belongs to the raw type
   MarkupContainer. Reference to generic type MarkupContainerT should be
   parameterized.
 
 
   What are the benefits of generifying Wicket? I only know one is type
 safe
   model.  What else?
 
 
 
   Here is a little test page, please take a look and see if I'm doing
 thing
   correctly?
 
   public class HomePage extends WebPage {
 
  private static final long serialVersionUID = 1L;
 
  private String hi =;
  private int count;
 
  public HomePage(final PageParameters parameters) {
 
  // WARNING HERE and next line
  add(new LabelHomePage(message, If you see this message
 wicket
   is properly configured and running));
  add(new FeedbackPanel(feedback));
  FormHomePage form = new FormHomePage(form, new
   CompoundPropertyModelHomePage(this)) {
  private static final long serialVersionUID = 1L;
  @Override public void onSubmit() {
  ++count;
  }
  };
  add(form);// WARNING HERE
  form.add(new TextFieldHomePage(hi).setRequired(true));
  // WARNING HERE
  add(new LabelHomePage(hihi, new
 PropertyModelHomePage(this,
   hello)));
  }
 
  public String getHello() {
  return hi + : you say hello  + count +  times.;
  }
   }
 



 --
 Resizable and reorderable grid components.
 http://www.inmethod.com

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Migrating to 1.4-SNAPSHOT: how to rid of generic warnings?

2008-04-10 Thread Jonathan Locke


yeah.  if Page/WebPage are not going to be generic, maybe they should extend
(Web)MarkupContainer? or something?


MYoung wrote:
 
 public class HomePage extends WebPage {
 
 ERROR: The type WebPage is not generic; it cannot be parameterized with
 arguments 
 
 
 
you COULD use the @SuppressWarnings({unchecked})
 
 I would rather not use @SupressWarnings if I can do the right thing.
 
 On Thu, Apr 10, 2008 at 4:49 PM, Matej Knopp [EMAIL PROTECTED]
 wrote:
 
 Problem is that WebPage is generic class but your instance doesn't
 have the type specified. Since you page doesn't have a model object
 the type is not really necessary, but the compiler doesn't know that.

 You can try this:


 public class HomePage extends WebPage {

 This should get rid of the wanings when adding components.

 -Matej

 On Fri, Apr 11, 2008 at 1:19 AM, Matthew Young [EMAIL PROTECTED] wrote:
  Oh mine, some many generic warnings after moving to 1.4.  I got rid of
 them
   by putting in type parameters but I'm not sure if I'm doing the right
 thing.
   There is one warning I don't know how to fix:
 
   WARNING: Type safety: the method add(Component) belongs to the raw
 type
   MarkupContainer. Reference to generic type MarkupContainerT should
 be
   parameterized.
 
 
   What are the benefits of generifying Wicket? I only know one is type
 safe
   model.  What else?
 
 
 
   Here is a little test page, please take a look and see if I'm doing
 thing
   correctly?
 
   public class HomePage extends WebPage {
 
  private static final long serialVersionUID = 1L;
 
  private String hi =;
  private int count;
 
  public HomePage(final PageParameters parameters) {
 
  // WARNING HERE and next line
  add(new LabelHomePage(message, If you see this message
 wicket
   is properly configured and running));
  add(new FeedbackPanel(feedback));
  FormHomePage form = new FormHomePage(form, new
   CompoundPropertyModelHomePage(this)) {
  private static final long serialVersionUID = 1L;
  @Override public void onSubmit() {
  ++count;
  }
  };
  add(form);// WARNING HERE
  form.add(new TextFieldHomePage(hi).setRequired(true));
  // WARNING HERE
  add(new LabelHomePage(hihi, new
 PropertyModelHomePage(this,
   hello)));
  }
 
  public String getHello() {
  return hi + : you say hello  + count +  times.;
  }
   }
 



 --
 Resizable and reorderable grid components.
 http://www.inmethod.com

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 

-- 
View this message in context: 
http://www.nabble.com/Migrating-to-1.4-SNAPSHOT%3A-how-to-rid-of-generic-warnings--tp16622159p16622850.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Migrating to 1.4-SNAPSHOT: how to rid of generic warnings?

2008-04-10 Thread Igor Vaynberg
why wouldnt page be generic?

class edituserpage extends webpageuser {
  public edituserpage(imodeluser user) {...}}

-igor


On Thu, Apr 10, 2008 at 5:22 PM, Jonathan Locke
[EMAIL PROTECTED] wrote:


  yeah.  if Page/WebPage are not going to be generic, maybe they should extend
  (Web)MarkupContainer? or something?


  MYoung wrote:
  
   public class HomePage extends WebPage {

 
   ERROR: The type WebPage is not generic; it cannot be parameterized with
   arguments
  
  
  

 you COULD use the @SuppressWarnings({unchecked})
  
   I would rather not use @SupressWarnings if I can do the right thing.
  
   On Thu, Apr 10, 2008 at 4:49 PM, Matej Knopp [EMAIL PROTECTED]
   wrote:
  
   Problem is that WebPage is generic class but your instance doesn't
   have the type specified. Since you page doesn't have a model object
   the type is not really necessary, but the compiler doesn't know that.
  
   You can try this:
  
  
   public class HomePage extends WebPage {


 
   This should get rid of the wanings when adding components.
  
   -Matej
  
   On Fri, Apr 11, 2008 at 1:19 AM, Matthew Young [EMAIL PROTECTED] wrote:
Oh mine, some many generic warnings after moving to 1.4.  I got rid of
   them
 by putting in type parameters but I'm not sure if I'm doing the right
   thing.
 There is one warning I don't know how to fix:
   
 WARNING: Type safety: the method add(Component) belongs to the raw
   type
 MarkupContainer. Reference to generic type MarkupContainerT should
   be
 parameterized.
   
   
 What are the benefits of generifying Wicket? I only know one is type
   safe
 model.  What else?
   
   
   
 Here is a little test page, please take a look and see if I'm doing
   thing
 correctly?
   
 public class HomePage extends WebPage {
   
private static final long serialVersionUID = 1L;
   
private String hi =;
private int count;
   
public HomePage(final PageParameters parameters) {
   
// WARNING HERE and next line
add(new LabelHomePage(message, If you see this message
   wicket
 is properly configured and running));
add(new FeedbackPanel(feedback));
FormHomePage form = new FormHomePage(form, new
 CompoundPropertyModelHomePage(this)) {
private static final long serialVersionUID = 1L;
@Override public void onSubmit() {
++count;
}
};
add(form);// WARNING HERE
form.add(new TextFieldHomePage(hi).setRequired(true));
// WARNING HERE
add(new LabelHomePage(hihi, new
   PropertyModelHomePage(this,
 hello)));
}
   
public String getHello() {
return hi + : you say hello  + count +  times.;
}
 }
   
  
  
  
   --
   Resizable and reorderable grid components.
   http://www.inmethod.com
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  

  --
  View this message in context: 
 http://www.nabble.com/Migrating-to-1.4-SNAPSHOT%3A-how-to-rid-of-generic-warnings--tp16622159p16622850.html
  Sent from the Wicket - User mailing list archive at Nabble.com.




  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Migrating to 1.4-SNAPSHOT: how to rid of generic warnings?

2008-04-10 Thread Jonathan Locke


i didn't say it shouldn't be.  i was just saying /if it was not going to be/
(i'm not working on 1.4 yet, so i don't know why it's not generic already)
it shouldn't create generics warnings.  in fact, i agree with you and people
should ideally just say MyPage extends WebPage? if their page has no
model.


igor.vaynberg wrote:
 
 why wouldnt page be generic?
 
 class edituserpage extends webpageuser {
   public edituserpage(imodeluser user) {...}}
 
 -igor
 
 
 On Thu, Apr 10, 2008 at 5:22 PM, Jonathan Locke
 [EMAIL PROTECTED] wrote:


  yeah.  if Page/WebPage are not going to be generic, maybe they should
 extend
  (Web)MarkupContainer? or something?


  MYoung wrote:
  
   public class HomePage extends WebPage {

 
   ERROR: The type WebPage is not generic; it cannot be parameterized
 with
   arguments
  
  
  

 you COULD use the @SuppressWarnings({unchecked})
  
   I would rather not use @SupressWarnings if I can do the right thing.
  
   On Thu, Apr 10, 2008 at 4:49 PM, Matej Knopp [EMAIL PROTECTED]
   wrote:
  
   Problem is that WebPage is generic class but your instance doesn't
   have the type specified. Since you page doesn't have a model object
   the type is not really necessary, but the compiler doesn't know that.
  
   You can try this:
  
  
   public class HomePage extends WebPage {


 
   This should get rid of the wanings when adding components.
  
   -Matej
  
   On Fri, Apr 11, 2008 at 1:19 AM, Matthew Young [EMAIL PROTECTED]
 wrote:
Oh mine, some many generic warnings after moving to 1.4.  I got rid
 of
   them
 by putting in type parameters but I'm not sure if I'm doing the
 right
   thing.
 There is one warning I don't know how to fix:
   
 WARNING: Type safety: the method add(Component) belongs to the raw
   type
 MarkupContainer. Reference to generic type MarkupContainerT
 should
   be
 parameterized.
   
   
 What are the benefits of generifying Wicket? I only know one is
 type
   safe
 model.  What else?
   
   
   
 Here is a little test page, please take a look and see if I'm
 doing
   thing
 correctly?
   
 public class HomePage extends WebPage {
   
private static final long serialVersionUID = 1L;
   
private String hi =;
private int count;
   
public HomePage(final PageParameters parameters) {
   
// WARNING HERE and next line
add(new LabelHomePage(message, If you see this message
   wicket
 is properly configured and running));
add(new FeedbackPanel(feedback));
FormHomePage form = new FormHomePage(form, new
 CompoundPropertyModelHomePage(this)) {
private static final long serialVersionUID = 1L;
@Override public void onSubmit() {
++count;
}
};
add(form);// WARNING HERE
form.add(new TextFieldHomePage(hi).setRequired(true));
// WARNING HERE
add(new LabelHomePage(hihi, new
   PropertyModelHomePage(this,
 hello)));
}
   
public String getHello() {
return hi + : you say hello  + count +  times.;
}
 }
   
  
  
  
   --
   Resizable and reorderable grid components.
   http://www.inmethod.com
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  

  --
  View this message in context:
 http://www.nabble.com/Migrating-to-1.4-SNAPSHOT%3A-how-to-rid-of-generic-warnings--tp16622159p16622850.html
  Sent from the Wicket - User mailing list archive at Nabble.com.




  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Migrating-to-1.4-SNAPSHOT%3A-how-to-rid-of-generic-warnings--tp16622159p16623292.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Migrating to 1.4-SNAPSHOT: how to rid of generic warnings?

2008-04-10 Thread Jonathan Locke


uh, i meant WebPage obviously


Jonathan Locke wrote:
 
 
 i didn't say it shouldn't be.  i was just saying /if it was not going to
 be/ (i'm not working on 1.4 yet, so i don't know why it's not generic
 already) it shouldn't create generics warnings.  in fact, i agree with you
 and people should ideally just say MyPage extends WebPage? if their page
 has no model.
 
 
 igor.vaynberg wrote:
 
 why wouldnt page be generic?
 
 class edituserpage extends webpageuser {
   public edituserpage(imodeluser user) {...}}
 
 -igor
 
 
 On Thu, Apr 10, 2008 at 5:22 PM, Jonathan Locke
 [EMAIL PROTECTED] wrote:


  yeah.  if Page/WebPage are not going to be generic, maybe they should
 extend
  (Web)MarkupContainer? or something?


  MYoung wrote:
  
   public class HomePage extends WebPage {

 
   ERROR: The type WebPage is not generic; it cannot be parameterized
 with
   arguments
  
  
  

 you COULD use the @SuppressWarnings({unchecked})
  
   I would rather not use @SupressWarnings if I can do the right thing.
  
   On Thu, Apr 10, 2008 at 4:49 PM, Matej Knopp [EMAIL PROTECTED]
   wrote:
  
   Problem is that WebPage is generic class but your instance doesn't
   have the type specified. Since you page doesn't have a model object
   the type is not really necessary, but the compiler doesn't know
 that.
  
   You can try this:
  
  
   public class HomePage extends WebPage {


 
   This should get rid of the wanings when adding components.
  
   -Matej
  
   On Fri, Apr 11, 2008 at 1:19 AM, Matthew Young [EMAIL PROTECTED]
 wrote:
Oh mine, some many generic warnings after moving to 1.4.  I got
 rid of
   them
 by putting in type parameters but I'm not sure if I'm doing the
 right
   thing.
 There is one warning I don't know how to fix:
   
 WARNING: Type safety: the method add(Component) belongs to the
 raw
   type
 MarkupContainer. Reference to generic type MarkupContainerT
 should
   be
 parameterized.
   
   
 What are the benefits of generifying Wicket? I only know one is
 type
   safe
 model.  What else?
   
   
   
 Here is a little test page, please take a look and see if I'm
 doing
   thing
 correctly?
   
 public class HomePage extends WebPage {
   
private static final long serialVersionUID = 1L;
   
private String hi =;
private int count;
   
public HomePage(final PageParameters parameters) {
   
// WARNING HERE and next line
add(new LabelHomePage(message, If you see this
 message
   wicket
 is properly configured and running));
add(new FeedbackPanel(feedback));
FormHomePage form = new FormHomePage(form, new
 CompoundPropertyModelHomePage(this)) {
private static final long serialVersionUID = 1L;
@Override public void onSubmit() {
++count;
}
};
add(form);// WARNING HERE
form.add(new TextFieldHomePage(hi).setRequired(true));
// WARNING HERE
add(new LabelHomePage(hihi, new
   PropertyModelHomePage(this,
 hello)));
}
   
public String getHello() {
return hi + : you say hello  + count +  times.;
}
 }
   
  
  
  
   --
   Resizable and reorderable grid components.
   http://www.inmethod.com
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  

  --
  View this message in context:
 http://www.nabble.com/Migrating-to-1.4-SNAPSHOT%3A-how-to-rid-of-generic-warnings--tp16622159p16622850.html
  Sent from the Wicket - User mailing list archive at Nabble.com.




  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Migrating-to-1.4-SNAPSHOT%3A-how-to-rid-of-generic-warnings--tp16622159p16623297.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]