Search code examples
androidodkjavarosa

Android Javarosa innerText repeat groups


I am trying to retrieve the innerTexts of a repeated group but I am unable to retrieve the appearance attribute or the hint. The other two hint tags i can retrieve. Any pointers?

<group>
              <label ref="jr:itext('/data/question0/question3/question6:label')" />
                <appearance>Evil</appearance>
                <hint>Stuff</hint>
              <repeat nodeset="/data/question0/question3/question6">
                <input ref="/data/question0/question3/question6/question7">
                  <label ref="jr:itext('/data/question0/question3/question6/question7:label')" />
                    <hint>I work</hint>
                  <hint ref="jr:itext('/data/question0/question3/question6/question7:hint')" />
                </input>
                <input ref="/data/question0/question3/question6/question8">
                  <label ref="jr:itext('/data/question0/question3/question6/question8:label')" />
                    <hint>So do I</hint>
                  <hint ref="jr:itext('/data/question0/question3/question6/question8:hint')" />
                </input>
              </repeat>

Solution

  • Not sure what you mean with 'retrieve the innerTexts' but maybe the following clarifies the issue you're experiencing.

    The appearance is only supported as an attribute on form control elements and group elements. See also http://opendatakit.github.io/odk-xform-spec (though admittedly appearance attributes are not well covered there).

    I don't think the hint element is supported as a child of the group element. It is only supported as a child of form control elements.