nested repeat ignores jr:count

Issue #4 resolved
Yaw Anokwa
created an issue

if you specify a jr:count and a jr:noaddremove="true()" on repeat x nested inside a repeat y, the repeat x will repeat forever.

removing jr:noaddremove has no effect on this bug.

Comments (3)

  1. Yaw Anokwa reporter

    the form below breaks the core.

    java.lang.ClassCastException: java.lang.String
    	at org.javarosa.form.api.FormEntryModel.createModelIfNecessary(
    	at org.javarosa.form.api.FormEntryModel.setQuestionIndex(
    	at org.javarosa.form.api.FormEntryController.jumpToIndex(
    	at org.javarosa.form.api.FormEntryController.stepEvent(
    	at org.javarosa.form.api.FormEntryController.stepToNextEvent(
    <?xml version="1.0"?>
    <h:html xmlns="" xmlns:h="" xmlns:ev="" xmlns:xsd="" xmlns:jr="">
    		<h:title>Repeat Bug</h:title>
    				<data id="repeat_bug">
    			<label>repeat node</label>
    			<repeat nodeset="/data/repeat_node" jr:count="/data/repeat_count" jr:noAddRemove="true()">
    				<input ref="/data/repeat_node/repeat_string">
    					<label>this should repeat <output value="/data/repeat_count"/> times and finish</label>
  2. Anonymous

    just tested using a version of javarosa from the ODK trunk and it looks like this issue has not yet been fixed.

    Steven Nsubuga

  3. Log in to comment