Using the multifield in your cq5 component
Here a small example how to use a multifield inside your component or in your OSGi-component.
When you have created a dialog with a multifield and you have entered some values, you see that the value itself is stored as a String-array.

When you now want to access the values in your component, the following will not work :
1. ${properties.applicationProperties}
This will print the object-reference
2. <%=properties.get("applicationProperties","default")%>
This will print only the first entry of the String-array.
Here some samples that will give you a handle to loop through the values :
<!-- using JSTL in your component -->
<c:forEach var="element" items="${properties.applicationProperties}">
In the loop ${element}
</c:forEach>
<!-- using Java-code -->
String[] applicationProperties = (String[]) getProperties().get("applicationProperties", String[].class);
for(String value: applicationProperties ) {
// do something with the value
}
Thanks in advance