Johan Compagner wrote:
> This is wrong.
>
> This is mentioned before on the list: The model object that is the
> selected object
> should be the same kind of object that is in the choices (the list)
>
> that is just a one-one mapping.
>
> so if your list is:
> final static List OPTIONS = Arrays
This is wrong.This is mentioned before on the list: The model object that is the selected objectshould be the same kind of object that is in the choices (the list)that is just a one-one mapping.
so if your list is: final static List OPTIONS = Arrays.asList(new String[] {"Opt1", "Opt2", "Opt3"});th
How about...
add(new DropDownChoice(
"options2",
new Model(getDefaultSelection(getMyOptionValue())),
OPTIONS) {
protected String getDefaultChoice( final Object selected ) {
return ""; // remove "Choose One" prompt
Gwyn Evans wrote:
> What does "c.getMyOptionValue()" return?
>
> This...
> public HomePage() {
> add(new DropDownChoice(
> "options",
> new Model(getMyOptionValue()),
> OPTIONS)
> {
> protected String getDefaultChoice(
What does "c.getMyOptionValue()" return?
This...
public HomePage() {
add(new DropDownChoice(
"options",
new Model(getMyOptionValue()),
OPTIONS)
{
protected String getDefaultChoice(final Object selected) {
what you do seems like it should work.so maybe what you can do is download wicket-quickstart project, add the minimum amount of your code to it to reproduce the problem and attach it to the email. that way whoever wants to help you can download the project and run it in the ide and see the problem
Igor Vaynberg wrote:
> can we see a quickstart?
>
> -Igor
>
I'm sorry but I don't understand what you mean.
(maybe that's because I'm new to java :)
- posto
-
Take Surveys. Earn Cash. Influence the Future of IT
Join Sourc
can we see a quickstart?-IgorOn 9/21/06, Dumitru Postoronca <[EMAIL PROTECTED]
> wrote:Hello everyone, I want to create an edit form and I'm trying to set the selected item
of a DropDownChoice to match what I have in the database.The form constructor looks like this:-public ClientEditPage(Cli
Hello everyone,
I want to create an edit form and I'm trying to set the selected item
of a DropDownChoice to match what I have in the database.
The form constructor looks like this:
-
public ClientEditPage(Client c) {...}
-
The code that sets the form looks like this:
-
final st