Closed GoogleCodeExporter closed 9 years ago
confirmed on 1.1.4 and is likely a serious javarosa bug.
Original comment by yanokwa
on 23 Jul 2010 at 7:37
I looked into this a bit further. I think it's likely javarosa bug related to
loading saved instances, but it may also be that Collect isn't initializing
something correctly.
All of your data is still actually saved (just select the first question and
start going forward, it'll all be there). It appears that the data model isn't
being completely rebuilt when loading a saved instance.
The HierarchyActivity just traverses the tree, it doesn't "save" any answers to
the data model. For this form, there's a branch after the consent question,
which if it's no (or null, in this case) it takes you to the end. This is the
correct default behavior. If after you've loaded your saved instance, you
select the consent question, you'll see that 'yes' is selected. If you
navigate either forward or backwards, it "saves" the answer to the data model,
causes the form constraints to be reevaluated, and rebuilds the model. If you
go back to the hierarchy view, all of the questions will appear now.
I'm not sure if this is JavaRosa's fault, or if we're not correctly
initializing something. I'll get in touch with them and post what I discover.
Original comment by carlhart...@gmail.com
on 24 Jul 2010 at 4:36
Actually, also with this particular form. text within <value/> tags can't have
spaces, so the checkbox questions might not load the answers again properly.
<item>
<label>I like to ride my bicycle</label>
<value>I like to ride my bike</value> <--- ** BAD
<item>
<item>
<label>I like to ride my bicycle</label>
<value>bike</value> <--- ** GOOD
<item>
Original comment by carlhart...@gmail.com
on 24 Jul 2010 at 4:48
it's not the value that is the problem. see attached form which validates and
parses with no warnings.
Original comment by yanokwa
on 24 Jul 2010 at 5:04
Attachments:
agreed, the main problem is the first one I described.
In addition, however, there were spaces in some of the <value/> fields in the
original form so when loading a saved instance, only one selected item in a
select-multi form would be repopulated. Just trying to make sure everything is
solved.
Original comment by carlhart...@gmail.com
on 24 Jul 2010 at 5:15
This issue was closed by revision 5b4d205edf.
Original comment by carlhart...@gmail.com
on 24 Jul 2010 at 5:39
The problem was that we were initializing then importing data, needed to import
first, then initialize. Will be released in whatever v1.1.4 +1 ends up being.
Original comment by carlhart...@gmail.com
on 24 Jul 2010 at 5:42
Original issue reported on code.google.com by
johnweso...@gmail.com
on 31 May 2010 at 10:47Attachments: