|
|
@ -10,6 +10,8 @@ import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.springframework.dao.DataIntegrityViolationException;
|
|
|
|
import org.springframework.dao.DataIntegrityViolationException;
|
|
|
|
import org.springframework.security.access.AccessDeniedException;
|
|
|
|
import org.springframework.security.access.AccessDeniedException;
|
|
|
|
import org.zkoss.bind.BindUtils;
|
|
|
|
import org.zkoss.bind.BindUtils;
|
|
|
@ -266,11 +268,37 @@ public class ListViewModel<T extends DataModel> {
|
|
|
|
newRec = false;
|
|
|
|
newRec = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, String[]> map = Executions.getCurrent().getParameterMap();
|
|
|
|
|
|
|
|
int id = -1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
if (map.get("select") != null) {
|
|
|
|
|
|
|
|
id = Integer.parseInt(map.get("select")[0]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (NumberFormatException e) {
|
|
|
|
|
|
|
|
Logger logger = LoggerFactory.getLogger(this.getClass());
|
|
|
|
|
|
|
|
logger.warn("ID is not number: " + map.get("select")[0]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (id > 0) {
|
|
|
|
|
|
|
|
for (int i = 0; i < dataList.size(); i++) {
|
|
|
|
|
|
|
|
if (dataList.get(i).getId() == id) {
|
|
|
|
|
|
|
|
selIndex = i;
|
|
|
|
|
|
|
|
beforeSelectViaUrl();
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (selIndex > -1) {
|
|
|
|
if (selIndex > -1) {
|
|
|
|
this.setDataBean(dataList.get(selIndex));
|
|
|
|
this.setDataBean(dataList.get(selIndex));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void beforeSelectViaUrl() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Command
|
|
|
|
@Command
|
|
|
|
@NotifyChange("dataBean")
|
|
|
|
@NotifyChange("dataBean")
|
|
|
|
public void onSort(@BindingParam("column") String column) {
|
|
|
|
public void onSort(@BindingParam("column") String column) {
|
|
|
|