Hello OpenMRS Dev,Is anyone successfully using the HTML Form Entry Schema preview screen successfully with Nested Obs Groups [1]
I've been having issues looking at the Schema's for my forms, where the output of the page chokes halfway through because of exceptions being thrown in the JSP. I've tracked it down to a section of htmlFormSchema.jsp, where it tries to run through the Groups. Exceptions are thrown because not everything it's going over has the properties it's trying to access, so I don't believe they are all of the same type. I eventually got it to work after removing all the instances of nested obsgroup tags in my form. Attached is a patch (which isn't meant to be useful) to show where I've been debugging, and eventually wrapped it in a c:catch so the entire page would render.
I saw a few tickets related to Schema Preview, but nothing that sounded like this. Before I go too much farther, just want to see if folks with forms with nested obsgroups are able Preview their Schemas. Also, the actual form generation and entry works fine, it's just this schema preview.
Cheers, Steve[1] Support for which the wiki said was added a few versions of HTML Form Entry ago.
_________________________________________ To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [email protected] with "SIGNOFF openmrs-devel-l" in the body (not the subject) of your e-mail. [mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]
diff --git a/omod/src/main/webapp/htmlFormSchema.jsp
b/omod/src/main/webapp/htmlFormSchema.jsp
index 9a336d6..bae3de7 100644
--- a/omod/src/main/webapp/htmlFormSchema.jsp
+++ b/omod/src/main/webapp/htmlFormSchema.jsp
@@ -121,18 +121,23 @@
<c:forEach items="${schema.sections}" var="section">
<div class="box">
- <div class="boxHeader" style="background-color:yellow;
color:black; font-weight:bold;">${section.name}</div>
+ <div class="boxHeader" style="background-color:yellow;
color:black; font-weight:bold;">SWG 1 ${section.name}</div>
<c:forEach items="${section.fields}" var="field">
<c:choose>
<c:when test="${field.class.name ==
'org.openmrs.module.htmlformentry.schema.ObsGroup'}">
<div class="box">
<div
class="boxHeader">${field.concept.displayString}
(${field.concept.conceptId})</div>
<c:forEach
items="${field.children}" var="child">
+ <strong>SWG Type:
${child.class.name}</strong>
+ <c:catch var="err1">
<table>
<tr>
<th>Concept:</th>
<td>
-
${child.name} ->
+
SWG Test 4
+
<c:catch var="err">
+
${child.name} ->
+
</c:catch>
<a style="color:green;" target="_blank"
href="${pageContext.request.contextPath}/dictionary/concept.htm?conceptId=${child.question.conceptId}">
${child.question.displayString} (${child.question.conceptId})
</a>
@@ -149,7 +154,7 @@
</a>
</c:when>
<c:otherwise>
-
${child.question.datatype.name}
+
SWG9 <!-- ${child.question.datatype.name}
-->
</c:otherwise>
</c:choose>
</td>
@@ -169,6 +174,7 @@
</c:choose>
</tr>
</table>
+ </c:catch>
</c:forEach>
</div>
</c:when>
@@ -193,7 +199,7 @@
</a>
</c:when>
<c:otherwise>
-
${field.question.datatype.name}
+
SWG8 <!-- ${field.question.datatype.name} -->
</c:otherwise>
</c:choose>
</td>
_________________________________________
To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to
[email protected] with "SIGNOFF openmrs-devel-l" in the body (not
the subject) of your e-mail.
[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

