Re: problem using DropDownChoice

2023-12-14 Thread Bas Gooren
Hi! Normally this should work just fine: otReasonDropDown = new DropDownChoice("otReason", new PropertyModel (commentAndOtReason, "otReasonText"), ldm2); otReasonDropDown.setNullValid(false); So my guess is that either commentAndOtReason is null (unlikely, as tha

problem using DropDownChoice

2023-12-14 Thread Nelligan, Steven M
Help, I am new to Wicket...and have taken over a project with wicket version 1.4.18. I need to add another DropDownChoice in my application. I was able to create the add logic, but the change logic is not working as expected. I've been working on this for a couple of weeks, and still could

Re: non-serializable objects to feed a DropDownChoice

2019-08-28 Thread Martin Grigorov
Hi, Is there a problem in using LoadableDetachableModel> for the DropDownChoice ? Use this constuctor: public DropDownChoice(String id, IModel model, IModel> choices, IChoiceRenderer renderer) On Wed, Aug 28, 2019 at 10:56 PM René Stolle wrote: > Hello there, > > my domain cla

Re: non-serializable objects to feed a DropDownChoice

2019-08-28 Thread Francois Meillet
lems execpt of one situtation: I > couldn't find an easy solution to place a list of domain objects in a > DropDownChoice without getting serialization issues. The examples I found > ignore this problem and I have only a pretty complicated work around. My > domain classes have an

non-serializable objects to feed a DropDownChoice

2019-08-28 Thread René Stolle
Hello there, my domain classes are mostly not serializable. Making use of LoadableDetachableModels I have no problems execpt of one situtation: I couldn't find an easy solution to place a list of domain objects in a DropDownChoice without getting serialization issues. The examples I found

Re: DropDownChoice - choices type vs model type

2019-07-01 Thread Zbynek Vavros
it won't hurt so much :P. > >> > >> Have fun > >> Sven > >> > >> > >>> On 01.07.19 14:45, Zbynek Vavros wrote: > >>> Hi, > >>> > >>> I don't have any specific use-case for this but I'm interested on how > to > &

Re: DropDownChoice - choices type vs model type

2019-07-01 Thread Tobias Soloschenko
e, the renderer is a >> good place for that. >> Move it into its own class file so it won't hurt so much :P. >> >> Have fun >> Sven >> >> >>> On 01.07.19 14:45, Zbynek Vavros wrote: >>> Hi, >>> >>> I don't have any spec

Re: DropDownChoice - choices type vs model type

2019-07-01 Thread Zbynek Vavros
ile so it won't hurt so much :P. > > Have fun > Sven > > > On 01.07.19 14:45, Zbynek Vavros wrote: > > Hi, > > > > I don't have any specific use-case for this but I'm interested on how to > do > > this properly. > > > > There is a DropDownChoice that

Re: DropDownChoice - choices type vs model type

2019-07-01 Thread Sven Meier
don't have any specific use-case for this but I'm interested on how to do this properly. There is a DropDownChoice that displays list of Batches. Now the display option should be "id" and "name" concated together and the DropDownChoice selection model will be only the name. Ba

DropDownChoice - choices type vs model type

2019-07-01 Thread Zbynek Vavros
Hi, I don't have any specific use-case for this but I'm interested on how to do this properly. There is a DropDownChoice that displays list of Batches. Now the display option should be "id" and "name" concated together and the DropDownChoice selection model will be o

Re: DropDownChoice and null value

2018-06-25 Thread JavaTraveler
Ok thank you, interesting component. I'll try it :) -- 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,

Re: DropDownChoice and null value

2018-06-25 Thread Bas Gooren
...@gmail.com) schreef: Hello everyone, I wish to get rid of the "choose one" option. Wich is equivalent to null, if i'm not mistaken. ddlSociete = new DropDownChoice("societe", new PropertyModel(pointageMasseSearchDto, "societe"), new LoadableDetachableModel>(

DropDownChoice and null value

2018-06-25 Thread JavaTraveler
Hello everyone, I wish to get rid of the "choose one" option. Wich is equivalent to null, if i'm not mistaken. ddlSociete = new DropDownChoice("societe", new PropertyModel(pointageMasseSearchDto, "societe"), new LoadableDetachableModel>() { @O

Re: the choices is key instead of value when using DropDownChoice component

