Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public String viewPeople() {
- if (SaveDiscardContext.isTransactionDirty()) {
- SaveDiscardContext.openPopup();
- return null;
- }
- if (null != mainViewObject && null != getMainViewObject()) {
- Key currentRowKey = null;
- if (null != getMainViewObject().getCurrentRow())
- currentRowKey = getMainViewObject().getCurrentRow().getKey();
- log.debug("currentRowKey:" + currentRowKey);
- refreshPeopleList();
- log.debug("query executed");
- if (null != currentRowKey) {
- Row[] rows = getMainViewObject().findByKey(currentRowKey, 1);
- if (rows != null && rows.length ==1) {
- getMainViewObject().setCurrentRow(rows[0]);
- log.debug("currentRowKey: " + rows[0]);
- }
- }
- } else
- refreshPeopleList();
- if (null == getMainViewObject().getCurrentRow()) {
- getMainViewObject().setCurrentRow(getMainViewObject().first());
- }
- if (null != getMainViewObject().getCurrentRow())
- ContextBean.getCurrent().setSelectedPersonId((Integer)getMainViewObject().getCurrentRow().getAttribute("PersonId"));
- return "people";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement