I am running into a couple issues that I'm hitting a brick wall on and looking for other opinions on what is happening.
First issue is I am getting an Uncaught Syntax Error: expected expression got '}' from an onchange on a drop down.
<div id="questionResponse${bean?.id}ControlCroup" class="control-group">
<div class="controls">
<g:hiddenField name="reviewQuestionResponse.${bean?.id}.id" value="${bean?.id}" />
<g:select class="input-block-level" name="reviewQuestionResponse.${bean?.id}.response" from="${com.moo.qwr.enums.QuestionResponseType.values()}" value="${value}"
onchange="${remoteFunction(controller: 'reviewQuestionResponse', action: 'update', id: "${bean?.id}",
params: '\'response=\' + this.value',
onSuccess: "jQuery(\"#reviewSaveNotice\").stop(true).fadeIn().delay(1500).fadeOut();jQuery('#questionResponse${bean?.id}ControlGroup').removeClass('error');updateQuestionScore(data);" +
remoteFunction(
controller: 'review', action: 'renderScore', id: "${bean.reviewSection.review.id}",
update: 'scoreTotal'
) + ";" + remoteFunction( controller: 'review', action: 'renderSectionScore', id: "${bean.reviewSection.id}", update: "sectionScore${bean.reviewSection.id}"),
onFailure: "jQuery('#questionResponse${bean?.id}ControlGroup').addClass('error')"
)}"
/>
</div>
This code was working in previous versions of grails but is now giving the error after moving to Grails 5.3.
My second issue is on loading of a form screen for editing and creating, one area is a cause of a lot of speed issues. Create is only a few seconds, but on edit it is coming up to 8 - 10 minutes. Previous version was seconds but still long.
<g:each status="fieldIdx" in="${reviewInstance.fields}" var="it">
<g:if test="${fieldIdx % 3 == 0}">
<div class="row-fluid">
</g:if>
<div class="span4">
<g:render template="reviewFields/${ClassUtils.getShortNameAsProperty(it?.class)}/input" model="[reviewInstance: reviewInstance, reviewField : it]"/>
</div>
<g:if test="${fieldIdx % 3 == 2}">
</div>
</g:if>
</g:each>
When I throw a breakpoint on the g:each line, it comes to that point quickly, however when it tries to go to the next line, it is taking a long period of time.
The domain that review instance does have this inside it
List additionalRecipients = []
List managers = []
List reviewSections = []
List comments = []
SortedSet fields
ScoreSummary scoreSummary
static hasMany = [
reviewSections : ReviewSection,
fields : ReviewField,
additionalRecipients: UserProfile,
managers: UserProfile,
comments : ReviewComment
]
Any insight is appreciated. Thank you