Re: update DropDownList via AJAX

2020-04-02 Thread Sretan
Hi Sven,

thanks for your feedback i will try with your proposal

Regards
Sretan

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: update DropDownList via AJAX

2020-04-01 Thread Sven Meier

Hi,

if the DropDownList is updated via Ajax, the DOM element gets replaced 
and the  closes,

I don't see a way around that.

You could try updating the select's inner  (via some Ajax JS 
magic) only. I'm not aware of a pre-build Wicket solution that would do 
that though.

Maybe Select2 or similar can help you with that.

Have fun
Sven


On 01.04.20 11:35, Sretan wrote:

Hello,

I have one TextField and one DropDownList.

When i enter example '1' in the TextField and after that click on the
DropDownList,
DropDownList is opened and at the same time is updated from the server
(because of the event fired from TextField) via AJAX.
The DropDownList list is updated and closed.

I must click again on DropDownList to open it. Can some how this closing be
prevented or any other ideas how to solve this?

I am using wicket 6.13.

Thanks

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

-
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



update DropDownList via AJAX

2020-04-01 Thread Sretan
Hello,

I have one TextField and one DropDownList.

When i enter example '1' in the TextField and after that click on the
DropDownList, 
DropDownList is opened and at the same time is updated from the server
(because of the event fired from TextField) via AJAX.
The DropDownList list is updated and closed.

I must click again on DropDownList to open it. Can some how this closing be
prevented or any other ideas how to solve this?

I am using wicket 6.13.

Thanks

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: how to get dropdownlist selected value

2012-07-27 Thread Fergal Keating
attrvalueChoice.getModelObject();

On 26 July 2012 10:15, lxw_first lxw_fi...@hotmail.com wrote:

 http://apache-wicket.1842946.n4.nabble.com/file/n4650788/aaa.bmp

 html:


 select wicket:id=attrvalue/select


 code
 final ListView trView=new ListView(tritems, new PropertyModel(this,
 attrBizRoles)) {
 private IBizRole attrvalueBizRole=new BizRole();

 @Override
 protected void populateItem(ListItem item) {
 attrBizRole = (IBizRole) item.getModelObject();
 item.add(new Label(lblattr, attrBizRole.getName()));
 // this list can get from attr
 attrvalueBizRoles = (ListIBizRole)
 attrBizRole.getChildBizRole();
 if (attrvalueBizRoles.size()0) {
 attrvalueBizRole=attrvalueBizRoles.get(0);
 }
 DropDownChoice attrvalueChoice = new
 DropDownChoice(attrvalue,new
 PropertyModelIBizRole(this, attrvalueBizRole), attrvalueBizRoles,new
 IChoiceRenderer() {

 @Override
 public Object getDisplayValue(Object object) {
 attrvalueBizRole = (IBizRole) object;
 return attrvalueBizRole.getName();
 }

 @Override
 public String getIdValue(Object object, int index)
 {
 attrvalueBizRole = (IBizRole) object;
 return
 String.valueOf(attrvalueBizRole.getId());
 }
 });
 item.add(attrvalueChoice);
 }
 };

 i want to get the dropdownlist selected value.how to get value?
 Can anyone tell me how to achieve this.
 Thanks



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/how-to-get-dropdownlist-selected-value-tp4650788.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




-- 
Fergal Keating
IT Senior Engineer
---
e. fergal.keat...@directski.com
p. NA
w. www.directski.com


how to get dropdownlist selected value

2012-07-26 Thread lxw_first
http://apache-wicket.1842946.n4.nabble.com/file/n4650788/aaa.bmp 

html:


select wicket:id=attrvalue/select


code
final ListView trView=new ListView(tritems, new PropertyModel(this,
attrBizRoles)) {
private IBizRole attrvalueBizRole=new BizRole();

@Override
protected void populateItem(ListItem item) {
attrBizRole = (IBizRole) item.getModelObject();
item.add(new Label(lblattr, attrBizRole.getName()));
// this list can get from attr
attrvalueBizRoles = (ListIBizRole) 
attrBizRole.getChildBizRole();
if (attrvalueBizRoles.size()0) {
attrvalueBizRole=attrvalueBizRoles.get(0);
}
DropDownChoice attrvalueChoice = new 
DropDownChoice(attrvalue,new
PropertyModelIBizRole(this, attrvalueBizRole), attrvalueBizRoles,new
IChoiceRenderer() {

@Override
public Object getDisplayValue(Object object) {
attrvalueBizRole = (IBizRole) object;
return attrvalueBizRole.getName();
}

@Override
public String getIdValue(Object object, int index) {
attrvalueBizRole = (IBizRole) object;
return String.valueOf(attrvalueBizRole.getId());
}
});
item.add(attrvalueChoice);
}
};

