Re: Drop Down Choice default value

2015-05-17 Thread Chris
Hi,

when using a drop down as follows, always the whole page is reloaded on drop 
down change.

How is it possible to update only a specific component via ajax?

Thanks,
Chris



DropDownChoice tag = new DropDownChoiceString(tags, new 
PropertyModelString(this, selectedCategory), displayCategories) {

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

@Override
protected void onSelectionChanged(String newSelection) {
super.onSelectionChanged(newSelection);
selectedCategory = newSelection;

}


@Override
protected String getNullValidDisplayValue() {
return All;
}

};


tag.add(new AjaxFormComponentUpdatingBehavior(onchange) {
   private static final long serialVersionUID = 1L;
  @Override
  protected void onUpdate(AjaxRequestTarget target) {
   target.add(...);
   }
});



 Am 12.05.2015 um 23:49 schrieb Chris chris...@gmx.at:
 
 Marcel, Sven,
 
 thanks a lot for your answers!
 Chris
 
 
 Am 12.05.2015 um 15:24 schrieb Marcel Barbosa Pinto marcel.po...@gmail.com:
 
 Another way is to provide a value on your .properties file.
 
 For instance:
 
 nullValid=Please choose
 myFieldId.nullValid=Please choose a value for ${label}
 
 On Tue, May 12, 2015 at 8:26 AM, Sven Meier s...@meiers.net wrote:
 
 Hi,
 
 you have to override #getNullValidDisplayValue(),
 #getNullKeyDisplayValue() is for cases where null is *not* valid.
 
 Regards
 Sven
 
 
 
 On 12.05.2015 12:44, Chris wrote:
 
 Hi all,
 
 I have a Drop down choice field and would like to override the default
 select value.
 
 I have made following settings but the default value is empty. Is there
 sth missing?
 
 setNullValid(true);
 @Override
 protected String getNullKeyDisplayValue() {
return Please choose;
 }
 Thanks, Chris
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -- 
 
 Marcel Barbosa Pinto
 55 11 98255 8288
 
 
 -
 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: Drop Down Choice default value

2015-05-17 Thread Tobias Soloschenko
Hi,

see

http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/AjaxEventBehavior.html

use change event.

kind regards

Tobias

 Am 18.05.2015 um 00:03 schrieb Chris chris...@gmx.at:
 
 Hi,
 
 when using a drop down as follows, always the whole page is reloaded on drop 
 down change.
 
 How is it possible to update only a specific component via ajax?
 
 Thanks,
 Chris
 
 
 
 DropDownChoice tag = new DropDownChoiceString(tags, new 
 PropertyModelString(this, selectedCategory), displayCategories) {
 
@Override
protected boolean wantOnSelectionChangedNotifications() {
return true;
}
 
@Override
protected void onSelectionChanged(String newSelection) {
super.onSelectionChanged(newSelection);
selectedCategory = newSelection;
 
}
 
 
@Override
protected String getNullValidDisplayValue() {
return All;
}
 
};
 
 
 tag.add(new AjaxFormComponentUpdatingBehavior(onchange) {
   private static final long serialVersionUID = 1L;
  @Override
  protected void onUpdate(AjaxRequestTarget target) {
   target.add(...);
   }
 });
 
 
 
 Am 12.05.2015 um 23:49 schrieb Chris chris...@gmx.at:
 
 Marcel, Sven,
 
 thanks a lot for your answers!
 Chris
 
 
 Am 12.05.2015 um 15:24 schrieb Marcel Barbosa Pinto 
 marcel.po...@gmail.com:
 
 Another way is to provide a value on your .properties file.
 
 For instance:
 
 nullValid=Please choose
 myFieldId.nullValid=Please choose a value for ${label}
 
 On Tue, May 12, 2015 at 8:26 AM, Sven Meier s...@meiers.net wrote:
 
 Hi,
 
 you have to override #getNullValidDisplayValue(),
 #getNullKeyDisplayValue() is for cases where null is *not* valid.
 
 Regards
 Sven
 
 
 
 On 12.05.2015 12:44, Chris wrote:
 
 Hi all,
 
 I have a Drop down choice field and would like to override the default
 select value.
 
 I have made following settings but the default value is empty. Is there
 sth missing?
 
 setNullValid(true);
 @Override
 protected String getNullKeyDisplayValue() {
   return Please choose;
 }
 Thanks, Chris
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 -- 
 
 Marcel Barbosa Pinto
 55 11 98255 8288
 
 
 -
 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: Drop Down Choice default value

2015-05-17 Thread Ernesto Reinaldo Barreiro
Hi,

On Mon, May 18, 2015 at 12:03 AM, Chris chris...@gmx.at wrote:

 Hi,

 when using a drop down as follows, always the whole page is reloaded on
 drop down change.

 How is it possible to update only a specific component via ajax?

 Thanks,
 Chris



 DropDownChoice tag = new DropDownChoiceString(tags, new
 PropertyModelString(this, selectedCategory), displayCategories) {

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


This is what is triggering page reload... Do not override it and everything
should work. Use the source Luke

/**
 * Whether this component's onSelectionChanged event handler should be
called using javascript
 * ttwindow.location/tt if the selection changes. If true, a roundtrip
will be generated
 * with each selection change, resulting in the model being updated (of
just this component) and
 * onSelectionChanged being called. This method returns false by default.
If you wish to use
 * Ajax instead, let {@link #wantOnSelectionChangedNotifications()} return
false and add an
 * {@link AjaxFormComponentUpdatingBehavior} to the component using the
ttonchange/tt event.
 *
 * @return True if this component's onSelectionChanged event handler should
called using
 * javascript if the selection changes
 */
protected boolean wantOnSelectionChangedNotifications()
{
return false;
}




 @Override
 protected void onSelectionChanged(String newSelection) {
 super.onSelectionChanged(newSelection);
 selectedCategory = newSelection;

 }


 @Override
 protected String getNullValidDisplayValue() {
 return All;
 }

 };


 tag.add(new AjaxFormComponentUpdatingBehavior(onchange) {
private static final long serialVersionUID = 1L;
   @Override
   protected void onUpdate(AjaxRequestTarget target) {
target.add(...);
}
 });



  Am 12.05.2015 um 23:49 schrieb Chris chris...@gmx.at:
 
  Marcel, Sven,
 
  thanks a lot for your answers!
  Chris
 
 
  Am 12.05.2015 um 15:24 schrieb Marcel Barbosa Pinto 
 marcel.po...@gmail.com:
 
  Another way is to provide a value on your .properties file.
 
  For instance:
 
  nullValid=Please choose
  myFieldId.nullValid=Please choose a value for ${label}
 
  On Tue, May 12, 2015 at 8:26 AM, Sven Meier s...@meiers.net wrote:
 
  Hi,
 
  you have to override #getNullValidDisplayValue(),
  #getNullKeyDisplayValue() is for cases where null is *not* valid.
 
  Regards
  Sven
 
 
 
  On 12.05.2015 12:44, Chris wrote:
 
  Hi all,
 
  I have a Drop down choice field and would like to override the default
  select value.
 
  I have made following settings but the default value is empty. Is
 there
  sth missing?
 
  setNullValid(true);
  @Override
  protected String getNullKeyDisplayValue() {
 return Please choose;
  }
  Thanks, Chris
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
 
  Marcel Barbosa Pinto
  55 11 98255 8288
 
 
  -
  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




-- 
Regards - Ernesto Reinaldo Barreiro


Re: Drop Down Choice default value

2015-05-12 Thread Chris
Marcel, Sven,

thanks a lot for your answers!
Chris


 Am 12.05.2015 um 15:24 schrieb Marcel Barbosa Pinto marcel.po...@gmail.com:
 
 Another way is to provide a value on your .properties file.
 
 For instance:
 
 nullValid=Please choose
 myFieldId.nullValid=Please choose a value for ${label}
 
 On Tue, May 12, 2015 at 8:26 AM, Sven Meier s...@meiers.net wrote:
 
 Hi,
 
 you have to override #getNullValidDisplayValue(),
 #getNullKeyDisplayValue() is for cases where null is *not* valid.
 
 Regards
 Sven
 
 
 
 On 12.05.2015 12:44, Chris wrote:
 
 Hi all,
 
 I have a Drop down choice field and would like to override the default
 select value.
 
 I have made following settings but the default value is empty. Is there
 sth missing?
 
 setNullValid(true);
 @Override
 protected String getNullKeyDisplayValue() {
 return Please choose;
 }
 Thanks, Chris
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -- 
 
 Marcel Barbosa Pinto
 55 11 98255 8288


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



Re: Drop Down Choice default value

2015-05-12 Thread Sven Meier

Hi,

you have to override #getNullValidDisplayValue(), 
#getNullKeyDisplayValue() is for cases where null is *not* valid.


Regards
Sven


On 12.05.2015 12:44, Chris wrote:

Hi all,

I have a Drop down choice field and would like to override the default select 
value.

I have made following settings but the default value is empty. Is there sth 
missing?

setNullValid(true);
@Override
protected String getNullKeyDisplayValue() {
 return Please choose;
}
Thanks, Chris



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



Re: Drop Down Choice default value

2015-05-12 Thread Marcel Barbosa Pinto
Another way is to provide a value on your .properties file.

For instance:

nullValid=Please choose
myFieldId.nullValid=Please choose a value for ${label}

On Tue, May 12, 2015 at 8:26 AM, Sven Meier s...@meiers.net wrote:

 Hi,

 you have to override #getNullValidDisplayValue(),
 #getNullKeyDisplayValue() is for cases where null is *not* valid.

 Regards
 Sven



 On 12.05.2015 12:44, Chris wrote:

 Hi all,

 I have a Drop down choice field and would like to override the default
 select value.

 I have made following settings but the default value is empty. Is there
 sth missing?

 setNullValid(true);
 @Override
 protected String getNullKeyDisplayValue() {
  return Please choose;
 }
 Thanks, Chris



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