2018-01-29 Thread extraquoo
Hi ,just ignore my last reply. I should not override localizeDisplayValues to return true so as not to execute display = getLocalizer().getString(displayValue, this, displayValue);. your code is really helpful. Thank you very much indeed. -- Sent from:

Re: the choices is key instead of value when using DropDownChoice component

2018-01-29 Thread extraquoo
uestion8.oneTimeOrMonthly" in the choices, and then when selecting the option in the page, render the exact value to the dropdownchoice object ? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html --

Re: the choices is key instead of value when using DropDownChoice component

2018-01-29 Thread Sven Meier
scribing the issue incorrectly. so if put value in the choices object , construct the DropDownChoice and override localizeDisplayValues DropDownChoice selector = new DropDownChoice(fieldName, choices){ private static final long serialVersionUID = 1L;

Re: the choices is key instead of value when using DropDownChoice component

2018-01-29 Thread extraquoo
thanks for replying. Looks like it still put the value in the choices object. Maybe I am describing the issue incorrectly. so if put value in the choices object , construct the DropDownChoice and override localizeDisplayValues DropDownChoice selector = new DropDownChoice(fieldName, choices

Re: the choices is key instead of value when using DropDownChoice component

2018-01-26 Thread Sven Meier
uestion8.otherSourcemonthly"));     return selectionDescription;     } }; DropDownChoice selector = new DropDownChoice(fieldName, choices){ } Have fun Sven Am 25.01.2018 um 18:38 schrieb extraquoo: Hi, I try to use GetString / StringResourceModel and put the key selectionDescription.add(new

Re: the choices is key instead of value when using DropDownChoice component

2018-01-25 Thread extraquoo
String(displayValue, this, displayValue); displayValue is the key so in the DropDownChoice options ,it needs to put the key instead of value to support i18n. any advice ? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

Re: the choices is key instead of value when using DropDownChoice component

2018-01-24 Thread Sven Meier
.com> schrieb: >Hi >I am adding a FormComponent DropDownChoice to display a dropdown list >on >the page like below ><http://apache-wicket.1842946.n4.nabble.com/file/t375760/dropdown_list.png> > > >To support the i18n, I add the key to a list of choices and override

the choices is key instead of value when using DropDownChoice component

2018-01-24 Thread extraquoo
Hi I am adding a FormComponent DropDownChoice to display a dropdown list on the page like below <http://apache-wicket.1842946.n4.nabble.com/file/t375760/dropdown_list.png> To support the i18n, I add the key to a list of choices and override the localizeDisplayValues, the code is below p

Re: Wicket jqueryui DropDownChoice not working in AbstractFormDialog

2017-10-18 Thread Sebastien
Perfect workaround ! :) Could also be written this way: behavior.setOption("appendTo", Options.asString(JQueryWidget.getSelector(myDialog))); The #setAppendTo(Component) is a nice idea! I've added an issue so I do not forget: https://github.com/sebfz1/wicket-jquery-ui/issues/278 Thanks & best

AW: Wicket jqueryui DropDownChoice not working in AbstractFormDialog

2017-10-18 Thread Reiche, Andreas
lto:seb...@gmail.com] > Gesendet: Mittwoch, 18. Oktober 2017 14:57 > An: users@wicket.apache.org > Betreff: Re: Wicket jqueryui DropDownChoice not working in AbstractFormDialog > > That's basically a css issue (which can also be solved by calling > #selectmenu() on dialog#open

Re: Wicket jqueryui DropDownChoice not working in AbstractFormDialog

2017-10-18 Thread Sebastien
che Nachricht- > > Von: Sebastien [mailto:seb...@gmail.com] > > Gesendet: Mittwoch, 18. Oktober 2017 11:21 > > An: users@wicket.apache.org > > Betreff: Re: Wicket jqueryui DropDownChoice not working in > AbstractFormDialog > > > > Hi, I cannot test the quickstart r

AW: Wicket jqueryui DropDownChoice not working in AbstractFormDialog

2017-10-18 Thread Reiche, Andreas
Gesendet: Mittwoch, 18. Oktober 2017 11:21 > An: users@wicket.apache.org > Betreff: Re: Wicket jqueryui DropDownChoice not working in AbstractFormDialog > > Hi, I cannot test the quickstart right now. By not working, do you mean it > is a display issue, or a behavioral issue? In the

Re: Wicket jqueryui DropDownChoice not working in AbstractFormDialog

