import repositories kontor-java and kontor-ee
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
apply plugin: 'war'
|
||||
|
||||
version = '0.0.1'
|
||||
|
||||
dependencies {
|
||||
compile project(':TradingCardsImpl')
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.peetz.tradingcards.view;
|
||||
|
||||
import com.peetz.tradingcards.dal.SportDao;
|
||||
import com.peetz.tradingcards.service.SportService;
|
||||
import java.io.Serializable;
|
||||
import java.util.logging.Logger;
|
||||
import javax.ejb.EJB;
|
||||
import javax.faces.bean.ManagedBean;
|
||||
import javax.faces.bean.RequestScoped;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author tpeetz
|
||||
*/
|
||||
@ManagedBean(name="TradingCardsView")
|
||||
@RequestScoped
|
||||
public class SportView implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1399103334723066025L;
|
||||
|
||||
private static final Logger LOG = Logger.getLogger(SportView.class.getName());
|
||||
|
||||
private String name;
|
||||
|
||||
@EJB
|
||||
private SportService sportService;
|
||||
|
||||
public SportView() {
|
||||
LOG.info("SportView created");
|
||||
}
|
||||
|
||||
public Integer getSportNumber() {
|
||||
LOG.info("SportView#getSportNumber");
|
||||
return sportService.getAllSports().size();
|
||||
}
|
||||
|
||||
public Integer getTeamNumber() {
|
||||
LOG.info("SportView#getTeamNumber");
|
||||
return sportService.getAllTeams().size();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
LOG.info("SportView#getName");
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
sportService.addSport(name);
|
||||
LOG.info("SportView#setName");
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.peetz.tradingcards.view;
|
||||
|
||||
import com.peetz.tradingcards.service.TradingcardService;
|
||||
import java.io.Serializable;
|
||||
import java.util.logging.Logger;
|
||||
import javax.ejb.EJB;
|
||||
import javax.faces.bean.ManagedBean;
|
||||
import javax.faces.bean.RequestScoped;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TPEETZ
|
||||
*/
|
||||
@ManagedBean(name="TradingCardsView")
|
||||
@RequestScoped
|
||||
public class TradingCardsView implements Serializable {
|
||||
|
||||
private static final Logger LOG = Logger.getLogger(TradingCardsView.class.getName());
|
||||
|
||||
@EJB
|
||||
private TradingcardService tradingcardService;
|
||||
|
||||
private static final long serialVersionUID = -8261128991042235283L;
|
||||
|
||||
public TradingCardsView() {
|
||||
LOG.info("TradingCardsView created");
|
||||
}
|
||||
|
||||
public Integer getManufacturerNumber() {
|
||||
return tradingcardService.getAllManufacturers().size();
|
||||
}
|
||||
|
||||
public Integer getSportCardNumber() {
|
||||
return tradingcardService.getAllSportCards().size();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<html>
|
||||
<head><title>TradingCards Application</title></head>
|
||||
<body bgcolor="white">
|
||||
<table border="0" width="100%" height="100%" cellpadding="5">
|
||||
<colgroup>
|
||||
<col width="10%">
|
||||
<col width="80%">
|
||||
<col width="10%">
|
||||
</colgroup>
|
||||
<!-- Kopfbereich -->
|
||||
<tr bgcolor="lightgrey" height="10%">
|
||||
<td align="center" colspan="3"><b>TradingCards Manager</b></td>
|
||||
</tr>
|
||||
<!-- Hauptbereich -->
|
||||
<tr>
|
||||
<!-- Linker Navigationsbereich -->
|
||||
<td bgcolor="tan" valign="top" with="100">test</td>
|
||||
<td bgcolor="wheat" valign="top">
|
||||
<p>TradingCards Manager</p>
|
||||
<a href="index.jsp">Show the card list</a>
|
||||
</td>
|
||||
<!-- Rechter Navigationsbereich -->
|
||||
<td bgcolor="tan" with="15%"> </td>
|
||||
</tr>
|
||||
<!-- Fussbereich -->
|
||||
<tr bgcolor="lightgrey" height="10%">
|
||||
<td align="right" colspan="3">
|
||||
<p>Ingenieurbüro Thomas Peetz</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user