dialog.xml
<values
jcr:primaryType="nt:unstructured"
fieldLabel=“Values”
name="./values"
xtype="multifield"/>
JSP
<c:forEach items="${properties. values}" var="value" varStatus="loop">
<c:if test="${loop.index == 0}">
${value}
</c:if>
<c:if test="${loop.index != 0}">
and ${value}
</c:if>
</c:forEach>
For this multi-field when author enters only one Value as "Some text , Some text2"
JSP displays : "Some text and Some text2" . Adding ',' in the single multifield value converts it to an array (I think) . Is this the default implementation for multifield ?
But When Author Enters two separate values for Multi-field :
"Some text , Some text2 "
"Some text , Some text2 "
JSP displays it correctly : Some text , Some text2 and Some text , Some text2
Solved! Go to Solution.
Views
Replies
Total Likes
It's a pretty easy fix - in your dialog, change the definition to this:
<values jcr:primaryType="nt:unstructured" fieldLabel=“Values” name="./values" typeHint="String" xtype="multifield"/>
Note the "typeHint" - this forces the value to be saved as a string array when used in a multi-field.
Views
Replies
Total Likes
Yup,
I guess we faced similar issue with multifield long back, It would be great to raise a day care ticket for this, seems to be a bug
Views
Replies
Total Likes
It's a pretty easy fix - in your dialog, change the definition to this:
<values jcr:primaryType="nt:unstructured" fieldLabel=“Values” name="./values" typeHint="String" xtype="multifield"/>
Note the "typeHint" - this forces the value to be saved as a string array when used in a multi-field.
Views
Replies
Total Likes