2017-10-18 Thread Sebastien
Hi, I cannot test the quickstart right now. By not working, do you mean it is a display issue, or a behavioral issue? In the firstcase, it is likely a css issue (please checkout the wicket-jquery-ui forum, I'm pretty sure the question was raised in there before...)

Re: Empty model when testing DropDownChoice with wantOnSelectionChangedNotifications enabled

2017-07-07 Thread Jordan
Hello. It worked! Thank you so much for your answer. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Empty-model-when-testing-DropDownChoice-with-wantOnSelectionChangedNotifications-enabled-tp4678205p4678210.html Sent from the Users forum mailing list archive

Re: Empty model when testing DropDownChoice with wantOnSelectionChangedNotifications enabled

2017-07-06 Thread Sven Meier
icket page and I am stuck when trying to submit a form. I have isolated a minimal working example. The problem seems to be the wantOnSelectionChangedNotifications method of the DropDownChoice. If it's set to true, the test prints out "Model = null", otherwise it prints the correct solution &

Empty model when testing DropDownChoice with wantOnSelectionChangedNotifications enabled

2017-07-06 Thread Jordan
Hello. I am trying to test a custom Wicket page and I am stuck when trying to submit a form. I have isolated a minimal working example. The problem seems to be the wantOnSelectionChangedNotifications method of the DropDownChoice. If it's set to true, the test prints out "Model = null",

Re: DropDownChoice with a different choice class than model class

2017-06-19 Thread Lon Varscsak
Yeah, I already had a renderer that was taking care of the conversion for me, it’s just I was subclassing DropDownChoice whose generics are only 1 type (both choices and model value). I ended up subclassing AbstractChoice and copying methods (and modifying them to support model values and choices

Re: DropDownChoice with a different choice class than model class

2017-06-15 Thread Sven Meier
assume that DropDownChoice (and a few of it’s superclasses) should be using the generic of <T, E> that AbstractChoice defines where T is the class of the model object and E is the class of choice object? It seems that from AbstractSingleSelectChoice up, it assumes that the value fr

DropDownChoice with a different choice class than model class

2017-06-14 Thread Lon Varscsak
Am I wrong to assume that DropDownChoice (and a few of it’s superclasses) should be using the generic of <T, E> that AbstractChoice defines where T is the class of the model object and E is the class of choice object? It seems that from AbstractSingleSelectChoice up, it assumes that the

AW: FilterForm with DropDownChoice

2017-03-23 Thread Christoph.Manig
Hello, thank you that works fine for my problem. Mit freundlichen Grüßen Christoph Manig -Ursprüngliche Nachricht- Von: Sven Meier [mailto:s...@meiers.net] Gesendet: Mittwoch, 22. März 2017 16:16 An: users@wicket.apache.org Betreff: Re: FilterForm with DropDownChoice Hi, have you

Re: FilterForm with DropDownChoice

2017-03-22 Thread Sven Meier
Hi, have you tried subclassing your choices and adding some JavaScript? DropDownChoice(...) { onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.put("onchange", "this.form.submit()"); } } I haven't tried this though. Ha

FilterForm with DropDownChoice

2017-03-22 Thread Christoph.Manig
;enter" nothing happened. How can I use a DropDownChoice in the FilterForm? DataProvider: public class RouteStateDataProvider extends SortableDataProvider<RouteStateModel, String> implements IFilterStateLocator { /** serialVersionUID */ private static f

Re: DropDownChoice models

2017-01-12 Thread Zbynek Vavros
;> >>> IModel userModel = new IModel() { >>> public void setObject(User user) { >>> target.set(user.getId()); >>> } >>> public User getObject() { >>> return User.findOne

Re: DropDownChoice models

2017-01-11 Thread Sven Meier
d()); } public User getObject() { return User.findOne(target.get()); } } Then your choice can just work on a user: DropDownChoice usersDropDown = new DropDownChoice<>("userId", userModel, User.getUsers()); Both approaches h

Re: DropDownChoice models