-- 

Marcel Barbosa Pinto
55 11 98255 8288


Re: Drop Down Choice

2015-05-10 Thread Marcel Barbosa Pinto
Hi.. If you want only the selected value, you could create a hidden field
to mirror the dropdown's value.
Em 10/05/2015 14:48, Sebastien seb...@gmail.com escreveu:

 Hi Chris,

 AFAIK no. I don't know if such request feature has already been
 discussed...

 Otherwise, I think this could be integrated in wicket-kendo-ui
 http://demos.telerik.com/kendo-ui/dropdownlist/index

 If you are interested with, please open a ticket here:
 https://github.com/sebfz1/wicket-jquery-ui/issues

 Thanks  best regards,
 Sebastien.


 On Sun, May 10, 2015 at 7:10 PM, Chris chris...@gmx.at wrote:

  Hi all,
 
  is it possible to have a drop-down box without a list of choices (the
 list
  is directly coded in html as select and only the selected value should
 be
  read)?
 
  Thanks, Chris
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



Re: Drop Down Choice

2015-05-10 Thread Sebastien
Hi Chris,

AFAIK no. I don't know if such request feature has already been discussed...

Otherwise, I think this could be integrated in wicket-kendo-ui
http://demos.telerik.com/kendo-ui/dropdownlist/index

If you are interested with, please open a ticket here:
https://github.com/sebfz1/wicket-jquery-ui/issues

Thanks  best regards,
Sebastien.


On Sun, May 10, 2015 at 7:10 PM, Chris chris...@gmx.at wrote:

 Hi all,

 is it possible to have a drop-down box without a list of choices (the list
 is directly coded in html as select and only the selected value should be
 read)?

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




RE: Drop Down Choice

2011-03-21 Thread Wilhelmsen Tor Iver
 typing T would select Two, but typing Th would select Three.  Is
 this possible in Wicket?

This is the way well-behaved modern browsers already work :)

- Tor I.

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



Re: Drop Down Choice

2011-03-18 Thread nino martinez wael
theres this one (though not dropdown)

http://www.wicket-library.com/wicket-examples/ajax/autocompletehttp://www.wicket-library.com/wicket-examples/ajax/autocomplete;jsessionid=FE414790D6B5E7ACECC809CB9E9C9CEB?0

Or this one if you want a drop down:
http://wicket.visural.net/examples/app/dropdown

-Nino

http://www.wicket-library.com/wicket-examples/ajax/autocomplete;jsessionid=FE414790D6B5E7ACECC809CB9E9C9CEB?0

2011/3/18 Shelli Orton shelli.or...@sjrb.ca

 Hi,

 I've been looking for a Wicket drop down widget where one can choose an
 item from the list by typing more than the first character.  For
 example, if my list contains the following values:

 One
 Two
 Three
 Four
 Five

 typing T would select Two, but typing Th would select Three.  Is
 this possible in Wicket?

 Thanks!

 Shelli

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




Re: Drop Down Choice

2011-03-18 Thread Martin Makundi
Hi!

1. Invisible mode is always possible.

2. Maybe autocompletetextfield will be ok?

3. You can integrate pretty easily a jquery skin.

**
Martin

2011/3/18 Shelli Orton shelli.or...@sjrb.ca:
 Hi,

 I've been looking for a Wicket drop down widget where one can choose an
 item from the list by typing more than the first character.  For
 example, if my list contains the following values:

 One
 Two
 Three
 Four
 Five

 typing T would select Two, but typing Th would select Three.  Is
 this possible in Wicket?

 Thanks!

 Shelli

 -
 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: Drop Down Choice

2011-03-18 Thread Shelli Orton
Hi,

The wicket.visural.net first example looks like exactly what I need.

Thanks!

Shelli

-Original Message-
From: nino martinez wael [mailto:nino.martinez.w...@gmail.com] 
Sent: 18 March 2011 11:05 AM
To: users@wicket.apache.org
Subject: Re: Drop Down Choice

theres this one (though not dropdown)

http://www.wicket-library.com/wicket-examples/ajax/autocompletehttp://w
ww.wicket-library.com/wicket-examples/ajax/autocomplete;jsessionid=FE414
790D6B5E7ACECC809CB9E9C9CEB?0

Or this one if you want a drop down:
http://wicket.visural.net/examples/app/dropdown

-Nino

http://www.wicket-library.com/wicket-examples/ajax/autocomplete;jsessio
nid=FE414790D6B5E7ACECC809CB9E9C9CEB?0

2011/3/18 Shelli Orton shelli.or...@sjrb.ca

 Hi,

 I've been looking for a Wicket drop down widget where one can choose
an
 item from the list by typing more than the first character.  For
 example, if my list contains the following values:

 One
 Two
 Three
 Four
 Five

 typing T would select Two, but typing Th would select Three.
Is
 this possible in Wicket?

 Thanks!

 Shelli

 -
 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