RE: Replace Choose one from DropDownChoice?

2010-03-17 Thread Martin Asenov
Hi, David!

Let's presume your webapplication class is called WebApp.java. In the same 
directory where it is present, create WebApp.properties with the following line:

null=

that way every single 'choose one' label will be replaced with .

P.S. Don't forget to include the props files in the pom as a resource.

Best,
Martin

-Original Message-
From: David Chang [mailto:david_q_zh...@yahoo.com] 
Sent: Wednesday, March 17, 2010 3:03 PM
To: users@wicket.apache.org
Subject: Replace Choose one from DropDownChoice?


Hello, I understand that there must be a solution for this. I googled for some 
time and found one or two results that seem to match what I am looking but they 
did not answer my question. Tried myself, not successful. So I want to ask 
folks here. I have a form and it has a dropdown list. Here are my requirements:

1. Replace Choose one with a blank line

2. This blank line is the first option and it is always listed no matter 
whether a value is selected or not, no matter whether the form field of this 
dropdown list is required or not.

3. I am using ChoiceRenderer to convert between selection and objects.

4. This behavior is applicable to all DropDownChoice. 

How can meet these requirement?

Thanks for your help!

Regards.


  

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Replace Choose one from DropDownChoice?

2010-03-17 Thread Martin Makundi
It's just a localization property dropdownchoice-id.null or
dropdownchoice-id.nullValid if that's what you want to change?

**
Martin

2010/3/17 David Chang david_q_zh...@yahoo.com:

 Hello, I understand that there must be a solution for this. I googled for 
 some time and found one or two results that seem to match what I am looking 
 but they did not answer my question. Tried myself, not successful. So I want 
 to ask folks here. I have a form and it has a dropdown list. Here are my 
 requirements:

 1. Replace Choose one with a blank line

 2. This blank line is the first option and it is always listed no matter 
 whether a value is selected or not, no matter whether the form field of this 
 dropdown list is required or not.

 3. I am using ChoiceRenderer to convert between selection and objects.

 4. This behavior is applicable to all DropDownChoice.

 How can meet these requirement?

 Thanks for your help!

 Regards.




 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Replace Choose one from DropDownChoice?

2010-03-17 Thread David Chang
Martin,

Thanks so much for chiming in. I tried the 

null=

approach. The blank line in the dropdown list simply disappears. As I said in 
my requirements, I hope to have it there no matter whether a value is selected 
or not, no matter whether it is a required field or not.

Again, thanks for help!
Best,
David

--- On Wed, 3/17/10, Martin Asenov mase...@velti.com wrote:

 From: Martin Asenov mase...@velti.com
 Subject: RE: Replace Choose one from DropDownChoice?
 To: users@wicket.apache.org users@wicket.apache.org
 Date: Wednesday, March 17, 2010, 9:08 AM
 Hi, David!
 
 Let's presume your webapplication class is called
 WebApp.java. In the same directory where it is present,
 create WebApp.properties with the following line:
 
 null=
 
 that way every single 'choose one' label will be replaced
 with .
 
 P.S. Don't forget to include the props files in the pom as
 a resource.
 
 Best,
 Martin
 
 -Original Message-
 From: David Chang [mailto:david_q_zh...@yahoo.com]
 
 Sent: Wednesday, March 17, 2010 3:03 PM
 To: users@wicket.apache.org
 Subject: Replace Choose one from DropDownChoice?
 
 
 Hello, I understand that there must be a solution for this.
 I googled for some time and found one or two results that
 seem to match what I am looking but they did not answer my
 question. Tried myself, not successful. So I want to ask
 folks here. I have a form and it has a dropdown list. Here
 are my requirements:
 
 1. Replace Choose one with a blank line
 
 2. This blank line is the first option and it is always
 listed no matter whether a value is selected or not, no
 matter whether the form field of this dropdown list is
 required or not.
 
 3. I am using ChoiceRenderer to convert between selection
 and objects.
 
 4. This behavior is applicable to all DropDownChoice. 
 
 How can meet these requirement?
 
 Thanks for your help!
 
 Regards.
 
 
       
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Replace Choose one from DropDownChoice?

