XhtmlControl xhtml = new XhtmlControl(getWorkspace());
xhtml.append("Per consultar el contingut de les dades que s'introdueixen en aquest formulari, consultar l'exemple de Grid Control.");
pc.addContent(xhtml, ContentColumns.MAIN);
DynamicMessageControl message = new DynamicMessageControl(getWorkspace(), ID_MSG);
pc.addContent(message, ContentColumns.MAIN);
try
{
FormControl form = new FormControl(getWorkspace(), "OrmWeatherForm");
form.addGroup(Weather.class);
pc.addContent(form, ContentColumns.MAIN);
}
catch (InvalidMappingException ex)
{
DynamicMessageControl msg = (DynamicMessageControl) pc.getControl(ID_MSG);
msg.setVisible(true);
msg.setType(DynamicMessageControl.MessageTypes.Error);
msg.setMessage("ERROR: " + ex.getMessage());
}
return pc;
}