Re: update DropDownList via AJAX
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
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
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
attrvalueChoice.getModelObject(); On 26 July 2012 10:15, lxw_first wrote: > http://apache-wicket.1842946.n4.nabble.com/file/n4650788/aaa.bmp > > html: > > > > > > 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 = (List) > attrBizRole.getChildBizRole(); > if (attrvalueBizRoles.size()>0) { > attrvalueBizRole=attrvalueBizRoles.get(0); > } > DropDownChoice attrvalueChoice = new > DropDownChoice("attrvalue",new > PropertyModel(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
http://apache-wicket.1842946.n4.nabble.com/file/n4650788/aaa.bmp html: 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 = (List) attrBizRole.getChildBizRole(); if (attrvalueBizRoles.size()>0) { attrvalueBizRole=attrvalueBizRoles.get(0); } DropDownChoice attrvalueChoice = new DropDownChoice("attrvalue",new PropertyModel(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
Re: DropDownList
Thanks James. I think its slowly sinking into my Medulla Oblongata. On Mon, Apr 19, 2010 at 3:56 PM, James Carman wrote: > 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 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 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
God bless hollywood. ** Martin 2010/4/19 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 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 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
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 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 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
Thanks alot Martin and MattyDE, Martin's solution is exactly what i wanted. Regards. On Mon, Apr 19, 2010 at 3:42 PM, MattyDE 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
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
Preselect? dropdown.setModelObject(default); Or default in your model. ** Martin 2010/4/19 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 > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DropDownList
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
Thanks robert, major.. It worked. regards Josh 2010/4/14 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
Override getDefaultChoice() as in the following code:- @Override protected CharSequence getDefaultChoice(Object selected) { return "your header"; } On Wed, Apr 14, 2010 at 3:00 PM, Josh Kamau 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
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
DropDownList
Hi team; Please tell me , how do i change the "Choose One" text on the drop down list to something else? regards; Josh
Re: styling option tag in dropdownlist
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]
Re: styling option tag in dropdownlist
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]
styling option tag in dropdownlist
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: how to remove 'choose one' from dropdownlist?
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]
Re: how to remove 'choose one' from dropdownlist?
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#a13506924 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: how to remove 'choose one' from dropdownlist?
Try with setRequired(true) and set the model with the first option from your choices. -- Bruno Borges blog.brunoborges.com.br +55 1185657739 "The glory of great men should always be measured by the means they have used to acquire it." - Francois de La Rochefoucauld 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] > >
Re: how to remove 'choose one' from dropdownlist?
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]
how to remove 'choose one' from dropdownlist?
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]