[Wicket-user] Is this a bug? Please help.

2005-11-03 Thread blackboy zabaha
To all,

I have some problem with wicket, I'm newbie.

Condition

- A form with a CompoundPropertyModel
- 2 RequiredTextField
- 1 FileUploadField
- 1 TextArea with a CustomValidator

when I input string value with comma (,) in either or bothrequiredTextField with an invalid value of textArea field, the value of requiredTextField will always replace all comma with ;

(Note : other thing work fine, CustomValidator work right, just this replaceAll-likebehavior!)

but if form pass my CustomValidator, nothing wrong.

Below are some important part of codes.

### My Form ###

public SubscriberGroupForm(String id, SubscriberGroup model) { super(id, new CompoundPropertyModel(model));  setMultiPart(true); setMaxSize(Bytes.megabytes(10));  add(new RequiredTextField("name")); add(new RequiredTextField("description"));  countLabel = new Label("count", new PropertyModel(model, "count")); countLabel.setVisible(false); add(countLabel);  fileUploadField = new
 FileUploadField("file"); add(fileUploadField); add(new TextArea("numbers").add(NumberValidator.getInstance())); // --- My CustomValidator.  add(new Button("submitButton"));  final FeedbackPanel simpleFeedback = new FeedbackPanel("simpleFeedback"); add(simpleFeedback); }



### My CustomValidator ###

public void onValidate(wicket.markup.html.form.FormComponent formComponent, String value) { if(value == null) { return; } else {
 for(StringTokenizer tokenizer = new StringTokenizer(value, ","); tokenizer.hasMoreTokens(); ) { String number = tokenizer.nextToken();
 if(!ValidatorUtil.isValidNumber(number)) {
 error(formComponent); break; } }
 } }

### My Model ###

public class SubscriberGroup implements Serializable {  private String name; private String description; private String file; private String numbers; private int count; private Date expireDate;

// just many setter  getter methods here ..
 // ...}

and some otherquestion, can'tfile (or file's name)be populate into my model when submitted? like other textField (now I just write it to somewhere and custom set it's location to my modelwith model.setFile(myFilePath)).

BR,
black
		 Yahoo! FareChase - Search multiple travel sites in one click.

 

 

Re: [Wicket-user] Is this a bug? Please help.

2005-11-03 Thread Johan Compagner
What are you saying exactly?
Are you saying that you input a value with a , in a textfield in youre browser
and that , will be replaced with ; when you read it in at the serverside?

Or are you saying that the model value does have a , in the string and it is displayed as a ; in the browser?

johan


On 11/3/05, blackboy zabaha [EMAIL PROTECTED] wrote:
To all,

I have some problem with wicket, I'm newbie.

Condition

- A form with a CompoundPropertyModel
- 2 RequiredTextField
- 1 FileUploadField
- 1 TextArea with a CustomValidator

when I input string value with comma (,) in either or
bothrequiredTextField with an invalid value of textArea field,
the value of requiredTextField will always replace all comma with ;

(Note : other thing work fine, CustomValidator work right, just this replaceAll-likebehavior!)

but if form pass my CustomValidator, nothing wrong.

Below are some important part of codes.

### My Form ###

public SubscriberGroupForm(String id, SubscriberGroup model) { super(id, new CompoundPropertyModel(model));  setMultiPart(true); setMaxSize(Bytes.megabytes(10)); 
 add(new RequiredTextField(name)); add(new RequiredTextField(description));  countLabel = new Label(count, new PropertyModel(model, count));
 countLabel.setVisible(false); add(countLabel);  fileUploadField = new
 FileUploadField(file); add(fileUploadField);
add(new TextArea(numbers).add(NumberValidator.getInstance())); //
--- My CustomValidator.  add(new Button(submitButton));  final FeedbackPanel simpleFeedback = new FeedbackPanel(simpleFeedback); add(simpleFeedback);
 }



### My CustomValidator ###

public void onValidate(wicket.markup.html.form.FormComponent formComponent, String value) { if(value == null) { return; } else {

for(StringTokenizer tokenizer = new StringTokenizer(value, ,);
tokenizer.hasMoreTokens(); ) {
String number = tokenizer.nextToken();
 if(!ValidatorUtil.isValidNumber(number)) {

error(formComponent); break; } }
 } }

### My Model ###

public class SubscriberGroup implements Serializable {  private String name; private String description; private String file; private String numbers; private int count; private Date expireDate;


// just many setter  getter methods here ..
 // ...}

and some otherquestion, can'tfile (or file's
name)be populate into my model when submitted? like other
textField (now I just write it to somewhere and custom set it's
location to my modelwith model.setFile(myFilePath)).

BR,
black
		 
Yahoo! FareChase - Search multiple travel sites in one click.

 

 



Re: [Wicket-user] Is this a bug? Please help.

2005-11-03 Thread blackboy zabaha
This occure on browser, the value of textfield changed when form is invalid and return.

I just found that this is not problem with customValidator, but with RequiedTextField with multipart form (I'm not sure this will ocurred with only requiedValidator or other validator else, and also withany other charactors).

My newtesting to find out thereal problem'scauseis just modifying the UploadPage.java, UploadPage.html, UploadPage.properties in package wicket.examples.upload, which porvided with wicket-example.

### UploadPage.java ###
// just add 2 required textfield in private inner class UploadPage.FileUploadForm
add(new RequiredTextField("t1"));add(new RequiredTextField("t2"));

### UploadPage.html ###
!-- add these lines into "simpleUpload" form --
input type="text" wicket:id="t1"/
input type="text" wicket:id="t2"/


### UploadPage.properties ###
# add these lines
simpleUpload.t1.RequiredValidator=t1 required.simpleUpload.t2.RequiredValidator=t2 required.

run example goto upload example
then input "a,b,c,d," (or indeed any String with comma) into t1 textfield,
let t2 be blank so form is invalid, do not have to load any file.

submit and then see value in t1 textfield.

I think u will see "a;b;c;d" (just notice that last comma(s) also lost).

Is this show that it's really a bug or I do it a wrong way, (indeed I just don't want to be a bug-reporter, I just want the way to solve my problem),plz suggest me how to solve this problem, too.
I need help as soon as posible.

BR,
black

Johan Compagner [EMAIL PROTECTED] wrote:
What are you saying exactly?Are you saying that you input a value with a , in a textfield in youre browserand that , will be replaced with ; when you read it in at the serverside?Or are you saying that the model value does have a , in the string and it is displayed as a ; in the browser?johan
On 11/3/05, blackboy zabaha [EMAIL PROTECTED] wrote:

To all,

I have some problem with wicket, I'm newbie.

Condition

- A form with a CompoundPropertyModel
- 2 RequiredTextField
- 1 FileUploadField
- 1 TextArea with a CustomValidator

when I input string value with comma (,) in either or bothrequiredTextField with an invalid value of textArea field, the value of requiredTextField will always replace all comma with ;

(Note : other thing work fine, CustomValidator work right, just this replaceAll-likebehavior!)

but if form pass my CustomValidator, nothing wrong.

Below are some important part of codes.

### My Form ###

public SubscriberGroupForm(String id, SubscriberGroup model) { super(id, new CompoundPropertyModel(model));  setMultiPart(true); setMaxSize(Bytes.megabytes(10));  add(new RequiredTextField("name")); add(new RequiredTextField("description"));  countLabel = new Label("count", new PropertyModel(model, "count"));  countLabel.setVisible(false); add(countLabel);  fileUploadField = new
 FileUploadField("file"); add(fileUploadField); add(new TextArea("numbers").add(NumberValidator.getInstance())); // --- My CustomValidator.  add(new Button("submitButton"));  final FeedbackPanel simpleFeedback = new FeedbackPanel("simpleFeedback"); add(simpleFeedback);  }



### My CustomValidator ###

public void onValidate(wicket.markup.html.form.FormComponent formComponent, String value) { if(value == null) { return; } else {
 for(StringTokenizer tokenizer = new StringTokenizer(value, ","); tokenizer.hasMoreTokens(); ) { String number = tokenizer.nextToken();
 if(!ValidatorUtil.isValidNumber(number)) {
 error(formComponent); break; } }
 } }

### My Model ###

public class SubscriberGroup implements Serializable {  private String name; private String description; private String file; private String numbers; private int count; private Date expireDate; 

// just many setter  getter methods here ..
 // ...}

and some otherquestion, can'tfile (or file's name)be populate into my model when submitted? like other textField (now I just write it to somewhere and custom set it's location to my modelwith model.setFile(myFilePath)).

BR,
black


Yahoo! FareChase - Search multiple travel sites in one click. 

		 Yahoo! FareChase - Search multiple travel sites in one click.

 

 

Re: [Wicket-user] Is this a bug? Please help.

2005-11-03 Thread Johan Compagner
can you make a bug report for this with a copy of the mail below?
On 11/3/05, blackboy zabaha [EMAIL PROTECTED] wrote:
This occure on browser, the value of textfield changed when form is invalid and return.

I just found that this is not problem with customValidator, but
with RequiedTextField with multipart form (I'm not sure this will
ocurred with only requiedValidator or other validator else, and also
withany other charactors).

My newtesting to find out thereal
problem'scauseis just modifying the UploadPage.java,
UploadPage.html, UploadPage.properties in package
wicket.examples.upload, which porvided with wicket-example.

### UploadPage.java ###
// just add 2 required textfield in private inner class UploadPage.FileUploadForm
add(new RequiredTextField(t1));add(new RequiredTextField(t2));

### UploadPage.html ###
!-- add these lines into simpleUpload form --
input type=text wicket:id=t1/
input type=text wicket:id=t2/


### UploadPage.properties ###
# add these lines
simpleUpload.t1.RequiredValidator=t1 required.simpleUpload.t2.RequiredValidator=t2 required.

run example goto upload example
then input a,b,c,d, (or indeed any String with comma) into t1 textfield,
let t2 be blank so form is invalid, do not have to load any file.

submit and then see value in t1 textfield.

I think u will see a;b;c;d (just notice that last comma(s) also lost).

Is this show that it's really a bug or I do it a wrong way,
(indeed I just don't want to be a bug-reporter, I just want the way to
solve my problem),plz suggest me how to solve this problem, too.
I need help as soon as posible.

BR,
black

Johan Compagner [EMAIL PROTECTED] wrote:
What are you saying exactly?Are you saying that you input a value with a , in a textfield in youre browserand that , will be replaced with ; when you read it in at the serverside?
Or are you saying that the model value does have a , in the string and it is displayed as a ; in the browser?johan
On 11/3/05, blackboy zabaha [EMAIL PROTECTED]
 wrote:

To all,

I have some problem with wicket, I'm newbie.

Condition

- A form with a CompoundPropertyModel
- 2 RequiredTextField
- 1 FileUploadField
- 1 TextArea with a CustomValidator

when I input string value with comma (,) in either or
bothrequiredTextField with an invalid value of textArea field,
the value of requiredTextField will always replace all comma with ;

(Note : other thing work fine, CustomValidator work right, just this replaceAll-likebehavior!)

but if form pass my CustomValidator, nothing wrong.

Below are some important part of codes.

### My Form ###

public SubscriberGroupForm(String id, SubscriberGroup model) { super(id, new CompoundPropertyModel(model));  setMultiPart(true); setMaxSize(Bytes.megabytes(10)); 
 add(new RequiredTextField(name)); add(new RequiredTextField(description));  countLabel = new Label(count, new PropertyModel(model, count)); 
 countLabel.setVisible(false); add(countLabel);  fileUploadField = new
 FileUploadField(file); add(fileUploadField);
add(new TextArea(numbers).add(NumberValidator.getInstance())); //
--- My CustomValidator.  add(new Button(submitButton));  final FeedbackPanel simpleFeedback = new FeedbackPanel(simpleFeedback); add(simpleFeedback); 
 }



### My CustomValidator ###

public void onValidate(wicket.markup.html.form.FormComponent formComponent, String value) { if(value == null) { return; } else {

for(StringTokenizer tokenizer = new StringTokenizer(value, ,);
tokenizer.hasMoreTokens(); ) {
String number = tokenizer.nextToken();
 if(!ValidatorUtil.isValidNumber(number)) {

error(formComponent); break; } }
 } }

### My Model ###

public class SubscriberGroup implements Serializable {  private String name; private String description; private String file; private String numbers; private int count; private Date expireDate; 


// just many setter  getter methods here ..
 // ...}

and some otherquestion, can'tfile (or file's
name)be populate into my model when submitted? like other
textField (now I just write it to somewhere and custom set it's
location to my modelwithmodel.setFile(myFilePath)). 

BR,
black



Yahoo! FareChase - Search multiple travel sites in one click. 

		 
Yahoo! FareChase - Search multiple travel sites in one click.

 

 



Re: [Wicket-user] Is this a bug? Please help.

2005-11-03 Thread blackboy zabaha
Sorry, How to make a bug report? I'm so new and never subscribe to any mail-list before.

BR,
blackJohan Compagner [EMAIL PROTECTED] wrote:
can you make a bug report for this with a copy of the mail below?
On 11/3/05, blackboy zabaha [EMAIL PROTECTED] wrote:

This occure on browser, the value of textfield changed when form is invalid and return.

I just found that this is not problem with customValidator, but with RequiedTextField with multipart form (I'm not sure this will ocurred with only requiedValidator or other validator else, and also withany other charactors).

My newtesting to find out thereal problem'scauseis just modifying the UploadPage.java, UploadPage.html, UploadPage.properties in package wicket.examples.upload, which porvided with wicket-example.

### UploadPage.java ###
// just add 2 required textfield in private inner class UploadPage.FileUploadForm
add(new RequiredTextField("t1"));add(new RequiredTextField("t2"));

### UploadPage.html ###
!-- add these lines into "simpleUpload" form --
input type="text" wicket:id="t1"/
input type="text" wicket:id="t2"/


### UploadPage.properties ###
# add these lines
simpleUpload.t1.RequiredValidator=t1 required.simpleUpload.t2.RequiredValidator=t2 required.

run example goto upload example
then input "a,b,c,d," (or indeed any String with comma) into t1 textfield,
let t2 be blank so form is invalid, do not have to load any file.

submit and then see value in t1 textfield.

I think u will see "a;b;c;d" (just notice that last comma(s) also lost).

Is this show that it's really a bug or I do it a wrong way, (indeed I just don't want to be a bug-reporter, I just want the way to solve my problem),plz suggest me how to solve this problem, too.
I need help as soon as posible.

BR,
black


Johan Compagner [EMAIL PROTECTED] wrote:
What are you saying exactly?Are you saying that you input a value with a , in a textfield in youre browserand that , will be replaced with ; when you read it in at the serverside? Or are you saying that the model value does have a , in the string and it is displayed as a ; in the browser?johan
On 11/3/05, blackboy zabaha [EMAIL PROTECTED]  wrote: 

To all,

I have some problem with wicket, I'm newbie.

Condition

- A form with a CompoundPropertyModel
- 2 RequiredTextField
- 1 FileUploadField
- 1 TextArea with a CustomValidator

when I input string value with comma (,) in either or bothrequiredTextField with an invalid value of textArea field, the value of requiredTextField will always replace all comma with ;

(Note : other thing work fine, CustomValidator work right, just this replaceAll-likebehavior!)

but if form pass my CustomValidator, nothing wrong.

Below are some important part of codes.

### My Form ###

public SubscriberGroupForm(String id, SubscriberGroup model) { super(id, new CompoundPropertyModel(model));  setMultiPart(true); setMaxSize(Bytes.megabytes(10));  add(new RequiredTextField("name")); add(new RequiredTextField("description"));  countLabel = new Label("count", new PropertyModel(model, "count"));  countLabel.setVisible(false); add(countLabel);  fileUploadField = new
 FileUploadField("file"); add(fileUploadField); add(new TextArea("numbers").add(NumberValidator.getInstance())); // --- My CustomValidator.  add(new Button("submitButton"));  final FeedbackPanel simpleFeedback = new FeedbackPanel("simpleFeedback"); add(simpleFeedback);  }



### My CustomValidator ###

public void onValidate(wicket.markup.html.form.FormComponent formComponent, String value) { if(value == null) { return; } else {
 for(StringTokenizer tokenizer = new StringTokenizer(value, ","); tokenizer.hasMoreTokens(); ) { String number = tokenizer.nextToken();
 if(!ValidatorUtil.isValidNumber(number)) {
 error(formComponent); break; } }
 } }

### My Model ###

public class SubscriberGroup implements Serializable {  private String name; private String description; private String file; private String numbers; private int count; private Date expireDate; 

// just many setter  getter methods here ..
 // ...}

and some otherquestion, can'tfile (or file's name)be populate into my model when submitted? like other textField (now I just write it to somewhere and custom set it's location to my modelwithmodel.setFile(myFilePath)). 

BR,
black


Yahoo! FareChase - Search multiple travel sites in one click. 



Yahoo! FareChase - Search multiple travel sites in one click. 

		 Yahoo! FareChase - Search multiple travel sites in one click.

 

 

Re: [Wicket-user] Is this a bug? Please help.

2005-11-03 Thread Johan Compagner
you can report bugs here:

http://sourceforge.net/tracker/?group_id=119783atid=684975On 11/3/05, 
blackboy zabaha [EMAIL PROTECTED] wrote:
Sorry, How to make a bug report? I'm so new and never subscribe to any mail-list before.

BR,
blackJohan Compagner [EMAIL PROTECTED] wrote:
can you make a bug report for this with a copy of the mail below?
On 11/3/05, blackboy zabaha [EMAIL PROTECTED]
 wrote:

This occure on browser, the value of textfield changed when form is invalid and return.

I just found that this is not problem with customValidator, but
with RequiedTextField with multipart form (I'm not sure this will
ocurred with only requiedValidator or other validator else, and also
withany other charactors).

My newtesting to find out thereal
problem'scauseis just modifying the UploadPage.java,
UploadPage.html, UploadPage.properties in package
wicket.examples.upload, which porvided with wicket-example.

### UploadPage.java ###
// just add 2 required textfield in private inner class UploadPage.FileUploadForm
add(new RequiredTextField(t1));add(new RequiredTextField(t2));

### UploadPage.html ###
!-- add these lines into simpleUpload form --
input type=text wicket:id=t1/
input type=text wicket:id=t2/


### UploadPage.properties ###
# add these lines
simpleUpload.t1.RequiredValidator=t1 required.simpleUpload.t2.RequiredValidator=t2 required.

run example goto upload example
then input a,b,c,d, (or indeed any String with comma) into t1 textfield,
let t2 be blank so form is invalid, do not have to load any file.

submit and then see value in t1 textfield.

I think u will see a;b;c;d (just notice that last comma(s) also lost).

Is this show that it's really a bug or I do it a wrong way,
(indeed I just don't want to be a bug-reporter, I just want the way to
solve my problem),plz suggest me how to solve this problem, too.
I need help as soon as posible.

BR,
black


Johan Compagner [EMAIL PROTECTED] wrote:
What are you saying exactly?Are you saying that you input a value with a , in a textfield in youre browserand that , will be replaced with ; when you read it in at the serverside? 
Or are you saying that the model value does have a , in the string and it is displayed as a ; in the browser?johan
On 11/3/05, blackboy zabaha [EMAIL PROTECTED] 
 wrote: 

To all,

I have some problem with wicket, I'm newbie.

Condition

- A form with a CompoundPropertyModel
- 2 RequiredTextField
- 1 FileUploadField
- 1 TextArea with a CustomValidator

when I input string value with comma (,) in either or
bothrequiredTextField with an invalid value of textArea field,
the value of requiredTextField will always replace all comma with ;

(Note : other thing work fine, CustomValidator work right, just this replaceAll-likebehavior!)

but if form pass my CustomValidator, nothing wrong.

Below are some important part of codes.

### My Form ###

public SubscriberGroupForm(String id, SubscriberGroup model) { super(id, new CompoundPropertyModel(model));  setMultiPart(true); setMaxSize(Bytes.megabytes(10)); 
 add(new RequiredTextField(name)); add(new RequiredTextField(description));  countLabel = new Label(count, new PropertyModel(model, count)); 
 countLabel.setVisible(false); add(countLabel);  fileUploadField = new
 FileUploadField(file); add(fileUploadField);
add(new TextArea(numbers).add(NumberValidator.getInstance())); //
--- My CustomValidator.  add(new Button(submitButton));  final FeedbackPanel simpleFeedback = new FeedbackPanel(simpleFeedback); add(simpleFeedback); 
 }



### My CustomValidator ###

public void onValidate(wicket.markup.html.form.FormComponent formComponent, String value) { if(value == null) { return; } else {

for(StringTokenizer tokenizer = new StringTokenizer(value, ,);
tokenizer.hasMoreTokens(); ) {
String number = tokenizer.nextToken();
 if(!ValidatorUtil.isValidNumber(number)) {

error(formComponent); break; } }
 } }

### My Model ###

public class SubscriberGroup implements Serializable {  private String name; private String description; private String file; private String numbers; private int count; private Date expireDate; 


// just many setter  getter methods here ..
 // ...}

and some otherquestion, can'tfile (or file's
name)be populate into my model when submitted? like other
textField (now I just write it to somewhere and custom set it's
location to my modelwithmodel.setFile(myFilePath)). 

BR,
black



Yahoo! FareChase - Search multiple travel sites in one click. 




Yahoo! FareChase - Search multiple travel sites in one click. 

		 
Yahoo! FareChase - Search multiple travel sites in one click.

 

 



Re: [Wicket-user] Is this a bug? Please help.

2005-11-03 Thread Eelco Hillenius
I just created it for you:
https://sourceforge.net/tracker/index.php?func=detailaid=1347328group_id=119783atid=684975

Eelco


On 11/3/05, Johan Compagner [EMAIL PROTECTED] wrote:
 you can report bugs here:

 http://sourceforge.net/tracker/?group_id=119783atid=684975


 On 11/3/05, blackboy zabaha [EMAIL PROTECTED] wrote:
 
  Sorry, How to make a bug report? I'm so new and never subscribe to any
 mail-list before.
 
 
  BR,
  black
 
  Johan Compagner [EMAIL PROTECTED] wrote:
  can you make a bug report for this with a copy of the mail below?
 
 
 
  On 11/3/05, blackboy zabaha [EMAIL PROTECTED]  wrote:
  
   This occure on browser, the value of textfield changed when form is
 invalid and return.
  
   I just found that this is not problem with customValidator, but with
 RequiedTextField with multipart form (I'm not sure this will ocurred with
 only requiedValidator or other validator else, and also with any other
 charactors).
  
   My new testing to find out the real problem's cause is just modifying
 the UploadPage.java, UploadPage.html, UploadPage.properties in package
 wicket.examples.upload, which porvided with wicket-example.
  
   ### UploadPage.java ###
   // just add 2 required textfield in private inner class
 UploadPage.FileUploadForm
   add(new RequiredTextField(t1));
   add(new RequiredTextField(t2));
  
   ### UploadPage.html ###
   !-- add these lines into simpleUpload form --
   input type=text wicket:id=t1/
   input type=text wicket:id=t2/
  
  
   ### UploadPage.properties ###
   # add these lines
   simpleUpload.t1.RequiredValidator=t1 required.
   simpleUpload.t2.RequiredValidator=t2 required.
  
   run example goto upload example
   then input a,b,c,d, (or indeed any String with comma) into t1
 textfield,
   let t2 be blank so form is invalid, do not have to load any file.
  
   submit and then see value in t1 textfield.
  
   I think u will see a;b;c;d (just notice that last comma(s) also lost).
  
   Is this show that it's really a bug or I do it a wrong way, (indeed I
 just don't want to be a bug-reporter, I just want the way to solve my
 problem), plz suggest me how to solve this problem, too.
   I need help as soon as posible.
  
   BR,
   black
  
  
  
  
   Johan Compagner [EMAIL PROTECTED] wrote:
   What are you saying exactly?
   Are you saying that you input a value with a , in a textfield in youre
 browser
   and that , will be replaced with ;  when you read it in at the
 serverside?
  
   Or are you saying that the model value does have a , in the string and
 it is displayed as a  ; in the browser?
  
   johan
  
  
  
  
  
   On 11/3/05, blackboy zabaha [EMAIL PROTECTED]  wrote:
   
To all,
   
I have some problem with wicket, I'm newbie.
   
Condition
   
- A form with a CompoundPropertyModel
- 2 RequiredTextField
- 1 FileUploadField
- 1 TextArea with a CustomValidator
   
when I input string value with comma (,) in either or both
 requiredTextField with an invalid value of textArea field, the value of
 requiredTextField will always replace all comma with ;
   
(Note : other thing work fine, CustomValidator work right, just this
 replaceAll-like behavior!)
   
but if form pass my CustomValidator, nothing wrong.
   
Below are some important part of codes.
   
### My Form ###
   
public SubscriberGroupForm(String id, SubscriberGroup model) {
super(id, new CompoundPropertyModel(model));
   
setMultiPart(true);
setMaxSize(Bytes.megabytes(10));
   
add(new RequiredTextField(name));
add(new RequiredTextField(description));
   
countLabel = new Label(count, new PropertyModel(model,
 count));
countLabel.setVisible(false);
add(countLabel);
   
fileUploadField = new FileUploadField(file);
add(fileUploadField);
add(new
 TextArea(numbers).add(NumberValidator.getInstance())); // --- My
 CustomValidator.
   
add(new Button(submitButton));
   
final FeedbackPanel simpleFeedback = new
 FeedbackPanel(simpleFeedback);
add(simpleFeedback);
}
   
   
   
### My CustomValidator ###
   
public void
 onValidate(wicket.markup.html.form.FormComponent
 formComponent, String value) {
if(value == null) {
return;
} else {
for(StringTokenizer tokenizer = new StringTokenizer(value,
 ,); tokenizer.hasMoreTokens(); ) {
String number = tokenizer.nextToken();
   
 if(!ValidatorUtil.isValidNumber(number)) {
error(formComponent);
break;
}
}
}
}
   
### My Model ###
   
public class SubscriberGroup implements Serializable {
   
private String name;
private String description;
private String file;
private String numbers;
private int count;