package org.domain.TestApplication.session;

import java.util.ArrayList;

import org.hibernate.validator.Length;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.log.Log;

@Name("modalPanel")
public class ModalPanel {

    @Logger private Log log;
    
    @In FacesMessages facesMessages;
    
    private ArrayList<Integer> pieData1 = new ArrayList<Integer>();
    private ArrayList<String> pieData2 = new ArrayList<String>();
    private String value;
	
    public ModalPanel() {
		for (int i = 0; i < 3; i++) {
			pieData1.add(i);
			pieData2.add("data1 " + i); 
		}
	}
    
	public void modalPanel()
	{
		//implement your business logic here
		log.info("modalPanel.modalPanel() action called with: #{modalPanel.value}");
		facesMessages.add("modalPanel #{modalPanel.value}");
	}
	
	//add additional action methods
	
	@Length(max=10)
	public String getValue()
	{
		return value;
	}
	
	public void setValue(String value)
	{
		this.value = value;
	}

	public ArrayList<Integer> getPieData1() {
		return pieData1;
	}

	public void setPieData1(ArrayList<Integer> pieData1) {
		this.pieData1 = pieData1;
	}

	public ArrayList<String> getPieData2() {
		return pieData2;
	}

	public void setPieData2(ArrayList<String> pieData2) {
		this.pieData2 = pieData2;
	}
	
}