2017-01-11 Thread Zbynek Vavros
Hey, I dont really think so because this kind of renderer will use these ("name" and "id) as property expression from User object. And then the DropDown selection itself would be of type User as well. I want the selection to be only user's ID, not the whole User object. The whole point is just to

Re: DropDownChoice models

2017-01-11 Thread Sebastien
Hi Zbynek, Maybe I missed something about your problem, but wouldn't this be enough? new ChoiceRenderer("name", "id") Best regards, Sebastien.

Re: DropDownChoice models

2017-01-11 Thread Zbynek Vavros
{ > public void setObject(User user) { > target.set(user.getId()); > } > public User getObject() { > return User.findOne(target.get()); > } > } > > Then your choice can just work on a user: > > DropDownChoice usersDropDown = new D

Re: DropDownChoice models

2017-01-11 Thread Sven Meier
()); } } Then your choice can just work on a user: DropDownChoice usersDropDown = new DropDownChoice<>("userId", userModel, User.getUsers()); Both approaches have advantages and disadvantages. Have fun Sven On 11.01.2017 11:38, Zbynek Vavros wrote: Hey, I have

Re: DropDownChoice models

2017-01-11 Thread Peter Henderson
and lots of if (x != null ) boiler plate. I hope it helps. [1] https://gist.github.com/bollinger/433ec1b54167baf88297b495a5df0cff On 11 January 2017 at 10:38, Zbynek Vavros <zbynekvav...@gmail.com> wrote: > Hey, > > I have a DropDownChoice for list of users. I want to disp

DropDownChoice models

2017-01-11 Thread Zbynek Vavros
Hey, I have a DropDownChoice for list of users. I want to display user's name but bind user's ID. So far I have come to this (ugly) solution that can surely be improved: // create model with Long userId... final DropDownChoice usersDropDown = new DropDownChoice<>( &

Re: DropDownChoice with ChoiceRenderer

2016-10-14 Thread ganea iulia
:) yes, that was it: @Override public String getObject(String paramString, IModel> paramIModel) { return paramString; } solved it:) On Fri, Oct 14, 2016 at 4:03 PM, Per Newgro wrote: > Hello ganea, > > can you please investigate the method below? > > Hope that helps > Per >

Re: DropDownChoice with ChoiceRenderer

