#PostConstruct initialize is not getting invoked implicitly - jsf

Using -Primefaces 3.4 + JSF 2.0-
I am displaying some drop down values from database and the Postconstruct initialize method is not getting invoke implicitly.
Its working when I am calling the init method from other bean.
xhtml code:
<p:panelGrid style="width:50%" styleClass="panelgrid">
<p:row>
<p:column styleClass="columnA" style="width:10%">#{msgs.partTypeTitle}</p:column>
<p:column styleClass="columnB">
<h:selectOneMenu id="partTypeDpDnId" value="#{ppcrDetails.newPpcr.selectedPartType}" style="width:150px;font-size:13px;" >
<f:selectItems value="#{ppcrDetails.newPpcr.partsType}" />
</h:selectOneMenu>
</p:column>
</p:row>
<p:row>
<p:column styleClass="columnA" style="width:25%">#{msgs.familyTitle}</p:column>
<p:column styleClass="columnB">
<h:selectOneMenu id="familyDpDnId" value="#{ppcrDetails.newPpcr.selectedFamilyValues}" style="width:150px;font-size:13px;">
<f:selectItems value="#{ppcrDetails.newPpcr.familyValues}" />
</h:selectOneMenu>
</p:column>
</p:row>
</p:panelGrid>
-Bean:
#ManagedBean(name = "newPpcr" , eager = true)
#SessionScoped
public class NewPpcr implements Serializable {
#PostConstruct
public void initialize() throws QtException {
LOGGER.log(Level.DEBUG, "QuotationTool: NewPpcr initilize.");
partsType.clear();
List<MdPartsType> partList = partsTypeFacade.findAll();
int partSequence = 0;
for (MdPartsType part : partList) {
partsType.add(new SelectItem(partSequence++, part.getPartType()));
}
familyValues.clear();
List<MdFamily> familyList = familyFacade.findAll();
int familySequence = 0;
for (MdFamily family : familyList) {
familyValues.add(new SelectItem(familySequence++, family.getFamily()));
}
}
But this is not working, So I am calling initialize method from other bean then drop down is populating:
#ManagedBean(name = "ppcrDetails", eager = true)
#SessionScoped
public class PpcrDetails implements Serializable{
private List<SelectItem> partType = new ArrayList<SelectItem>();
private List<SelectItem> familyValues = new ArrayList<SelectItem>();
public List<SelectItem> getPartType() {
try {
partType.clear();
if (partType == null || partType.isEmpty()) {
newPpcr.initialize();
this.partType = newPpcr.getPartsType();
}
} catch (QtException e) {
LOGGER.error(e.getMessage(), e);
}
return partType;
}
public void setPartType(List<SelectItem> partType) {
this.partType = partType;
}
public List<SelectItem> getFamilyValues() {
try {
familyValues.clear();
if (familyValues == null || familyValues.isEmpty()) {
newPpcr.initialize();
this.familyValues = newPpcr.getFamilyValues();
}
} catch (QtException e) {
LOGGER.error(e.getMessage(), e);
}
return familyValues;
}
public void setFamilyValues(List<SelectItem> familyValues) {
this.familyValues = familyValues;
}
From this approach I am able to display the values but it is breaking the some functionality.

Related

jsf static list won't show up in datatable

I'm trying to get a list to show in datatable from managed bean to JSF page but it doesn't work.
it's telling me " not records found " .
JSF managed bean :
#ManagedBean
#RequestScoped
public class TestController {
private List<Rhnom> list = new ArrayList<Rhnom>();
#SuppressWarnings("serial")
private List<String> list2 = new ArrayList<String>() {{
add("s1");
add("s2");
add("s3");
}};
//getters and setters
JSF page :
<p:dataTable value="#{tesController.list2}" var="type">
<p:column headerText="Lib">
<h:outputText value="#{type}">
</h:outputText>
</p:column>
</p:dataTable>
I consider that you have problems with the implementation
Link
https://www.primefaces.org/showcase/ui/data/datatable/basic.xhtml
Example
<p:dataTable var="car" value="#{dtBasicView.cars}">
<p:column headerText="Id">
<h:outputText value="#{car.id}" />
</p:column>
<p:column headerText="Year">
<h:outputText value="#{car.year}" />
</p:column>
<p:column headerText="Brand">
<h:outputText value="#{car.brand}" />
</p:column>
<p:column headerText="Color">
<h:outputText value="#{car.color}" />
</p:column>
</p:dataTable>
Managebean
#Named("dtBasicView")
#ViewScoped
public class BasicView implements Serializable {
private List<Car> cars;
#Inject
private CarService service;
#PostConstruct
public void init() {
cars = service.createCars(10);
}
public List<Car> getCars() {
return cars;
}
public void setService(CarService service) {
this.service = service;
}
}
Java Class
#Named
#ApplicationScoped
public class CarService {
private final static String[] colors;
private final static String[] brands;
static {
colors = new String[10];
colors[0] = "Black";
colors[1] = "White";
colors[2] = "Green";
colors[3] = "Red";
colors[4] = "Blue";
colors[5] = "Orange";
colors[6] = "Silver";
colors[7] = "Yellow";
colors[8] = "Brown";
colors[9] = "Maroon";
brands = new String[10];
brands[0] = "BMW";
brands[1] = "Mercedes";
brands[2] = "Volvo";
brands[3] = "Audi";
brands[4] = "Renault";
brands[5] = "Fiat";
brands[6] = "Volkswagen";
brands[7] = "Honda";
brands[8] = "Jaguar";
brands[9] = "Ford";
}
public List<Car> createCars(int size) {
List<Car> list = new ArrayList<Car>();
for(int i = 0 ; i < size ; i++) {
list.add(new Car(getRandomId(), getRandomBrand(), getRandomYear(), getRandomColor(), getRandomPrice(), getRandomSoldState()));
}
return list;
}
private String getRandomId() {
return UUID.randomUUID().toString().substring(0, 8);
}
private int getRandomYear() {
return (int) (Math.random() * 50 + 1960);
}
private String getRandomColor() {
return colors[(int) (Math.random() * 10)];
}
private String getRandomBrand() {
return brands[(int) (Math.random() * 10)];
}
private int getRandomPrice() {
return (int) (Math.random() * 100000);
}
private boolean getRandomSoldState() {
return (Math.random() > 0.5) ? true: false;
}
public List<String> getColors() {
return Arrays.asList(colors);
}
public List<String> getBrands() {
return Arrays.asList(brands);
}
}

Row selection for dataTable inside dataGrid is not working in Primefaces

I am using primefaces For displaying a datagrid of datatables as follow -
Facelets page:
<h:form name="form">
<p:dataGrid value="#{routeEditingBean.routes}" var="route"
columns="1">
<p:column>
<h:outputText value="#{route.routeId}" />
</p:column>
<p:dataTable value="#{route.routeDetailses}" var="rd"
rowKey="rd.id.employeeId"
selection="#{routeEditingBean.selectedRouteDetails}">
<p:column>
<h:outputText value="#{rd.id.employeeId}" />
</p:column>
<p:column selectionMode="multiple">
</p:column>
</p:dataTable>
<p:commandLink process="#all"
actionListener="#{routeEditingBean.display()}">
<p:graphicImage library="images" name="add-car.jpg"></p:graphicImage>
</p:commandLink>
</p:dataGrid>
</h:form>
Backing-bean:
#ManagedBean
#ViewScoped
public class RouteEditingBean implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
List<RouteMaster> routes;
List<RouteDetails> selectedRouteDetails;
RouteMaster delrb;
public RouteEditingBean() {
// TODO Auto-generated constructor stub
routes = new ArrayList<RouteMaster>();
Session session = HibernateUtil.getSessionFactory().openSession();
org.hibernate.Transaction transaction = null;
try {
HttpSession httpsession = (HttpSession) FacesContext
.getCurrentInstance().getExternalContext()
.getSession(false);
LoginBean lb = (LoginBean) httpsession.getAttribute("loginBean");
transaction = session.beginTransaction();
Criteria c = session.createCriteria(RouteMaster.class);
List routeMasterList = c.list();
for (Iterator iterator = routeMasterList.iterator(); iterator
.hasNext();) {
RouteMaster routeMaster = (RouteMaster) iterator.next();
System.out.println(routeMaster.getRouteId());
c = session.createCriteria(RouteDetails.class);
c.add(Restrictions.eq("id.routeId", routeMaster.getRouteId()));
Set<RouteDetails> routeDetailses = new HashSet<RouteDetails>();
for (Iterator iterator1 = c.list().iterator(); iterator1
.hasNext();) {
RouteDetails rd = (RouteDetails) iterator1.next();
routeDetailses.add(rd);
}
routeMaster.setRouteDetailses(routeDetailses);
routes.add(routeMaster);
}
} catch (HibernateException e) {
transaction.rollback();
e.printStackTrace();
} finally {
session.close();
}
}
public List<RouteMaster> getRoutes() {
return routes;
}
public void setRoutes(List<RouteMaster> routes) {
this.routes = routes;
}
public RouteMaster getDelrb() {
return delrb;
}
public void setDelrb(RouteMaster delrb) {
this.delrb = delrb;
}
public List<RouteDetails> getSelectedRouteDetails() {
return selectedRouteDetails;
}
public void setSelectedRouteDetails(List<RouteDetails> selectedRouteDetails) {
this.selectedRouteDetails = selectedRouteDetails;
}
public void deleteEmployee(RouteMaster rm, RouteDetails rd) {
System.out.println(rm.getRouteId());
System.out.println(rd.getId().getEmployeeId());
}
public void display() {
System.out.println("Inside display");
if (selectedRouteDetails == null) {
System.out.println("No selection");
} else {
for (Iterator iterator = selectedRouteDetails.iterator(); iterator
.hasNext();) {
RouteDetails rd1 = (RouteDetails) iterator.next();
System.out.println(rd1.getId().getEmployeeId());
}
}
}
}
When form is Submitted then selected values are returning null. I want to get selected values for all dataTable in dataGrid. Please help.
can you try it this way
List<RouteDetails> selectedRouteDetails = new ArrayList<RouteDetails>();
or
public RouteEditingBean() {
selectedRouteDetails = new ArrayList<RouteDetails>();
.....
}

primefaces not show dataTable values with lazyModel

I'm starting with primefaces and I try use LazyModel in p:dataTable.
I already implemented the LazyModel, bean and jsf. The call's to bean and model occur's correctly and my bean return a list with elements, but my jsf show nothing.
Please, somebody know whats happen?
Bellow is my code:
JSF:
<ui:composition template="./newTemplate.xhtml">
<ui:define name="content">
content
<h:form>
<p:panel id="formFiltro">
<p:messages id="messages"/>
<h:panelGrid>
<h:outputLabel for="fieldConta" value="Número da Conta:"/>
<p:inputText id="fieldConta" value="#{log.nrConta}" label="Número da Conta">
<f:convertNumber integerOnly="true" type="number"/>
</p:inputText>
<!--<p:message for="fieldConta" />-->
<h:outputLabel for="fieldAgencia" value="Código da Agência:"/>
<p:inputText id="fieldAgencia" value="#{log.nrAgencia}" label="Código da Agência">
<f:convertNumber integerOnly="true" type="number"/>
</p:inputText>
<!--<p:message for="fieldAgencia" />-->
<center>
<p:commandButton ajax="false" value="Pesquisar" action="#{log.search}" />
</center>
</h:panelGrid>
</p:panel>
<p:dataTable var="l" value="#{log.lazyLogModel}" paginator="true" rows="5"
paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
rowsPerPageTemplate="5,10,15" id="logTable" lazy="true">
<p:column headerText="ID">
<h:outputText value="#{l.logId}" />
</p:column>
<p:column headerText="Agência">
<h:outputText value="#{l.logAgencia}" />
</p:column>
<p:column headerText="Conta">
<h:outputText value="#{l.logConta}" />
</p:column>
<p:column headerText="SO">
<h:outputText value="#{l.logSo}" />
</p:column>
<p:column headerText="Plugin">
<h:outputText value="#{l.logVersaoPlugin}" />
</p:column>
<p:column headerText="Tam F10">
<h:outputText value="#{l.logTamF10}" />
</p:column>
</p:dataTable>
</h:form>
</ui:define>
</ui:composition>
My bean:
#ManagedBean(name="log")
#RequestScoped
public class consultaJsf implements Serializable {
private static final long serialVersionUID = 1L;
/**
* Creates a new instance of consultaJsf
*/
private List<TbLogLog> listaLog;
private LazyLogModel lazyLogModel;
private int nrConta;
private int nrAgencia;
public consultaJsf() {
try{
//this.listaLog = new ConsultarDados().getListLogAll();
}catch(Exception e){
e.printStackTrace();
}
}
#PostConstruct
public void init()
{
this.lazyLogModel = new LazyLogModel();
}
public List<TbLogLog> getListaLog()
{
return listaLog;
}
public int getNrConta()
{
return nrConta;
}
public void setNrConta(int nrConta)
{
this.nrConta = nrConta;
}
public int getNrAgencia()
{
return nrAgencia;
}
public void setNrAgencia(int nrAgencia)
{
this.nrAgencia = nrAgencia;
}
public LazyLogModel getLazyLogModel()
{
return this.lazyLogModel;
}
public String search() throws Exception
{
if(nrConta != 0)
this.listaLog = new ConsultarDados().getListLogByConta(nrConta);
else if(nrAgencia != 0)
this.listaLog = new ConsultarDados().getListLogByAgencia(nrAgencia);
return null;
}
}
My LazyModel:
public class LazyLogModel extends LazyDataModel<TbLogLog> {
private String nrConta;
private String cdAgencia;
#Override
public List<TbLogLog> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, String> filters) {
List<TbLogLog> listaLog = null;
try{
listaLog = new ConsultarDados().getListLogAll(first, pageSize);
}catch(Exception e){
return null;
}
return listaLog;
}
/**
* #return the nrConta
*/
public String getNrConta() {
return nrConta;
}
/**
* #param nrConta the nrConta to set
*/
public void setNrConta(String nrConta) {
this.nrConta = nrConta;
}
/**
* #return the cdAgencia
*/
public String getCdAgencia() {
return cdAgencia;
}
/**
* #param cdAgencia the cdAgencia to set
*/
public void setCdAgencia(String cdAgencia) {
this.cdAgencia = cdAgencia;
}
}
Consult Method called by LazyModel:
private List<TbLogLog> getListLog(String hql, int firstResult, int sizePage) throws Exception {
List resultList = null;
try {
Session session = HubernateUtil.getSessionFactory().openSession();
if ((hql == null) || (hql.trim().length() == 0)) {
hql = QUERY_PESQUISAR_TODOS;
}
Query q = session.createQuery(hql);
if(firstResult > 0 )
q.setFirstResult(firstResult);
if(sizePage > 0)
q.setMaxResults(sizePage);
resultList = q.list();
} catch (HibernateException he) {
he.printStackTrace();
}
return resultList;
}
Everything work's fine, but my jsf don't show any result.
Thanks in advance.
Remove the init() in consultaJsf Class and update the getLazyLogModel() as follows
#ManagedBean(name="log")
#RequestScoped
public class consultaJsf implements Serializable {
private static final long serialVersionUID = 1L;
/**
* Creates a new instance of consultaJsf
*/
private List<TbLogLog> listaLog;
private LazyLogModel<TbLogLog> lazyLogModel;
private int nrConta;
private int nrAgencia;
public consultaJsf() {
try{
//this.listaLog = new ConsultarDados().getListLogAll();
}catch(Exception e){
e.printStackTrace();
}
}
public List<TbLogLog> getListaLog()
{
return listaLog;
}
public int getNrConta()
{
return nrConta;
}
public void setNrConta(int nrConta)
{
this.nrConta = nrConta;
}
public int getNrAgencia()
{
return nrAgencia;
}
public void setNrAgencia(int nrAgencia)
{
this.nrAgencia = nrAgencia;
}
public LazyLogModel<TbLogLog> getLazyLogModel()
{
if (lazyLogModel== null) {
lazyLogModel= new LazyDataModel<TbLogLog>() {
#Override
public List<TbLogLog> load(int first, int pageSize, String sortField,
SortOrder sortOrder, Map<String, String> filters) {
List<TbLogLog> listaLog = null;
try{
listaLog = new ConsultarDados().getListLogAll(first, pageSize);
}catch(Exception e){
return null;
}
return listaLog;
}
};
}
return listaLog;
}
public String search() throws Exception
{
if(nrConta != 0)
this.listaLog = new ConsultarDados().getListLogByConta(nrConta);
else if(nrAgencia != 0)
this.listaLog = new ConsultarDados().getListLogByAgencia(nrAgencia);
return null;
}
}

How to render graphicImage in dataTable based on a column value?

I have a dataTable, containing Package objects with id and phaseList attributes. I would like this dataTable to display package id and its five phases status with some graphicImages like colored circles.
For example: If a package's phase one is completed, the first circle rendered in a progress column is a green one, other four are red ones.
So basically I need to render a circle based on a value from phaseList element attribute. I already accomplished all of this, but it seems to me that there should be some other way. The problem is that I must have five phase color attributes in a backing bean and five getters and setters for those attributes (see code below). In those getters there is very similar code for all five attributes, so I thought I should have just one color attribute and one getter and there should somehow get an information which circle is currently rendered.
Is there any other way (with less duplicated code) to render those circles?
public class Package implements Serializable {
private static final long serialVersionUID = 1L;
private BigDecimal id;
private List<PhaseStatus> phaseList;
public BigDecimal getId() {
return id;
}
public void setId(BigDecimal id) {
this.id = id;
}
public void setPhaseList(List<PhaseStatus> phaseList) {
this.phaseList= phaseList;
}
public List<PhaseStatus> getPhaseList() {
return phaseList;
}
}
PhaseStatus class:
public class PhaseStatus implements Serializable {
private static final long serialVersionUID = 1L;
private BigDecimal phaseId;
private BigDecimal phaseStatus;
private String hint;
public void setPhaseId(BigDecimal phaseId) {
this.phaseId = phaseId;
}
public BigDecimal getPhaseId() {
return phaseId;
}
public void setPhaseStatus(BigDecimal phaseStatus) {
this.phaseStatus = phaseStatus;
}
public BigDecimal getPhaseStatus() {
return phaseStatus;
}
public void setHint(String hint) {
this.hint = hint;
}
public String getHint() {
return hint;
}
}
Xhtml code:
<p:column headerText="Id">
<p:outputLabel value="#{item.id}" />
</p:column>
<p:column headerText="Progress">
<p:commandLink id="lnkPhase1">
<p:graphicImage library="icons" name="#{bean.phaseOneColor}" width="24px" height="24px" />
</p:commandLink>
<p:tooltip id="hint1" for="lnkPhase1" value="#{bean.phaseOneHint}" />
<p:commandLink id="lnkPhase2">
<p:graphicImage library="icons" name="#{bean.phaseTwoColor}" width="24px" height="24px" />
</p:commandLink>
<p:tooltip id="hint2" for="lnkPhase2" value="#{bean.phaseTwoHint}" />
<p:commandLink id="lnkPhase3">
<p:graphicImage library="icons" name="#{bean.phaseThreeColor}" width="24px" height="24px" />
</p:commandLink>
<p:tooltip id="hint3" for="lnkPhase3" value="#{bean.phaseThreeHint}" />
<p:commandLink id="lnkPhase4">
<p:graphicImage library="icons" name="#{bean.phaseFourColor}" width="24px" height="24px" />
</p:commandLink>
<p:tooltip id="hint4" for="lnkPhase4" value="#{bean.phaseFourHint}" />
<p:commandLink id="lnkPhase5">
<p:graphicImage library="icons" name="#{bean.phaseFiveColor}" width="24px" height="24px" />
</p:commandLink>
<p:tooltip id="hint5" for="lnkPhase5" value="#{bean.phaseFiveHint}" />
</p:column>
Part of my backing bean:
private String phaseOneColor;
private String phaseTwoColor;
private String phaseThreeColor;
private String phaseFourColor;
private String phaseFiveColor;
private DataTable dtPackages;
one of the getter's:
public String getPhaseOneColor() {
Package myPackage = (Package) getDtPackages().getRowData();
List<PhaseStatus> list = myPackage.getPhaseList();
BigDecimal status = list.get(0).getPhaseStatus();
if (status != null) {
switch (status.intValue()) {
case 1:
phaseOneColor = "green.png";
break;
default:
phaseOneColor = "red.png";
break;
}
} else {
phaseOneColor = "red.png";
}
return phaseOneColor;
}
I'm using PrimeFaces 5.1.
What about something like this
public String getPhaseColor(int phase) {
Package package = (Package) getDtPackages().getRowData();
List<PhaseStatus> list = package.getPhaseList();
BigDecimal status = list.get(phase).getPhaseStatus();
if (status != null) {
switch (status.intValue()) {
case 1:
phaseColor = "green.png";
break;
default:
phaseColor = "red.png";
break;
}
} else {
phaseColor = "red.png";
}
return phaseColor;
}
Similar for tooltips
public String getPhaseTooltip(int phase) {
Package package = (Package) getDtPackages().getRowData();
List<PhaseStatus> list = package.getPhaseList();
BigDecimal status = list.get(phase).getPhaseStatus();
String tooltip = null;
if (status != null) {
switch (status.intValue()) {
case n:
tooltip = "Phase " + phase + " tooltip";
break;
default:
}
} else {
tooltip = "probably error";
}
return tooltip;
}
And you use this in page like this
<p:column headerText="Progress">
<ui:repeat var="phase" value="#{item.phaseList}" varStatus="status">
<p:commandLink id="lnkPhase#{status.index + 1}">
<p:graphicImage library="icons" name="#{bean.getPhaseColor(status.index + 1)}" width="24px" height="24px" />
</p:commandLink>
<p:tooltip id="hint#{status.index + 1}" for="lnkPhase#{status.index + 1}" value="#{bean.getPhaseTooltip(status.index + 1)}" />
</ui:repeat>
</p:column>
There might be some errors in the code since I'm typing it in here directly, but you'll get the idea.
UPDATE
For Java 5 (method invocations with parameters doesn't work), you could do something like this
public Map<Integer, String> getPhaseColors() {
Package package = (Package) getDtPackages().getRowData();
Map<Integer, String> phaseColors = new HashMap<Integer, String>();
if (package != null) {
List<PhaseStatus> list = package.getPhaseList();
for (int i = 0; i < list.size(); i++;) {
BigDecimal ps = list.get(i).getPhaseStatus();
if (ps != null) {
phaseColors.put(i, ps.intValue() == 1 ? "green.png" : "red.png");
} else {
phaseColors.put(i, "red.png");
}
}
}
return phaseColor;
}
<p:graphicImage library="icons" name="#{bean.phaseColors[status.index + 1]}" width="24px" height="24px" />
Similar for tooltips.

How to use selectOneMenu without converter?

I'm using selectOneMenu for displaying some pictures and Strings, the pictures is for displaying purposes only i have (i.e. i have nothing to do with them on submitting) i want only to set the string next to the image, i have a conflict in setting the itemValue of the f:selectItems to the String required, when i do that the images doesn't appear at all, in a word i want to only submit the value of the string in the chosen selectItem without using converter:
JSF Code:
<p:selectOneMenu id="SkinChooser" value="#{personBean.ObjectDTO.personDescription.skin}"
panelStyle="width:150px" effect="fade" var="s"
style="width:160px" converter="#{personBean.converter}">
<f:selectItem itemLabel="Select One" itemValue="" />
<f:selectItems value="#{missedPersonBean.selectedSkins}"
var="skin" itemLabel="#{skin.skinType}" itemValue="#{skin}" />
<p:column>
<p:graphicImage value="/resources/images/skin/#{s.skinPhoto}"
width="40" height="50" />
</p:column>
<p:column>
#{s.skinType}
</p:column>
</p:selectOneMenu>
Skin.Java
public class Skin {
String skinPhoto;
String skinType;
public Skin() {
}
public Skin(String photo, String type) {
this.skinPhoto = photo;
this.skinType = type;
}
public String getSkinPhoto() {
return skinPhoto;
}
public void setSkinPhoto(String skinPhoto) {
this.skinPhoto = skinPhoto;
}
public String getSkinType() {
return skinType;
}
public void setSkinType(String skinType) {
this.skinType = skinType;
}
}
personBean.Java
#ManagedBean(name = "personBean")
#SessionScoped
public class ReportPerson {
private Skin skin;
private static List<Skin> selectedSkins;
static {
System.err.println("Array is filled");
selectedSkins = new ArrayList<Skin>();
selectedSkins.add(new Skin("1", "Pale white"));
selectedSkins.add(new Skin("2", "Fair white"));
selectedSkins.add(new Skin("3", "Light brown"));
selectedSkins.add(new Skin("4", "Moderate brown"));
selectedSkins.add(new Skin("5", "Dark brown"));
selectedSkins.add(new Skin("6", "Deeply pigmented"));
System.err.println("Finished Filling");
}
public List<Skin> getSelectedSkins() {
return selectedSkins;
}
public void setSelectedSkins(List<Skin> selectedSkins) {
this.selectedSkins = selectedSkins;
}
public Skin getSkin() {
return skin;
}
public void setSkin(Skin skin) {this.skin = skin;}
}

Resources