How to Replace "Choose One" with Blank ("") in DropDown

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to Replace "Choose One" with Blank ("") in DropDown

eugenebalt
Please advise, I need to replace "Choose One" with a BLANK choice ("") in my dropdown.

I know I can either create some kind of properties file, or override something, but I'm not sure exactly what to do, step-by-step.

Could you give an exact, step-by-step instruction regarding what file to create, or what I have to do. The null choice must be blank, and it's available.

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: How to Replace "Choose One" with Blank ("") in DropDown

James Carman
https://cwiki.apache.org/WICKET/dropdownchoice.html
On Feb 2, 2011 5:47 PM, "eugenebalt" <[hidden email]> wrote:
>
> Please advise, I need to replace "Choose One" with a BLANK choice ("") in
my

> dropdown.
>
> I know I can either create some kind of properties file, or override
> something, but I'm not sure exactly what to do, step-by-step.
>
> Could you give an exact, step-by-step instruction regarding what file to
> create, or what I have to do. The null choice must be blank, and it's
> available.
>
> Thanks
> --
> View this message in context:
http://apache-wicket.1842946.n4.nabble.com/How-to-Replace-Choose-One-with-Blank-in-DropDown-tp3256149p3256149.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
Reply | Threaded
Open this post in threaded view
|

Re: How to Replace "Choose One" with Blank ("") in DropDown

eugenebalt
In reply to this post by eugenebalt
I have a Form and a DropDown on it, that's it. (There are no Panels or anything else.)
Reply | Threaded
Open this post in threaded view
|

Re: How to Replace "Choose One" with Blank ("") in DropDown

eugenebalt
In reply to this post by James Carman
Thank you but I don't understand that instruction!

Quote: "Create a .properties file for your subclass of form/panel and define the null key for the value you want. For example:"

A .properties file where?? in the same location as the Form.java? How will it be hooked up to the actual dropdown?

And this example doesn't apply to me:

mypanel.properties
formid.dropdownid.null=Choose One

I don't have a Panel. That's what I mean, the instructions need to be CLEAR because it's very hard to follow them. I tried creating some .properties file and didn't get anywhere.

Thanks again
Reply | Threaded
Open this post in threaded view
|

Re: How to Replace "Choose One" with Blank ("") in DropDown

eugenebalt
anyone, please?
I don't understand where to create the properties file, how to name it, and what to put in there.

My form name: Form1
My dropdown name: choice1

No panels. Where should the file be placed and how will it be found automatically?
Reply | Threaded
Open this post in threaded view
|

Re: How to Replace "Choose One" with Blank ("") in DropDown

James Carman
Well, I would urge you to look around at how to do
internationalization (no wonder folks usually just type i18n).  That
will show you how to set up properties files.  In your case, if you're
just dealing with a page and no panels, then just create a property
called MyPage.properties (assuming your page class is called MyPage)
and put it in the same package as your page class (make sure your IDE
will copy those resources into the classpath).  The key you want (I
believe) is:

Form1.choice1.null=Something Else



On Wed, Feb 2, 2011 at 6:36 PM, eugenebalt <[hidden email]> wrote:

>
> anyone, please?
> I don't understand where to create the properties file, how to name it, and
> what to put in there.
>
> My form name: Form1
> My dropdown name: choice1
>
> No panels. Where should the file be placed and how will it be found
> automatically?
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-Replace-Choose-One-with-Blank-in-DropDown-tp3256149p3256305.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to Replace "Choose One" with Blank ("") in DropDown

Ian Marshall
Hi James,

Thanks for the tip about

  Form1.choice1.null=Something Else

I was always wondering how to change that text but now I can do it.

Thanks again,

Ian