package info.bukova.isspst.ui.addressbook;

import info.bukova.isspst.data.Address;

import java.util.List;

import org.zkoss.bind.annotation.ExecutionArgParam;
import org.zkoss.bind.annotation.Init;
import org.zkoss.bind.annotation.NotifyChange;

public class AddressFindResult {
	
	private List<Address> listResult;
	private Address selectedAddr;
	
	@Init
	public void init(@ExecutionArgParam("result") List<Address> result) {
		listResult = result;
	}
	
	public List<Address> getListResult() {
		return listResult;
	}

	public Address getSelectedAddr() {
		return selectedAddr;
	}

	@NotifyChange("selected")
	public void setSelectedAddr(Address selectedAddr) {
		this.selectedAddr = selectedAddr;
	}
	
	public boolean getSelected() {
		return selectedAddr == null;
	}

}
