use of com.autentia.tnt.bean.document.DocumentBean in project TNTConcept by autentia.
the class UserBean method goDocuments.
/**
* Saves and goes to user's document category
*/
public String goDocuments() {
User currentUser = user;
final Integer userId = user.getId();
// Save user's data
save();
// Prepares the category bean filter
final DocumentBean documentBean = (DocumentBean) FacesUtils.getBean("documentBean");
final List<DocumentCategory> categories = new ArrayList<DocumentCategory>();
categories.add(currentUser.getDocumentCategory());
documentBean.setSearchCategoriesValid(true);
documentBean.setSearchCategories(categories);
documentBean.getSearch().setOwnerId(userId);
return "goDocuments";
}
Aggregations