made server gui work and auto generate xml imports
This commit is contained in:
parent
01b3b5cc54
commit
c259e28e44
69 changed files with 1669 additions and 1230 deletions
|
|
@ -40,6 +40,7 @@ import net.forwardfire.vasc.core.VascController;
|
|||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryAccessType;
|
||||
import net.forwardfire.vasc.core.VascEntryControllerLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascEntryFieldLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryGroupLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryLinkType;
|
||||
|
|
@ -297,6 +298,39 @@ public class MetaModelSchemaAutoEntry {
|
|||
ve.setDisplayNameFieldId(c.getName());
|
||||
}
|
||||
}
|
||||
|
||||
// Some auto detection on fields so default imported list view looks oke on 8++ columns.
|
||||
if (ve.getVascEntryFields().size()>8) {
|
||||
List<String> vefListIds = new ArrayList<String>(20);
|
||||
for (VascEntryField vef:ve.getVascEntryFields()) {
|
||||
String id = vef.getId().toLowerCase();
|
||||
if ( id.contains("create") |
|
||||
id.contains("update") |
|
||||
id.contains("delete") |
|
||||
id.contains("classname") |
|
||||
id.contains("description")
|
||||
) {
|
||||
vef.setList(false);
|
||||
}
|
||||
if (ve.getDisplayNameFieldId()!=null && ve.getDisplayNameFieldId().equals(vef.getId())) {
|
||||
continue;
|
||||
}
|
||||
if (ve.getPrimaryKeyFieldId()!=null && ve.getPrimaryKeyFieldId().equals(vef.getId())) {
|
||||
continue;
|
||||
}
|
||||
if (vef.getList()!=null && vef.getList()==false) {
|
||||
continue;
|
||||
}
|
||||
vefListIds.add(vef.getId());
|
||||
}
|
||||
if (vefListIds.size()<8) {
|
||||
List<String> vefListFalseIds = vefListIds.subList(8-1, vefListIds.size());
|
||||
for (String key:vefListFalseIds) {
|
||||
VascEntryField vef = ve.getVascEntryFieldById(key);
|
||||
vef.setList(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue