use of com.twinsoft.convertigo.beans.core.UrlMapping in project convertigo by convertigo.
the class UrlMappingWizardPage method dialogChanged.
private void dialogChanged() {
DatabaseObject dbo = ((ObjectExplorerWizardPage) getWizard().getPage("ObjectExplorerWizardPage")).getCreatedBean();
if (dbo != null && dbo instanceof UrlMapping) {
String path = getPath();
if (path.length() == 0) {
updateStatus("Path must be specified");
return;
}
if (!path.startsWith("/")) {
updateStatus("Path must start with \"/\"");
return;
}
if (parentObject != null && parentObject instanceof UrlMapper) {
UrlMapper urlMapper = (UrlMapper) parentObject;
if (urlMapper.getMappingByPath(path) != null) {
updateStatus("This mapping path already exists");
return;
}
UrlMapping urlMapping = (UrlMapping) dbo;
urlMapping.setPath(path);
}
}
updateStatus(null);
}
Aggregations