final Template template= mainTemplate;
String requestURL= ServiceLocator.getInstance().getParametersHandler().getRequestURL();
final String requestURL2= requestURL.substring(0, requestURL.indexOf("?") + 1);
final RequestUrlActivityMapper requestUrlActivityMapper= serviceFactory.createSyncService(RequestUrlActivityMapper.class);
List<Class<? extends DragomeVisualActivity>> visualActivities= requestUrlActivityMapper.getExistingVisualActivities();
new TemplateRepeater<Class<? extends DragomeVisualActivity>>().repeatItems(visualActivities, new ItemProcessorImpl<Class<? extends DragomeVisualActivity>>(template, "row")
{
public void fillTemplates(final Class<? extends DragomeVisualActivity> visualActivity, List<Template> aRowTemplate)
{
VisualLink link= new VisualLinkImpl("view", visualActivity.getSimpleName());
link.addClickListener(new ClickListener()
{
public void clickPerformed(VisualComponent aVisualComponent)
{
openPage(ServiceLocator.getInstance().getReflectionService().createClassInstance(visualActivity));
}
});
String alias= requestUrlActivityMapper.getActivityAlias(visualActivity);
VisualPanel rowPanel= new VisualPanelImpl(aRowTemplate.get(0));
rowPanel.addChild(new VisualLabelImpl<String>("classname", visualActivity.getName()));
String href= requestURL2 + (alias.length() == 0 ? visualActivity.getSimpleName() : alias);
VisualLink link2= new VisualLinkImpl("link", href, href);