// Create the virtual pagelet, define properties and elements
PageletImpl pagelet = new PageletImpl(module.getIdentifier(), rendererId);
if (properties != null) {
for (Map.Entry<String, String> property : properties.entrySet()) {
pagelet.addProperty(property.getKey(), property.getValue());
}
}
if (elements != null) {
for (Language l : elements.languages()) {
for (Map.Entry<String, String> element : elements.get(l).entrySet()) {