for (int i = 0; i < frames.length; i++) {
Frame frame = frames[i];
if (!frame.isLocked()) {
Widget showlet = showletsToRender[i];
if (null != showlet && allowedShowlets.contains(showlet.getType().getCode())) {
WidgetCheckInfo info = new WidgetCheckInfo(showlet.getType(), true, currentLang);
allowedShowlets.remove(showlet.getType().getCode());
checkInfos.add(info);
}
}
}
for (int i = 0; i < allowedShowlets.size(); i++) {
String code = allowedShowlets.get(i);
WidgetType type = customizableShowlets.get(code);
WidgetCheckInfo info = new WidgetCheckInfo(type, false, currentLang);
checkInfos.add(info);
}
BeanComparator comparator = new BeanComparator("title");
Collections.sort(checkInfos, comparator);
this.pageContext.setAttribute(this.getVar(), checkInfos);