<?xml version="1.0" encoding="UTF-8"?>
<Scene Scope="Project" version="2">
<Scope Scope="Faces Configuration Only">
+ <Node id="admin/admin_logout.xhtml" x="650" y="150" zoom="true"/>
+ <Node id="user/login.xhtml" x="150" y="300" zoom="true"/>
+ <Node id="admin/index.xhtml" x="400" y="300" zoom="true"/>
+ <Node id="user/lost_passwd.xhtml" x="400" y="450" zoom="true"/>
+ <Node id="*" x="1150" y="150" zoom="true"/>
+ <Node id="terms.xhtml" x="400" y="150" zoom="true"/>
<Node id="bye.xhtml" x="150" y="450" zoom="true"/>
- <Node id="index.xhtml" x="900" y="150" zoom="true"/>
<Node id="privacy.xhtml" x="650" y="300" zoom="true"/>
- <Node id="*" x="1150" y="150" zoom="true"/>
+ <Node id="index.xhtml" x="900" y="150" zoom="true"/>
<Node id="imprint.xhtml" x="150" y="600" zoom="true"/>
<Node id="admin/category.xhtml" x="650" y="450" zoom="true"/>
- <Node id="admin/index.xhtml" x="400" y="300" zoom="true"/>
<Node id="user/register.xhtml" x="150" y="150" zoom="true"/>
- <Node id="admin/admin_logout.xhtml" x="650" y="150" zoom="true"/>
- <Node id="terms.xhtml" x="400" y="150" zoom="true"/>
<Node id="admin/product.xhtml" x="900" y="300" zoom="true"/>
- <Node id="user/lost_passwd.xhtml" x="400" y="450" zoom="true"/>
- <Node id="user/login.xhtml" x="150" y="300" zoom="true"/>
</Scope>
<Scope Scope="Project">
- <Node id="bye.xhtml" x="650" y="300" zoom="true"/>
- <Node id="index.xhtml" x="650" y="600" zoom="true"/>
- <Node id="user/register_done.xhtml" x="1150" y="300" zoom="true"/>
+ <Node id="admin/admin_logout.xhtml" x="400" y="600" zoom="true"/>
+ <Node id="user/login.xhtml" x="900" y="150" zoom="true"/>
<Node id="login/login_edit_address.xhtml" x="150" y="300" zoom="true"/>
- <Node id="privacy.xhtml" x="400" y="750" zoom="true"/>
+ <Node id="login/login_edit_user_data.xhtml" x="1150" y="150" zoom="true"/>
+ <Node id="login/login_other_addressbooks.xhtml" x="650" y="450" zoom="true"/>
+ <Node id="user/lost_passwd.xhtml" x="900" y="300" zoom="true"/>
<Node id="*" x="650" y="150" zoom="true"/>
- <Node id="imprint.xhtml" x="900" y="450" zoom="true"/>
+ <Node id="terms.xhtml" x="150" y="600" zoom="true"/>
+ <Node id="login/login_own_addressbooks.xhtml" x="400" y="150" zoom="true"/>
+ <Node id="user/register_done.xhtml" x="1150" y="300" zoom="true"/>
+ <Node id="bye.xhtml" x="650" y="300" zoom="true"/>
<Node id="user/login_error.xhtml" x="1400" y="150" zoom="true"/>
+ <Node id="privacy.xhtml" x="400" y="750" zoom="true"/>
+ <Node id="admin/admin_index.xhtml" x="400" y="450" zoom="true"/>
+ <Node id="index.xhtml" x="650" y="600" zoom="true"/>
<Node id="login/login_user_list.xhtml" x="150" y="150" zoom="true"/>
+ <Node id="imprint.xhtml" x="900" y="450" zoom="true"/>
+ <Node id="login/login_index.xhtml" x="150" y="750" zoom="true"/>
<Node id="user/register.xhtml" x="400" y="300" zoom="true"/>
- <Node id="login/login_other_addressbooks.xhtml" x="650" y="450" zoom="true"/>
<Node id="user/resend_link.xhtml" x="150" y="450" zoom="true"/>
- <Node id="login/login_index.xhtml" x="150" y="750" zoom="true"/>
- <Node id="login/login_own_addressbooks.xhtml" x="400" y="150" zoom="true"/>
- <Node id="admin/admin_index.xhtml" x="400" y="450" zoom="true"/>
- <Node id="terms.xhtml" x="150" y="600" zoom="true"/>
- <Node id="admin/admin_logout.xhtml" x="400" y="600" zoom="true"/>
- <Node id="user/lost_passwd.xhtml" x="900" y="300" zoom="true"/>
- <Node id="user/login.xhtml" x="900" y="150" zoom="true"/>
- <Node id="login/login_edit_user_data.xhtml" x="1150" y="150" zoom="true"/>
</Scope>
<Scope Scope="All Faces Configurations">
+ <Node id="admin/admin_logout.xhtml" x="650" y="150" zoom="true"/>
+ <Node id="user/login.xhtml" x="150" y="300" zoom="true"/>
+ <Node id="admin/index.xhtml" x="400" y="300" zoom="true"/>
+ <Node id="user/lost_passwd.xhtml" x="400" y="450" zoom="true"/>
+ <Node id="*" x="1150" y="150" zoom="true"/>
+ <Node id="terms.xhtml" x="400" y="150" zoom="true"/>
<Node id="bye.xhtml" x="150" y="450" zoom="true"/>
- <Node id="index.xhtml" x="900" y="150" zoom="true"/>
<Node id="privacy.xhtml" x="650" y="300" zoom="true"/>
- <Node id="*" x="1150" y="150" zoom="true"/>
+ <Node id="index.xhtml" x="900" y="150" zoom="true"/>
<Node id="imprint.xhtml" x="150" y="600" zoom="true"/>
<Node id="admin/category.xhtml" x="650" y="450" zoom="true"/>
- <Node id="admin/index.xhtml" x="400" y="300" zoom="true"/>
<Node id="user/register.xhtml" x="150" y="150" zoom="true"/>
- <Node id="admin/admin_logout.xhtml" x="650" y="150" zoom="true"/>
- <Node id="terms.xhtml" x="400" y="150" zoom="true"/>
<Node id="admin/product.xhtml" x="900" y="300" zoom="true"/>
- <Node id="user/lost_passwd.xhtml" x="400" y="450" zoom="true"/>
- <Node id="user/login.xhtml" x="150" y="300" zoom="true"/>
</Scope>
</Scene>
*/
package org.mxchange.addressbook.beans.addressbook;
+import java.util.ArrayList;
import java.util.List;
+import javax.annotation.PostConstruct;
import javax.enterprise.context.SessionScoped;
import javax.faces.view.facelets.FaceletException;
import javax.inject.Inject;
}
}
+ @PostConstruct
+ public void init () {
+ // Init list
+ this.addressbookList = new ArrayList<>(0);
+
+ // Is the user logged-in?
+ if (this.loginController.isLoggedIn()) {
+ // Fill list with entries
+ this.addressbookList = this.addressbookBean.getUsersList(this.loginController.getLoggedInUser());
+ }
+ }
+
@Override
public boolean hasCreatedAddressbooks () {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ // Is the user logged in?
+ if (!this.loginController.isLoggedIn()) {
+ // Not logged in
+ throw new FaceletException("This method can only be called as logged-in user.");
+ }
+
+ // Check if the list is filled
+ return (!this.addressbookList.isEmpty());
}
}