private void generateBotsList()
{
Collection bots = ((BotsRunner)Rep.getParticipant("com.uwyn.drone.core.DroneParticipant").getObject()).getBots();
Iterator bots_it = bots.iterator();
Bot bot = null;
while (bots_it.hasNext())
{
bot = (Bot)bots_it.next();
mTemplate.setValue("botname", encodeHtml(bot.getName()));
mTemplate.setValue("connected_nick", encodeHtml(bot.getConnectedNick()));
mTemplate.setValue("nicks", encodeHtml(bot.getNick()+", "+bot.getAltNick()));
if (bot.isPaused())
{
setSubmissionForm(mTemplate, "resume", new String[] {"bot_to_resume", bot.getName()});
mTemplate.setBlock("actions", "action_resume");
}
else
{
setSubmissionForm(mTemplate, "pause", new String[] {"bot_to_pause", bot.getName()});
mTemplate.setBlock("actions", "action_pause");
}
setExitForm(mTemplate, "change_nick", new String[] {"botname", bot.getName()});
setSubmissionForm(mTemplate, "reconnect", new String[] {"bot_to_reconnect", bot.getName()});
mTemplate.appendBlock("actions", "action_reconnect");
mTemplate.appendBlock("actions", "action_changenick");
mTemplate.appendBlock("bots", "bot");
}