* @param element contained element.
* @param name element name
* @throws Exception
*/
public void addElementAfter(String id, GenericFormElement element, String afterId) throws Exception {
LinkedMap newElements = new LinkedMap();
if (!getElements().containsKey(afterId))
throw new AraneaRuntimeException("The element '" + afterId + "' does not exist!");
for (Iterator i = elements.entrySet().iterator(); i.hasNext();) {
Map.Entry entry = (Map.Entry) i.next();
newElements.put(entry.getKey(), entry.getValue());
if (entry.getKey().equals(afterId)) {
newElements.put(id, element);
}
}
if (isInitialized())
addWidget(id, element);