Re: Wicket dropdownchoice onselectionchanged must override or implement a supertype method

2012-04-26 Thread kshitiz
Thanks all for the reply, You were right...I did the change and it worked.
And also, SelectOption is not wicket one but a class created by me only:


package WalknShine;

import java.io.Serializable;

public class SelectOption implements Serializable{

/**
 * 
 */
private static final long serialVersionUID = 1L;
private int key;
  private String value;

  public SelectOption(int key, String value) {
this.key = key;
this.value = value;
  }
getters and setters...

}


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-dropdownchoice-onselectionchanged-must-override-or-implement-a-supertype-method-tp4584391p4590526.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket dropdownchoice onselectionchanged must override or implement a supertype method

2012-04-25 Thread Martin Grigorov
On Tue, Apr 24, 2012 at 9:22 PM, Sebastien  wrote:
> Right, should probably be something like:
> protected void onSelectionChanged(SelectOption newSelection) {};
>
> Also, note that SelectOption is generic...

I hope his SelectOption is not
org.apache.wicket.extensions.markup.html.form.select.SelectOption
because there is no much sense in that.

>
> Regards,
> Sebastien.
>
>
> On Tue, Apr 24, 2012 at 8:18 PM, Per Newgro  wrote:
>
>> it is because of the @override annotation on a non-existent method.
>> Check the signature of the
>>
>> onSelectionChanged
>>
>>
>> Cheers
>> Per
>>
>> Am 24.04.2012 20:04, schrieb kshitiz:
>>
>>  Hi,
>>>
>>> I am trying to implement wicket drop down choice with on selection changed
>>> feature. But as I write :
>>>
>>> final DropDownChoice  postCategoriesDropDown = new
>>> DropDownChoice("**postCategories", iModel,
>>> Arrays.asList(selectOption), choiceRenderer)
>>>            {
>>>                /**
>>>                         *
>>>                         */
>>>                        private static final long serialVersionUID = 1L;
>>>
>>>                        @Override
>>>                        protected boolean wantOnSelectionChangedNotifica**
>>> tions()
>>>                {
>>>                 return true;
>>>             }
>>>
>>>                        @Override
>>>                        protected void onSelectionChanged(final Object
>>> newSelection)
>>>                        {
>>>                                SelectOption selectOption = (SelectOption)
>>> newSelection;
>>>
>>>                        }
>>>
>>>                };
>>>
>>> eclipse shows an error:
>>>
>>> *The method onSelectionChanged(Object) of type new
>>> DropDownChoice()**{} must override or implement a supertype
>>> method*
>>>
>>> Can you please tell me what can be the reason?? I am following
>>> https://cwiki.apache.org/**WICKET/dropdownchoice-**examples.html<https://cwiki.apache.org/WICKET/dropdownchoice-examples.html>
>>> https://cwiki.apache.org/**WICKET/dropdownchoice-**examples.html<https://cwiki.apache.org/WICKET/dropdownchoice-examples.html>
>>>
>>> --
>>> View this message in context: http://apache-wicket.1842946.**
>>> n4.nabble.com/Wicket-**dropdownchoice-**onselectionchanged-must-**
>>> override-or-implement-a-**supertype-method-**tp4584391p4584391.html<http://apache-wicket.1842946.n4.nabble.com/Wicket-dropdownchoice-onselectionchanged-must-override-or-implement-a-supertype-method-tp4584391p4584391.html>
>>> Sent from the Users forum mailing list archive at Nabble.com.
>>>
>>> --**--**-
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@wicket.**apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>>
>> --**--**-
>> To unsubscribe, e-mail: 
>> users-unsubscribe@wicket.**apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Wicket dropdownchoice onselectionchanged must override or implement a supertype method

2012-04-24 Thread Sebastien
Right, should probably be something like:
protected void onSelectionChanged(SelectOption newSelection) {};

Also, note that SelectOption is generic...

Regards,
Sebastien.


On Tue, Apr 24, 2012 at 8:18 PM, Per Newgro  wrote:

> it is because of the @override annotation on a non-existent method.
> Check the signature of the
>
> onSelectionChanged
>
>
> Cheers
> Per
>
> Am 24.04.2012 20:04, schrieb kshitiz:
>
>  Hi,
>>
>> I am trying to implement wicket drop down choice with on selection changed
>> feature. But as I write :
>>
>> final DropDownChoice  postCategoriesDropDown = new
>> DropDownChoice("**postCategories", iModel,
>> Arrays.asList(selectOption), choiceRenderer)
>>{
>>/**
>> *
>> */
>>private static final long serialVersionUID = 1L;
>>
>>@Override
>>protected boolean wantOnSelectionChangedNotifica**
>> tions()
>>{
>> return true;
>> }
>>
>>@Override
>>protected void onSelectionChanged(final Object
>> newSelection)
>>{
>>SelectOption selectOption = (SelectOption)
>> newSelection;
>>
>>}
>>
>>};
>>
>> eclipse shows an error:
>>
>> *The method onSelectionChanged(Object) of type new
>> DropDownChoice()**{} must override or implement a supertype
>> method*
>>
>> Can you please tell me what can be the reason?? I am following
>> https://cwiki.apache.org/**WICKET/dropdownchoice-**examples.html<https://cwiki.apache.org/WICKET/dropdownchoice-examples.html>
>> https://cwiki.apache.org/**WICKET/dropdownchoice-**examples.html<https://cwiki.apache.org/WICKET/dropdownchoice-examples.html>
>>
>> --
>> View this message in context: http://apache-wicket.1842946.**
>> n4.nabble.com/Wicket-**dropdownchoice-**onselectionchanged-must-**
>> override-or-implement-a-**supertype-method-**tp4584391p4584391.html<http://apache-wicket.1842946.n4.nabble.com/Wicket-dropdownchoice-onselectionchanged-must-override-or-implement-a-supertype-method-tp4584391p4584391.html>
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> --**--**-
>> To unsubscribe, e-mail: 
>> users-unsubscribe@wicket.**apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket dropdownchoice onselectionchanged must override or implement a supertype method

2012-04-24 Thread Per Newgro

it is because of the @override annotation on a non-existent method.
Check the signature of the

onSelectionChanged


Cheers
Per

Am 24.04.2012 20:04, schrieb kshitiz:

Hi,

I am trying to implement wicket drop down choice with on selection changed
feature. But as I write :

final DropDownChoice  postCategoriesDropDown = new
DropDownChoice("postCategories", iModel,
Arrays.asList(selectOption), choiceRenderer)
{
/**
 *
 */
private static final long serialVersionUID = 1L;

@Override
protected boolean wantOnSelectionChangedNotifications()
{
 return true;
 }

@Override
protected void onSelectionChanged(final Object 
newSelection)
{
SelectOption selectOption = (SelectOption) 
newSelection;

}

};

eclipse shows an error:

*The method onSelectionChanged(Object) of type new
DropDownChoice(){} must override or implement a supertype
method*

Can you please tell me what can be the reason?? I am following
https://cwiki.apache.org/WICKET/dropdownchoice-examples.html
https://cwiki.apache.org/WICKET/dropdownchoice-examples.html

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-dropdownchoice-onselectionchanged-must-override-or-implement-a-supertype-method-tp4584391p4584391.html
Sent from the Users forum mailing list archive at Nabble.com.

-
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