listview not getting updated

12 views
Skip to first unread message

Johnny TwoShoes

unread,
Jan 3, 2016, 11:31:42 AM1/3/16
to RoboBinding
Hi,

I have a ViewModel that inserts a row in the Model, but the View is not getting updated? I'm using AspectJ, so, I'm not calling fireChangeProperty.
The Model has the new row inserted. Only when I re-run the app, I can see the row inside the listview. Should I call fireChangeProperty manually? But, according to the docs, I don't need to ?

any suggestions?

regards

Johnny TwoShoes

unread,
Jan 3, 2016, 2:55:16 PM1/3/16
to RoboBinding
Hi,

I got it to work, by creating a dummy variable, that I refresh it so, (excuse any typos, I renamed a few things for the email) eg
xml listview:
<ListView
bind:source="{parts}"
...>
In ViewModel:
 @ItemPresentationModel(value=XXItemPresentationalModel.class)
    @DependsOnStateOf("dummy")
    public List<Part> getParts() {return parts;}

so, the listview only gets updated, if I reset this dummy variable, ie parts getting updated is not enough to get it to refresh? so, calling setDummy(getDummy()); will refresh the listview.


Any thoughts please??

regards
Reply all
Reply to author
Forward
0 new messages