franta-hg@66: package cz.frantovo.nekurak.web; franta-hg@66: franta-hg@68: import cz.frantovo.nekurak.dto.Podnik; franta-hg@66: import cz.frantovo.nekurak.servlet.Fotky; franta-hg@66: franta-hg@66: /** franta-hg@66: * Knihovna funkcí použitelná v EL franta-hg@66: * @author fiki franta-hg@66: */ franta-hg@66: public class FunkceEL { franta-hg@66: franta-hg@66: /** Musí odpovídat cestě, kam je namapovaný servlet. */ franta-hg@66: private static final String SERVLET = "fotky"; franta-hg@66: franta-hg@66: public static String fotka(int id, boolean nahled) { franta-hg@66: String prostredek = nahled ? Fotky.PODADRESAR_NAHLED : Fotky.PODADRESAR_ORIGINAL; franta-hg@66: return SERVLET + "/" + prostredek + "/" + id + "." + Fotky.PRIPONA; franta-hg@66: } franta-hg@68: franta-hg@68: public static boolean maFotky(Podnik p) { franta-hg@68: return !p.getFotky().isEmpty(); franta-hg@68: } franta-hg@66: }