strange behaviour with ItemPresentationModel

12 views
Skip to first unread message

Johnny TwoShoes

unread,
Apr 14, 2016, 1:31:25 PM4/14/16
to RoboBinding
hi

I am using ItemPresentationModel for a spinner. I add a row to a listview which contains this spinner. I load the spinner with 6 states. When I create a new entry in the listview, it should select the first option (Please Select), which it does. But, when I start adding other rows to the listview, and select an option for the spinner, new row entries do not select the first option anymore (Please Select), but seem to select the values from the previous row, maybe the first row. so, example, here are the rows:
1. dummy1    abc    Please Select   commentAAA
2.  dummy2    abc    Please Select   commentBBB

if I select something from the spinner from 1 and 2, so it looks like:
1. dummy1    abc    cat  commentAAA
2.  dummy2    abc    dog   commentBBB


if I add a new row
3. dummy3   abc   cat   commentCCC

row 3 will show cat, even though the value is Please select


how do I refresh the spinner???



kind regards

wei cheng

unread,
Apr 14, 2016, 10:59:17 PM4/14/16
to robob...@googlegroups.com
Hi Johnny,

It is possible for you to make a smallest sample and send it to weich...@gmail.com? I will have a look when i am next available. Thanks.

Cheers, Cheng

--
You received this message because you are subscribed to the Google Groups "RoboBinding" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robobinding...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Johnny TwoShoes

unread,
Apr 15, 2016, 5:46:11 AM4/15/16
to RoboBinding
Hi Cheng,

My fault. Silly me! I wasted so much time on this. I was missing bind:selectedItemPosition="${indexofSpinner}" in the xml file
Once I added that on, the spinner is fine. Without it, lots of randomness.

kind regards

wei cheng

unread,
Apr 15, 2016, 6:03:33 AM4/15/16
to robob...@googlegroups.com

Great.

Reply all
Reply to author
Forward
0 new messages