*/
package org.mxchange.jfinancials.beans.businesscontact;
-import java.util.List;
import javax.annotation.PostConstruct;
import javax.enterprise.context.SessionScoped;
import javax.faces.view.facelets.FaceletException;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
-import org.mxchange.jcontactsbusiness.BusinessBasicData;
import org.mxchange.jcontactsbusiness.BusinessDataAdminSessionBeanRemote;
import org.mxchange.jcountry.data.Country;
import org.mxchange.jfinancials.beans.BaseFinancialsController;
*/
private BusinessDataAdminSessionBeanRemote adminBusinessDataBean;
- /**
- * A list of all registered companies (globally)
- */
- private List<BusinessBasicData> businessContacts;
-
/**
* Comments for this company
*/
super();
}
- @Override
- @SuppressWarnings ("ReturnOfCollectionOrArrayField")
- public List<BusinessBasicData> allBusinessContacts () {
- return this.businessContacts;
- }
-
/**
* Getter for comments
* <p>
// Throw again
throw new FaceletException(e);
}
-
- // Init user's contact list
- this.businessContacts = this.adminBusinessDataBean.allBusinessContacts();
}
}
package org.mxchange.jfinancials.beans.businesscontact;
import java.io.Serializable;
-import java.util.List;
import javax.ejb.Local;
-import org.mxchange.jcontactsbusiness.BusinessBasicData;
/**
* An interface for session-scoped financial controller
@Local
public interface FinancialsAdminBusinessContactWebRequestController extends Serializable {
- /**
- * Returns a list of all business contacts
- * <p>
- * @return A list of all business contacts
- */
- List<BusinessBasicData> allBusinessContacts ();
-
}
*/
package org.mxchange.jfinancials.beans.businesscontact;
+import java.util.List;
import javax.annotation.PostConstruct;
import javax.enterprise.context.RequestScoped;
import javax.faces.view.facelets.FaceletException;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
+import org.mxchange.jcontactsbusiness.BusinessBasicData;
+import org.mxchange.jcontactsbusiness.BusinessDataAdminSessionBeanRemote;
import org.mxchange.jcontactsbusiness.BusinessDataSessionBeanRemote;
import org.mxchange.jcountry.data.Country;
import org.mxchange.jfinancials.beans.BaseFinancialsController;
*/
private static final long serialVersionUID = 56_189_028_928_371L;
+ /**
+ * Remote contact bean
+ */
+ private BusinessDataAdminSessionBeanRemote adminBusinessDataBean;
+
+ /**
+ * A list of all registered companies (globally)
+ */
+ private List<BusinessBasicData> businessContacts;
+
/**
* Remote contact bean
*/
super();
}
+ @Override
+ @SuppressWarnings ("ReturnOfCollectionOrArrayField")
+ public List<BusinessBasicData> allBusinessContacts () {
+ return this.businessContacts;
+ }
+
/**
* Getter for comments
* <p>
// Try to lookup
this.businessDataBean = (BusinessDataSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/businessContact!org.mxchange.jcontactsbusiness.BusinessContactSessionBeanRemote"); //NOI18N
+
+ // Try to lookup
+ this.adminBusinessDataBean = (BusinessDataAdminSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/adminBusinessData!org.mxchange.jcontactsbusiness.BusinessDataAdminSessionBeanRemote"); //NOI18N
} catch (final NamingException e) {
// Throw again
throw new FaceletException(e);
}
+
+ // Init user's contact list
+ this.businessContacts = this.adminBusinessDataBean.allBusinessContacts();
}
}
package org.mxchange.jfinancials.beans.businesscontact;
import java.io.Serializable;
+import java.util.List;
import javax.ejb.Local;
+import org.mxchange.jcontactsbusiness.BusinessBasicData;
/**
* An interface for session-scoped financial controller
@Local
public interface FinancialsBusinessContactWebSessionController extends Serializable {
+ /**
+ * Returns a list of all business contacts
+ * <p>
+ * @return A list of all business contacts
+ */
+ List<BusinessBasicData> allBusinessContacts ();
+
}
</ui:define>
<ui:define name="content">
- <ui:fragment rendered="#{adminBusinessDataController.allBusinessContacts().isEmpty()}">
+ <ui:fragment rendered="#{businessDataController.allBusinessContacts().isEmpty()}">
<ui:include src="/WEB-INF/templates/generic/message_box.tpl">
<ui:param name="message" value="#{msg.ADMIN_CONTACT_BUSINESS_LIST_EMPTY}" />
<ui:param name="styleClass" value="errors" />
</ui:include>
</ui:fragment>
- <h:dataTable id="table_list_business_contacts" var="businessContact" value="#{adminBusinessDataController.allBusinessContacts()}" styleClass="table_full" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_CONTACT_BUSINESS}" rendered="#{not adminBusinessDataController.allBusinessContacts().isEmpty()}">
+ <h:dataTable id="table_list_business_contacts" var="businessContact" value="#{businessDataController.allBusinessContacts()}" styleClass="table_full" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_CONTACT_BUSINESS}" rendered="#{not businessDataController.allBusinessContacts().isEmpty()}">
<h:column>
<f:facet name="header">
<h:outputText value="#{msg.ADMIN_CONTACT_BUSINESS_ID}" />