2016-10-14 Thread Per Newgro
Hello ganea, can you please investigate the method below? Hope that helps Per Am 14.10.2016 um 14:52 schrieb ganea iulia: @Override public String getObject(String paramString, IModel> paramIModel) { // TODO Auto-generated method stub return null; }

DropDownChoice with ChoiceRenderer

2016-10-14 Thread ganea iulia
Hello, I'm using Wicket 7. I have this simple use case where I need to have a dropdownchoice, where to display some values, but the model should retain other values. I have done the following, however, the model always retains null. So my dropdownchoice should display Code1 and Code2 but save

Re: DropDownChoice in a listview not updating model - With ajax *SOLVED*

2016-07-22 Thread mniel0
The problem has been solved! My problem was my ChoiceRenderer rendrer = new ChoiceRenderer("Name", "ProviderID"); The provider ID is the same for both of the values in the dropdownchoice, so no matter which i picked i'd choose the same "ID". So i created a unique

Re: DropDownChoice in a listview not updating model - With ajax

2016-07-22 Thread Sven Meier
Hi, please put your code somewhere where we can grab it, preferably inside a wicket quickstart. These screenshots are hard to read :(. Thanks Sven -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-in-a-listview-not-updating-model-With-ajax

DropDownChoice in a listview not updating model - With ajax

2016-07-22 Thread mniel0
/update the model of a dropdownchoice properly. The first dropdownchoice should have two options loaded dynamically(and maybe more in the future), and that seem to work, at least it gets the names right.. But behind, i dont think the model gets updated. <http://apache-wicket.1842946.n4.nabble.com/f

Re: DropDownChoice and Object/Property

2016-05-05 Thread Martin Grigorov
find ShipMethod with id: " + id); } } ... = new DropDownChoice(“shipMethod”, model, models, renderer); Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, May 5, 2016 at 8:49 PM, Lon Varscsak <lon.varsc...@gmail.com> wrote: > haha, sorry…he

Re: DropDownChoice and Object/Property

2016-05-05 Thread Lon Varscsak
n Thu, May 5, 2016 at 2:28 AM, Lon Varscsak <lon.varsc...@gmail.com> > wrote: > > > Hey all, > > > > Is there a way to have a DropDownChoice use a complex object (think ORM > > class) as it’s list, but get/set the Model’s value as the ID instead of > the >

Re: DropDownChoice and Object/Property

2016-05-05 Thread Martin Grigorov
Hi, On Thu, May 5, 2016 at 2:28 AM, Lon Varscsak <lon.varsc...@gmail.com> wrote: > Hey all, > > Is there a way to have a DropDownChoice use a complex object (think ORM > class) as it’s list, but get/set the Model’s value as the ID instead of the > complex object

DropDownChoice and Object/Property

2016-05-04 Thread Lon Varscsak
Hey all, Is there a way to have a DropDownChoice use a complex object (think ORM class) as it’s list, but get/set the Model’s value as the ID instead of the complex object? So for: new DropDownChoice<>(“shipMethod”, new PropertyModel<>(OrderPage.this .getOrderController().order().sh

Re: Modal panel reloaded when selecting from DropDownChoice

2015-04-19 Thread Ulrich
the window with window.close(AjaxRequestTarget target) but my message is not rendered. HTML: JAVA: -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Modal-panel-reloaded-when-selecting-from-DropDownChoice-tp4670394p4670398.html Sent from the Users forum mailing list

Modal panel reloaded when selecting from DropDownChoice

2015-04-19 Thread Ulrich
When trying to build a quickstart for another problem I'm stumbling about this: When selecting from a DropDownChoice within a modal panel the underlying page becomes reloaded and I'm asked whether I want to leave the page. The message is Reloading this page will cause the modal window to disappear

Re: Modal panel reloaded when selecting from DropDownChoice

2015-04-19 Thread Martin Grigorov
Hi, ModalWindow could be used only in Ajax. DropDownChoice#wantOnSelectionChanged() doesn't use Ajax but reloads the page. On Apr 19, 2015 5:56 PM, Ulrich for...@gombers.de wrote: When trying to build a quickstart for another problem I'm stumbling about this: When selecting from

Re: Modal panel reloaded when selecting from DropDownChoice

2015-04-19 Thread Ulrich
like to understand whats going on here. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Modal-panel-reloaded-when-selecting-from-DropDownChoice-tp4670394p4670396.html Sent from the Users forum mailing list archive at Nabble.com

Re: Improve Support for placeholder label option for DropDownChoice?

2015-04-02 Thread Sven Meier
Mittwoch, 1. April 2015 um 22:54 schrieben Sie: why don't you allow null (i.e. #isNullValid() returning true), while setting the DropDownChoice required? Because null is not valid in my case and the displayed texts for the placeholder label option are different for both null valid vs. invalid cases

Improve Support for placeholder label option for DropDownChoice?

2015-04-01 Thread Thorsten Schöning
The reason for the error seems simple: I use a DropDownChoice with a default selected value and null disallowed, so I always need a value. In that case AbstractSingleSelectChoice.getDefaultChoice doesn't provide any content, because there's already one value selected and this is not null. That results

Re: Dropdownchoice without default option choose one

2014-11-13 Thread micah.k.willard
should always have a value defined then you could set the model object to be for example the first choice. e.g. ddc.setModelObject (ddc.getChoices().get(0)); Regards, Mike I would like to remove the default choose one option from the DropDownChoice component. Does anyone know how to do

Re: Problem with FormTester and selection on dropDownChoice

2014-08-15 Thread Bert
. Thank you very much. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-FormTester-and-selection-on-dropDownChoice-tp4663439p4663495.html Sent from the Users forum mailing list archive at Nabble.com

Re: DropDownChoice closes on target.add(...)

2014-07-22 Thread Rune Stilling
dropdown choice and clicks etc. kind regards Patrick Am 21.07.2014 15:29, schrieb Rune Stilling: Hi list I’m using the TabbedPanel component to show a couple of tabs each of them containing a form. The form among other things contains a DropDownChoice. I have also set up

Re: DropDownChoice closes on target.add(...)

2014-07-22 Thread Rune Stilling
dropdown choice and clicks etc. kind regards Patrick Am 21.07.2014 15:29, schrieb Rune Stilling: Hi list I’m using the TabbedPanel component to show a couple of tabs each of them containing a form. The form among other things contains a DropDownChoice. I have also set up

Re: DropDownChoice closes on target.add(...)

2014-07-22 Thread Martin Grigorov
the TabbedPanel component to show a couple of tabs each of them containing a form. The form among other things contains a DropDownChoice. I have also set up a AbstractAjaxTimerBehavior instance to do some updates along the way. On of the updates i the TabbedPanel, that I add to my target

DropDownChoice closes on target.add(...)

2014-07-21 Thread Rune Stilling
Hi list I’m using the TabbedPanel component to show a couple of tabs each of them containing a form. The form among other things contains a DropDownChoice. I have also set up a AbstractAjaxTimerBehavior instance to do some updates along the way. On of the updates i the TabbedPanel, that I add

Re: DropDownChoice closes on target.add(...)

2014-07-21 Thread Patrick Davids
your dropdown choice and clicks etc. kind regards Patrick Am 21.07.2014 15:29, schrieb Rune Stilling: Hi list I’m using the TabbedPanel component to show a couple of tabs each of them containing a form. The form among other things contains a DropDownChoice. I have also set up

wantsOnSelectionChangedNotifications - RadioGroup / Radio vs DropDownChoice

2014-05-19 Thread Simon B
Hi, I'm using Wicket 6.14.0 I've got a form with many components including one which is a RadioGroup (with several Radio) and one which is a DropDownChoice, Both the RadioGroup // Radios and the DropDownChoice have been marked to get selection changed notifications with the RadioGroup

Re: wantsOnSelectionChangedNotifications - RadioGroup / Radio vs DropDownChoice

2014-05-19 Thread Martin Grigorov
including one which is a RadioGroup (with several Radio) and one which is a DropDownChoice, Both the RadioGroup // Radios and the DropDownChoice have been marked to get selection changed notifications with the RadioGroup#wantOnSelectionChangedNotifications() and the DropDownChoice

Re: wantsOnSelectionChangedNotifications - RadioGroup / Radio vs DropDownChoice

2014-05-19 Thread Simon B
I've just added an issue to JIRA with a quickstart attachment: https://issues.apache.org/jira/browse/WICKET-5596 Cheers Simon -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wantsOnSelectionChangedNotifications-RadioGroup-Radio-vs-DropDownChoice-tp4665927p4665942

Testing a DropDownChoice without a Form with wantOnSelectionChangedNotifications=true

2014-03-25 Thread jchappelle
I have a DropDownChoice that is not within a Form and I'm trying to write a test that selects an item in that DropDownChoice. I have been trying to use WicketTester.executeUrl and give it the url in the onchange attribute of the DropDownChoice but I'm not having any luck. Even if I do get

Re: Testing a DropDownChoice without a Form with wantOnSelectionChangedNotifications=true

2014-03-25 Thread Martin Grigorov
Hi, See how org.apache.wicket.util.tester.FormTester#select() does it. You need to do tester.invokeListener(component, IOnChangeListener.INTERFACE); Martin Grigorov Wicket Training and Consulting On Tue, Mar 25, 2014 at 8:37 PM, jchappelle jchappe...@4redi.com wrote: I have a DropDownChoice

Re: Hybrid palette with DropDownChoice and ListView

2014-02-19 Thread ChambreNoire
Great, I'm still getting NonUniqueObjectExceptions when I save. Back to the drawing board. *sigh* -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Hybrid-palette-with-DropDownChoice-and-ListView-tp4664445p4664562.html Sent from the Users forum mailing list archive

Re: Hybrid palette with DropDownChoice and ListView

2014-02-14 Thread ChambreNoire
= new LoadableDetachableModel() { @Override protected Object load() { return getUnselectedChoices(); } }; DropDownChoice choice = new DropDownChoice(UNSELECTED_ID, new Model(), unselectedChoices, choiceRenderer

Hybrid palette with DropDownChoice and ListView

2014-02-13 Thread ChambreNoire
Hello, I'd like to create a hybrid 'palette'. First there's a DropDownChoice with an 'Add' link and next to this a vertical list of selected items, each with a 'remove' link. Of course, adding an item removes it from the DropDownChoice and adds it to the list and vice-versa for item 'removal

Re: Hybrid palette with DropDownChoice and ListView

2014-02-13 Thread Paul Bors
, ChambreNoire a...@tentelemed.com wrote: Hello, I'd like to create a hybrid 'palette'. First there's a DropDownChoice with an 'Add' link and next to this a vertical list of selected items, each with a 'remove' link. Of course, adding an item removes it from the DropDownChoice and adds

Re: Hybrid palette with DropDownChoice and ListView

2014-02-13 Thread Paul Bors
, ChambreNoire a...@tentelemed.com wrote: Hello, I'd like to create a hybrid 'palette'. First there's a DropDownChoice with an 'Add' link and next to this a vertical list of selected items, each with a 'remove' link. Of course, adding an item removes it from the DropDownChoice and adds it to the list

Re: Hybrid palette with DropDownChoice and ListView

2014-02-13 Thread ChambreNoire
in context: http://apache-wicket.1842946.n4.nabble.com/Hybrid-palette-with-DropDownChoice-and-ListView-tp4664445p4664448.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr

Re: How to make a Wiket DropDownChoice with complex a model return a simple String

2014-02-13 Thread Andrea Del Bene
: targetModel.setObject(getChoiceRenderer().getIdValue(newSelection, choiceIndex)); was really helpful and I was able to get everything working. Thanks again. Have you ever consider making this available to the Wicket community? I see a lot of questions related to DropDownChoice, but not many answers

Re: Feedback Messages prevent DropDownChoice updating Textfields

2014-02-12 Thread Daniela L
and a catch all Feedback Panel in wicket 6.12.0. Everything works fine except for the case when a user causes a error which is shown in the Feedback Panel of the Component, e.g. the Textfield firstName is left empty. After that the select of the DropDownChoice does not update the Textfields anymore

Re: How to make a Wiket DropDownChoice with complex a model return a simple String

2014-02-12 Thread Andrea Del Bene
(newSelection, choiceIndex)); } } Hi, I needed something similar in a couple of projects. One solution is to create a custom DropDownChoice which takes also the string model to update. Then you can override onModelChanged to update the string model with the new value that can be extracted

RE: How to make a Wiket DropDownChoice with complex a model return a simple String

2014-02-12 Thread Bruce Lombardi
)); was really helpful and I was able to get everything working. Thanks again. Have you ever consider making this available to the Wicket community? I see a lot of questions related to DropDownChoice, but not many answers. - Bruce -Original Message- From: Andrea Del Bene [mailto:an.delb

Fwd: Feedback Messages prevent DropDownChoice updating Textfields

2014-02-11 Thread Daniela L
that the select of the DropDownChoice does not update the Textfields anymore. Where is my mistake? Thanks a lot in advance. Daniela Here is my code: public class EditEmployeePage extends BasePage { private FormComponentString firstName; private DropDownChoiceEmployee employeeDDC; private final

How to make a Wiket DropDownChoice with complex a model return a simple String

2014-02-11 Thread Bruce Lombardi
To make this easier to understand, let's say that I have a list of state abbreviations for example AL, AK, AZ, AR etcetera (the actual example has two letter abbreviations also, but much longer names). I need a DropDownChoice that shows the abbreviations for selection (e.g., AK) but will show

Re: How to make a Wiket DropDownChoice with complex a model return a simple String

2014-02-11 Thread Andrea Del Bene
Hi, I needed something similar in a couple of projects. One solution is to create a custom DropDownChoice which takes also the string model to update. Then you can override onModelChanged to update the string model with the new value that can be extracted with the ChoiceRenderer. To make

Re: Problem with FormTester and selection on dropDownChoice

2014-01-06 Thread Sven Meier
); formTester.setValue(textField, FOO); formTester.select(dropDownChoice, 0); // ony add this select FormTester formTester2 = this.tester.newFormTester(form); formTester2.submit(); assertEquals(FOO, page.getFormValue()); But the result is the same, the value seems to not be set. -- View

Re: Problem with FormTester and selection on dropDownChoice

2014-01-06 Thread Kev
I made a quickstart project: testWicket.zip http://apache-wicket.1842946.n4.nabble.com/file/n4663490/testWicket.zip -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-FormTester-and-selection-on-dropDownChoice-tp4663439p4663490.html Sent from the Users

Re: Problem with FormTester and selection on dropDownChoice

2014-01-06 Thread Sven Meier
Thanks for the quickstart. Sorry, I was wrong :(. When you select a dropDownChoice' value via FormTester#select(), this won't trigger a complete Form submit (as it would in the browser). Only the dropDownChoice is processed. The following should work: FooPage page = this.tester.startPage

Re: Problem with FormTester and selection on dropDownChoice

2014-01-06 Thread Kev
Actually, we don't need a second formTester, just setting the value after perform the select with the same formTester is working : FooPage page = this.tester.startPage(FooPage.class); FormTester formTester = this.tester.newFormTester(form); formTester.select(dropDownChoice, 0); // ony add

Re: Problem with FormTester and selection on dropDownChoice

2014-01-06 Thread Sven Meier
I haven't tried it, but the following should work: FormTester formTester = this.tester.newFormTester(form); formTester.select(dropDownChoice, 0); formTester.select(dropDownChoice2, 0); // the new form tester will transfer all field values into the request

Re: Problem with FormTester and selection on dropDownChoice

2014-01-06 Thread Kev
Yes it works. Thank you very much. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-FormTester-and-selection-on-dropDownChoice-tp4663439p4663495.html Sent from the Users forum mailing list archive at Nabble.com

Re: Problem with FormTester and selection on dropDownChoice

2014-01-05 Thread Kev
I think I don't understood. I try to create an other FormTester to perform the submit() like that: FooPage page = this.tester.startPage(FooPage.class); FormTester formTester = this.tester.newFormTester(form); formTester.setValue(textField, FOO); formTester.select(dropDownChoice, 0); // ony add

Problem with FormTester and selection on dropDownChoice

2014-01-03 Thread Kev
Hi, I have a form with a text field and a dropdownchoice with the OnSelectionChangedNotification enabled. When I try to test this form with a formTester, the method seems to reset the text field value. There is not this behavior when I start the app normally. Is it a bug, or is it my test who

Re: Problem with FormTester and selection on dropDownChoice

2014-01-03 Thread Martin Grigorov
Hi, On Fri, Jan 3, 2014 at 6:15 PM, Kev kevin.se...@intesens.com wrote: Hi, I have a form with a text field and a dropdownchoice with the OnSelectionChangedNotification enabled. When I try to test this form with a formTester, the method seems to reset the text field value

Re: Problem with FormTester and selection on dropDownChoice

2014-01-03 Thread Kev
if the onSelectoinChanged() is empty. But in my app what I do is to pre-fill and disable some things in the form according to the selection. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-FormTester-and-selection-on-dropDownChoice-tp4663439p4663442.html Sent from

Re: Problem with FormTester and selection on dropDownChoice

2014-01-03 Thread Sven Meier
formTester.setValue(textField, FOO); This sets a value for textField in the next request. formTester.select(dropDownChoice, 0); This sets a value for dropDownChoice into the next request and starts request processing. The values for textField and dropDownChoice are store in the input

Wicket DropDownChoice Question about Constructors and its Behavior

2013-09-26 Thread Patrick Davids
Hi all, since I'm working with Wicket I am a bit confused about the Constructors of DropDownChoice Class. DropDownChoice provides Constructors without any Model or ModelObject. e.g. (id, List choices) This is logical in an use-case, for instance, having just a page with a SelectBox and my

Re: Wicket DropDownChoice Question about Constructors and its Behavior

2013-09-26 Thread Martin Grigorov
Hi, This use case will work only when the DropDownChoice has a parent in the hierarchy with org.apache.wicket.model.IComponentInheritedModel, like org.apache.wicket.model.CompoundPropertyModel. In this case the dropdown will use a slot from its parent's IComponentInheritedModel. On Thu, Sep 26

Re: Wicket DropDownChoice Question about Constructors and its Behavior

2013-09-26 Thread Ernesto Reinaldo Barreiro
with Wicket I am a bit confused about the Constructors of DropDownChoice Class. DropDownChoice provides Constructors without any Model or ModelObject. e.g. (id, List choices) This is logical in an use-case, for instance, having just a page with a SelectBox and my first click is about to choose

Re: Wicket DropDownChoice Question about Constructors and its Behavior

2013-09-26 Thread Patrick Davids
choices) a exclude my DropDownChoice from the hierarchy? Patrick Am 26.09.2013 09:47, schrieb Martin Grigorov: Hi, This use case will work only when the DropDownChoice has a parent in the hierarchy with org.apache.wicket.model.IComponentInheritedModel, like

Re: Wicket DropDownChoice Question about Constructors and its Behavior

2013-09-26 Thread Paul Borș
a constuctor with an empty model (id, new Model(), List choices) a exclude my DropDownChoice from the hierarchy? Patrick Am 26.09.2013 09:47, schrieb Martin Grigorov: Hi, This use case will work only when the DropDownChoice has a parent in the hierarchy

  1   2   3   4   5   6   7   8   9   10   >