Form form;
TextField nsUriTextField;
boolean defaultWs;
public WorkspaceNewPage() {
WorkspaceInfo ws = getCatalog().getFactory().createWorkspace();
form = new Form( "form", new CompoundPropertyModel( ws ) ) {
@Override
protected void onSubmit() {
Catalog catalog = getCatalog();
WorkspaceInfo ws = (WorkspaceInfo) form.getModelObject();
NamespaceInfo ns = catalog.getFactory().createNamespace();
ns.setPrefix ( ws.getName() );
ns.setURI(nsUriTextField.getModelObjectAsString());
catalog.add( ws );
catalog.add( ns );
if(defaultWs)