Search in sources :

Example 1 with DocumentBean

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";
}
Also used : User(com.autentia.tnt.businessobject.User) DocumentBean(com.autentia.tnt.bean.document.DocumentBean) ArrayList(java.util.ArrayList) DocumentCategory(com.autentia.tnt.businessobject.DocumentCategory)

Aggregations

DocumentBean (com.autentia.tnt.bean.document.DocumentBean)1 DocumentCategory (com.autentia.tnt.businessobject.DocumentCategory)1 User (com.autentia.tnt.businessobject.User)1 ArrayList (java.util.ArrayList)1