Query<?> query = ids.isEmpty() ? new Search(page).toQuery(page.getSite()) : Query.fromAll().where("_id = ?", ids);
long count = query.count();
ObjectType type = ObjectType.getInstance(page.param(UUID.class, "typeId"));
State state = State.getInstance(type.createObject(page.param(UUID.class, "id")));
state.clear();
page.writeHeader();
if (page.isFormPost() &&
page.param(String.class, "action-save") != null) {
try {