2010-03-17 Thread Martin Phee

You have to add a selection choice that is just a blank line option.

This is a typical requirement for any dropdown if you wan the use to  
be able to clear their choice.



On Mar 17, 2010, at 8:47 AM, David Chang wrote:


Martin,

Thanks so much for chiming in. I tried the

null=

approach. The blank line in the dropdown list simply disappears. As  
I said in my requirements, I hope to have it there no matter whether  
a value is selected or not, no matter whether it is a required field  
or not.


Again, thanks for help!
Best,
David

--- On Wed, 3/17/10, Martin Asenov mase...@velti.com wrote:



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Replace Choose one from DropDownChoice?

2010-03-17 Thread Martin Asenov
I don't understand , Chang...

If you want non selection to be  , then say

null=  (without the quotes)

Otherwise if you don't want null selection, you say 
component.setNullValid(false); and you're fine

Best,
Martin

-Original Message-
From: David Chang [mailto:david_q_zh...@yahoo.com] 
Sent: Wednesday, March 17, 2010 3:48 PM
To: users@wicket.apache.org
Subject: RE: Replace Choose one from DropDownChoice?

Martin,

Thanks so much for chiming in. I tried the 

null=

approach. The blank line in the dropdown list simply disappears. As I said in 
my requirements, I hope to have it there no matter whether a value is selected 
or not, no matter whether it is a required field or not.

Again, thanks for help!
Best,
David

--- On Wed, 3/17/10, Martin Asenov mase...@velti.com wrote:

 From: Martin Asenov mase...@velti.com
 Subject: RE: Replace Choose one from DropDownChoice?
 To: users@wicket.apache.org users@wicket.apache.org
 Date: Wednesday, March 17, 2010, 9:08 AM
 Hi, David!
 
 Let's presume your webapplication class is called
 WebApp.java. In the same directory where it is present,
 create WebApp.properties with the following line:
 
 null=
 
 that way every single 'choose one' label will be replaced
 with .
 
 P.S. Don't forget to include the props files in the pom as
 a resource.
 
 Best,
 Martin
 
 -Original Message-
 From: David Chang [mailto:david_q_zh...@yahoo.com]
 
 Sent: Wednesday, March 17, 2010 3:03 PM
 To: users@wicket.apache.org
 Subject: Replace Choose one from DropDownChoice?
 
 
 Hello, I understand that there must be a solution for this.
 I googled for some time and found one or two results that
 seem to match what I am looking but they did not answer my
 question. Tried myself, not successful. So I want to ask
 folks here. I have a form and it has a dropdown list. Here
 are my requirements:
 
 1. Replace Choose one with a blank line
 
 2. This blank line is the first option and it is always
 listed no matter whether a value is selected or not, no
 matter whether the form field of this dropdown list is
 required or not.
 
 3. I am using ChoiceRenderer to convert between selection
 and objects.
 
 4. This behavior is applicable to all DropDownChoice. 
 
 How can meet these requirement?
 
 Thanks for your help!
 
 Regards.
 
 
       
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


  

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Replace Choose one from DropDownChoice?

2010-03-17 Thread David Chang
Martin, 

According to what you said, do I need to add special processing in 
ChoiceRenderer if this blank line is the selected and I need to convert 
selected value to object?

Thanks,
David

--- On Wed, 3/17/10, Martin Phee mp...@objectivearts.com wrote:

 From: Martin Phee mp...@objectivearts.com
 Subject: Re: Replace Choose one from DropDownChoice?
 To: users@wicket.apache.org
 Date: Wednesday, March 17, 2010, 10:05 AM
 You have to add a selection choice
 that is just a blank line option.
 
 This is a typical requirement for any dropdown if you wan
 the use to be able to clear their choice.
 
 
 On Mar 17, 2010, at 8:47 AM, David Chang wrote:
 
  Martin,
  
  Thanks so much for chiming in. I tried the
  
  null=
  
  approach. The blank line in the dropdown list simply
 disappears. As I said in my requirements, I hope to have it
 there no matter whether a value is selected or not, no
 matter whether it is a required field or not.
  
  Again, thanks for help!
  Best,
  David
  
  --- On Wed, 3/17/10, Martin Asenov mase...@velti.com
 wrote:
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


  

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Replace Choose one from DropDownChoice?

2010-03-17 Thread Martin Asenov
David, please describe the use case in more depths.

1)
You want a dropdownchoice with null selection, which is  ?

2)
You don't want a null selection to be there at all, but show the first element.

Best,
Martin

-Original Message-
From: David Chang [mailto:david_q_zh...@yahoo.com] 
Sent: Wednesday, March 17, 2010 4:31 PM
To: users@wicket.apache.org
Subject: Re: Replace Choose one from DropDownChoice?

Martin, 

According to what you said, do I need to add special processing in 
ChoiceRenderer if this blank line is the selected and I need to convert 
selected value to object?

Thanks,
David

--- On Wed, 3/17/10, Martin Phee mp...@objectivearts.com wrote:

 From: Martin Phee mp...@objectivearts.com
 Subject: Re: Replace Choose one from DropDownChoice?
 To: users@wicket.apache.org
 Date: Wednesday, March 17, 2010, 10:05 AM
 You have to add a selection choice
 that is just a blank line option.
 
 This is a typical requirement for any dropdown if you wan
 the use to be able to clear their choice.
 
 
 On Mar 17, 2010, at 8:47 AM, David Chang wrote:
 
  Martin,
  
  Thanks so much for chiming in. I tried the
  
  null=
  
  approach. The blank line in the dropdown list simply
 disappears. As I said in my requirements, I hope to have it
 there no matter whether a value is selected or not, no
 matter whether it is a required field or not.
  
  Again, thanks for help!
  Best,
  David
  
  --- On Wed, 3/17/10, Martin Asenov mase...@velti.com
 wrote:
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


  

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Replace Choose one from DropDownChoice?

2010-03-17 Thread David Chang
Martin,

Very sorry for being confusing to you. Here is what I want:

I want blank line is always there, no matter whether a value is selected or 
not, no matter whether the field is required or not.

I am using ChoiceRenderer to convert a selected option to objects.

Thanks, David



--- On Wed, 3/17/10, Martin Asenov mase...@velti.com wrote:

 From: Martin Asenov mase...@velti.com
 Subject: RE: Replace Choose one from DropDownChoice?
 To: users@wicket.apache.org users@wicket.apache.org
 Date: Wednesday, March 17, 2010, 10:34 AM
 David, please describe the use case
 in more depths.
 
 1)
 You want a dropdownchoice with null selection, which is 
 ?
 
 2)
 You don't want a null selection to be there at all, but
 show the first element.
 
 Best,
 Martin
 
 -Original Message-
 From: David Chang [mailto:david_q_zh...@yahoo.com]
 
 Sent: Wednesday, March 17, 2010 4:31 PM
 To: users@wicket.apache.org
 Subject: Re: Replace Choose one from DropDownChoice?
 
 Martin, 
 
 According to what you said, do I need to add special
 processing in ChoiceRenderer if this blank line is the
 selected and I need to convert selected value to object?
 
 Thanks,
 David
 
 --- On Wed, 3/17/10, Martin Phee mp...@objectivearts.com
 wrote:
 
  From: Martin Phee mp...@objectivearts.com
  Subject: Re: Replace Choose one from
 DropDownChoice?
  To: users@wicket.apache.org
  Date: Wednesday, March 17, 2010, 10:05 AM
  You have to add a selection choice
  that is just a blank line option.
  
  This is a typical requirement for any dropdown if you
 wan
  the use to be able to clear their choice.
  
  
  On Mar 17, 2010, at 8:47 AM, David Chang wrote:
  
   Martin,
   
   Thanks so much for chiming in. I tried the
   
   null=
   
   approach. The blank line in the dropdown list
 simply
  disappears. As I said in my requirements, I hope to
 have it
  there no matter whether a value is selected or not,
 no
  matter whether it is a required field or not.
   
   Again, thanks for help!
   Best,
   David
   
   --- On Wed, 3/17/10, Martin Asenov mase...@velti.com
  wrote:
  
  
 
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 
 
       
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org