You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by mniel0 <mn...@tdcnetdesign.dk> on 2016/07/22 06:14:54 UTC
DropDownChoice in a listview not updating model - With ajax
Hi wicket forum!
I've been stuck with this problem for a while now, and frankly it is
starting to piss me off :P
So lets get down to business!
I have a editor page where the user should be able to edit all kind of
information. The thing i have problems with is that it doesn't seem to
fill/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/file/n4675176/5.png>
As you can see on the picture, there is two options.. if i pick the first
option, it seems to work perfectly and it gets information about it. But if
i pick the second option, it seem to get the same information as the first
choice....
"EditorPage.java"
<http://apache-wicket.1842946.n4.nabble.com/file/n4675176/1.png>
Ive marked where i add my panels.
The rest of editorpage.java:
<http://apache-wicket.1842946.n4.nabble.com/file/n4675176/2.png>
Now for the panel that is added to the editorpage...
<http://apache-wicket.1842946.n4.nabble.com/file/n4675176/3.png>
Ive marked the model with a circle.
<http://apache-wicket.1842946.n4.nabble.com/file/n4675176/4.png>
The ajax code seems to work, as it updates the other dropdowns etc, but i am
not sure wether it is ajax or something else that causes the problems with
the viewSet Model to get updated? This is my first project where i ever use
ajax, so any help would be appreciated.
If you need more information please let me know :)
Thanks a bunch!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-in-a-listview-not-updating-model-With-ajax-tp4675176.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-help@wicket.apache.org
Re: DropDownChoice in a listview not updating model - With ajax
*SOLVED*
Posted by mniel0 <mn...@tdcnetdesign.dk>.
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 uniqueID to use in my choicerenderer:
ChoiceRenderer rendrer = new ChoiceRenderer("Name", "UniqueID");
Which is basically just a combination of the providerid + the name.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-in-a-listview-not-updating-model-With-ajax-tp4675176p4675183.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-help@wicket.apache.org
Re: DropDownChoice in a listview not updating model - With ajax
Posted by Sven Meier <sv...@meiers.net>.
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-tp4675176p4675180.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-help@wicket.apache.org