i want to get the dropdownlist selected value.how to get value?
Can anyone tell me how to achieve this. 
Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-get-dropdownlist-selected-value-tp4650788.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



DropDownList

2010-04-19 Thread Josh Kamau
Hello guys, I am using a dropdownlist that am using to display a list of
objects. however i want to replace the Choose one text with the first
element in the list. how do i do this.

Kind regards
Josh


Re: DropDownList

2010-04-19 Thread Martin Makundi
Preselect?
dropdown.setModelObject(default);

Or default in your model.

**
Martin

2010/4/19 Josh Kamau joshnet2...@gmail.com:
 Hello guys, I am using a dropdownlist that am using to display a list of
 objects. however i want to replace the Choose one text with the first
 element in the list. how do i do this.

 Kind regards
 Josh


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



Re: DropDownList

2010-04-19 Thread MattyDE

just override protected CharSequence getDefaultChoice(Object selected) {
and return this.getChoices.get(0).toString ... but be sure what you do!
-- 
View this message in context: 
http://n4.nabble.com/DropDownList-tp2015827p2015837.html
Sent from the Wicket - User 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: DropDownList

2010-04-19 Thread Josh Kamau
Thanks alot Martin and MattyDE,   Martin's solution is exactly what i
wanted.

Regards.

On Mon, Apr 19, 2010 at 3:42 PM, MattyDE ufer.mar...@gmail.com wrote:


 just override protected CharSequence getDefaultChoice(Object selected) {
 and return this.getChoices.get(0).toString ... but be sure what you do!
 --
 View this message in context:
 http://n4.nabble.com/DropDownList-tp2015827p2015837.html
 Sent from the Wicket - User 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: DropDownList

2010-04-19 Thread James Carman
Josh,

This seems to be one of the hardest things for new Wicketeers,
understanding how models work.  Basically, when you tell the
DropDownChoice to use a model, you're saying when you want to
know/update what's selected, go here.  The funny thing about models
is that they really are quite simple; it's just a mindset change.
Good luck!

James

On Mon, Apr 19, 2010 at 8:52 AM, Josh Kamau joshnet2...@gmail.com wrote:
 Thanks alot Martin and MattyDE,   Martin's solution is exactly what i
 wanted.

 Regards.

 On Mon, Apr 19, 2010 at 3:42 PM, MattyDE ufer.mar...@gmail.com wrote:


 just override protected CharSequence getDefaultChoice(Object selected) {
 and return this.getChoices.get(0).toString ... but be sure what you do!
 --
 View this message in context:
 http://n4.nabble.com/DropDownList-tp2015827p2015837.html
 Sent from the Wicket - User 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



Re: DropDownList

2010-04-19 Thread Martin Makundi
God bless hollywood.

**
Martin

2010/4/19 James Carman jcar...@carmanconsulting.com:
 Josh,

 This seems to be one of the hardest things for new Wicketeers,
 understanding how models work.  Basically, when you tell the
 DropDownChoice to use a model, you're saying when you want to
 know/update what's selected, go here.  The funny thing about models
 is that they really are quite simple; it's just a mindset change.
 Good luck!

 James

 On Mon, Apr 19, 2010 at 8:52 AM, Josh Kamau joshnet2...@gmail.com wrote:
 Thanks alot Martin and MattyDE,   Martin's solution is exactly what i
 wanted.

 Regards.

 On Mon, Apr 19, 2010 at 3:42 PM, MattyDE ufer.mar...@gmail.com wrote:


 just override protected CharSequence getDefaultChoice(Object selected) {
 and return this.getChoices.get(0).toString ... but be sure what you do!
 --
 View this message in context:
 http://n4.nabble.com/DropDownList-tp2015827p2015837.html
 Sent from the Wicket - User 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



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



Re: DropDownList

2010-04-19 Thread Josh Kamau
Thanks James. I think its slowly sinking into my Medulla Oblongata.

On Mon, Apr 19, 2010 at 3:56 PM, James Carman
jcar...@carmanconsulting.comwrote:

 Josh,

 This seems to be one of the hardest things for new Wicketeers,
 understanding how models work.  Basically, when you tell the
 DropDownChoice to use a model, you're saying when you want to
 know/update what's selected, go here.  The funny thing about models
 is that they really are quite simple; it's just a mindset change.
 Good luck!

 James

 On Mon, Apr 19, 2010 at 8:52 AM, Josh Kamau joshnet2...@gmail.com wrote:
  Thanks alot Martin and MattyDE,   Martin's solution is exactly what i
  wanted.
 
  Regards.
 
  On Mon, Apr 19, 2010 at 3:42 PM, MattyDE ufer.mar...@gmail.com wrote:
 
 
  just override protected CharSequence getDefaultChoice(Object selected) {
  and return this.getChoices.get(0).toString ... but be sure what you do!
  --
  View this message in context:
  http://n4.nabble.com/DropDownList-tp2015827p2015837.html
  Sent from the Wicket - User 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




DropDownList

2010-04-14 Thread Josh Kamau
Hi team;

Please tell me , how do i change the Choose One text on the drop down list
to something else?

regards;

Josh


Re: DropDownList

2010-04-14 Thread Major Péter
http://lmgtfy.com/?q=wicket+change+choose+one+text

2010-04-14 14:00 keltezéssel, Josh Kamau írta:
 Hi team;
 
 Please tell me , how do i change the Choose One text on the drop down list
 to something else?
 
 regards;
 
 Josh

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



Re: DropDownList

2010-04-14 Thread Robert Kimotho
Override getDefaultChoice()

as in the following code:-

@Override
protected CharSequence getDefaultChoice(Object selected) {
return option value=\\your header/option;
}

On Wed, Apr 14, 2010 at 3:00 PM, Josh Kamau joshnet2...@gmail.com wrote:
 Hi team;

 Please tell me , how do i change the Choose One text on the drop down list
 to something else?

 regards;

 Josh


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



Re: DropDownList

2010-04-14 Thread Josh Kamau
Thanks robert, major.. It worked.

regards
Josh

2010/4/14 Major Péter majorpe...@sch.bme.hu

 http://lmgtfy.com/?q=wicket+change+choose+one+text

 2010-04-14 14:00 keltezéssel, Josh Kamau írta:
  Hi team;
 
  Please tell me , how do i change the Choose One text on the drop down
 list
  to something else?
 
  regards;
 
  Josh

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




Re: styling option tag in dropdownlist

2008-06-18 Thread jWeekend

Mathias,

I recently gave a short presentation on this subject. The slides are 
http://jweekend.co.uk/dev/ArticlesPage/ here  if you're still interested in
colourful options. It's quite concise, so feel free to get back to me if you
need more details.

Regards - Cemal
http://jWeekend.co.uk http://jWeekend.co.uk 



Mathias P.W Nilsson wrote:
 
 Hi!
 
 How can I style a certain option in a select list? I want to provide
 diffrent colors for main categories in a drop down list. 
 

-- 
View this message in context: 
http://www.nabble.com/styling-option-tag-in-dropdownlist-tp17804741p17961862.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



styling option tag in dropdownlist

2008-06-12 Thread Mathias P.W Nilsson

Hi!

How can I style a certain option in a select list? I want to provide
diffrent colors for main categories in a drop down list. 
-- 
View this message in context: 
http://www.nabble.com/styling-option-tag-in-dropdownlist-tp17804741p17804741.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: styling option tag in dropdownlist

2008-06-12 Thread Igor Vaynberg
use Select/SelectOption components rather then dropdownchoice

-igor

On Thu, Jun 12, 2008 at 9:57 AM, Mathias P.W Nilsson
[EMAIL PROTECTED] wrote:

 Hi!

 How can I style a certain option in a select list? I want to provide
 diffrent colors for main categories in a drop down list.
 --
 View this message in context: 
 http://www.nabble.com/styling-option-tag-in-dropdownlist-tp17804741p17804741.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to remove 'choose one' from dropdownlist?

2007-10-31 Thread ChuckDeal

If it is just a matter of not wanting to see the phrase Choose One but that
you are ok with a empty value, you could use the null property value to
change the default text.  There is also a null.valid property that you can
define for the case where a null value is valid (used in conjuntion with
setNullValid(true) method).  

To use those properties, make a file can {you panel/page name}.properties
and add lines to it like:
null=Some default text
null.valid=Some other text

Chuck


raybristol wrote:
 
 Thanks everyone!
 
 
 
 igor.vaynberg wrote:
 
 put an option into your model, that way it will be selected... or
 override getdefaultchoice() and return 
 
 -igor
 
 
 On 10/30/07, raybristol [EMAIL PROTECTED] wrote:

 how to remove 'choose one' from dropdownlist? I can use the dropdownlist
 alright, populate data etc. but wicket always put a 'choose one' option
 on
 the top, I wonder if I can get rid of it?

 Many thanks!
 --
 View this message in context:
 http://www.nabble.com/how-to-remove-%27choose-one%27-from-dropdownlist--tf4719338.html#a13491271
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/how-to-remove-%27choose-one%27-from-dropdownlist--tf4719338.html#a13515621
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]