# HG changeset patch # User František Kučera # Date 1276939167 -7200 # Node ID 44ef544460ca012d6a03decf76d8acd8c6677c4f # Parent 91490d5419d2430e38835c95646ce75ecfc6a2ad AJAX komentáře diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-ear/nbproject/ant-deploy.xml --- a/java/nekurak.net-ear/nbproject/ant-deploy.xml Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-ear/nbproject/ant-deploy.xml Sat Jun 19 11:19:27 2010 +0200 @@ -24,7 +24,7 @@ - + @@ -43,18 +43,43 @@ + + + + + - + + + + + + + + + + + + - + + + + + + diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-ear/nbproject/build-impl.xml --- a/java/nekurak.net-ear/nbproject/build-impl.xml Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-ear/nbproject/build-impl.xml Sat Jun 19 11:19:27 2010 +0200 @@ -365,8 +365,15 @@ - - + + + + + + + + + @@ -382,6 +389,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -392,10 +440,10 @@ - + - + @@ -405,6 +453,10 @@ + + + + @@ -419,45 +471,63 @@ - - - + + + + + + + + + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + - + + + + + + diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-ejb/nbproject/build-impl.xml --- a/java/nekurak.net-ejb/nbproject/build-impl.xml Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-ejb/nbproject/build-impl.xml Sat Jun 19 11:19:27 2010 +0200 @@ -140,6 +140,20 @@ Must set dist.javadoc.dir Must set build.classes.excludes Must set dist.jar + + + + + + + + + +The Java EE server classpath is not correctly set up - server home directory is missing. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Dj2ee.server.home=<app_server_installation_directory> + The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. Either open the project in the IDE and assign the server or setup the server classpath manually. @@ -157,11 +171,52 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -187,6 +242,35 @@ + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + @@ -294,6 +378,7 @@ + @@ -316,7 +401,30 @@ - + + + + + + + + + + + + + + + + + + + + + + + + @@ -527,7 +635,7 @@ - + diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-ejb/nbproject/genfiles.properties --- a/java/nekurak.net-ejb/nbproject/genfiles.properties Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-ejb/nbproject/genfiles.properties Sat Jun 19 11:19:27 2010 +0200 @@ -1,8 +1,8 @@ build.xml.data.CRC32=764630c8 build.xml.script.CRC32=d7a2a0ed -build.xml.stylesheet.CRC32=e5f4c432@1.19.2 +build.xml.stylesheet.CRC32=5910fda3@1.22.1 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. nbproject/build-impl.xml.data.CRC32=764630c8 -nbproject/build-impl.xml.script.CRC32=45c5a458 -nbproject/build-impl.xml.stylesheet.CRC32=b9c9cfe1@1.19.2 +nbproject/build-impl.xml.script.CRC32=43ab1f1c +nbproject/build-impl.xml.stylesheet.CRC32=986a5256@1.22.1 diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-ejb/nbproject/project.properties --- a/java/nekurak.net-ejb/nbproject/project.properties Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-ejb/nbproject/project.properties Sat Jun 19 11:19:27 2010 +0200 @@ -1,3 +1,8 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=true +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output build.classes.dir=${build.dir}/classes build.classes.excludes=**/*.java,**/*.form,**/.nbattrs build.dir=build @@ -19,6 +24,12 @@ includes=** j2ee.deploy.on.save=false j2ee.platform=1.6 +j2ee.platform.classpath=${j2ee.server.home}/modules/javax.servlet.jar:${j2ee.server.home}/modules/jstl-impl.jar:${j2ee.server.home}/modules/javax.ejb.jar:${j2ee.server.home}/modules/javax.enterprise.deploy.jar:${j2ee.server.home}/modules/javax.security.jacc.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.transaction.jar:${j2ee.server.home}/modules/jsr311-api.jar:${j2ee.server.home}/modules/jsf-api.jar:${j2ee.server.home}/modules/javax.security.auth.message.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/endorsed/javax.annotation.jar:${j2ee.server.home}/modules/javax.management.j2ee.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.jms.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.resource.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/jsf-impl.jar:${j2ee.server.home}/modules/mail.jar +j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar +j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar +j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.ejb.jar +j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.ejb.jar +j2ee.platform.wsit.classpath= j2ee.server.type=gfv3ee6 jar.compress=false jar.name=nekurak.net-ejb.jar @@ -27,12 +38,14 @@ ${reference.SuperDAO.jar} javac.debug=true javac.deprecation=false +javac.processorpath=${javac.classpath} javac.source=1.5 javac.target=1.5 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir}:\ ${libs.junit_4.classpath} +javac.test.processorpath=${javac.test.classpath} javadoc.additionalparam= javadoc.author=false javadoc.encoding=${source.encoding} diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-ejb/src/java/cz/frantovo/nekurak/ejb/PodnikEJB.java --- a/java/nekurak.net-ejb/src/java/cz/frantovo/nekurak/ejb/PodnikEJB.java Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-ejb/src/java/cz/frantovo/nekurak/ejb/PodnikEJB.java Sat Jun 19 11:19:27 2010 +0200 @@ -81,11 +81,14 @@ return podnikDAO.getVysledekHlasovani(podnik); } - @RolesAllowed("opravneny") - public void komentuj(Komentar k) throws KomentarovaVyjimka, TexyVyjimka { + private void kontrolaKomentare(Komentar k) throws TexyVyjimka, KomentarovaVyjimka { k.setUzivatel(ctx.getCallerPrincipal().getName()); k.setDatum(null); + if (k.getKomentar() == null || k.getKomentar().length() < 1) { + throw new KomentarovaVyjimka("Nechceme prázdné komentáře.", null); + } + /** Převedeme na XML */ switch (k.getTyp()) { case PROSTY_TEXT: @@ -99,13 +102,19 @@ k.setKomentar(Komentare.upravXHTML(k.getKomentar())); break; } + /** Přidáme kořenový element */ k.setKomentar(Komentare.obal(k.getKomentar())); /** Zkontrolujeme XML */ - komentare.zkontroluj(k.getKomentar()); + Komentare.zkontroluj(k.getKomentar()); + } - - /** TODO: Uložíme do databáze */ - podnikDAO.zaloz(k); + @RolesAllowed("opravneny") + public Komentar komentuj(Komentar k, boolean uloz) throws KomentarovaVyjimka, TexyVyjimka { + kontrolaKomentare(k); + if (uloz) { + podnikDAO.zaloz(k); + } + return k; } } diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-lib/nbproject/build-impl.xml --- a/java/nekurak.net-lib/nbproject/build-impl.xml Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-lib/nbproject/build-impl.xml Sat Jun 19 11:19:27 2010 +0200 @@ -55,6 +55,7 @@ + @@ -83,23 +84,40 @@ - + - - + + - - - - - + + + + - - + + + + + + + + - - + + + + + + + + + + + + + + @@ -156,6 +174,8 @@ + + @@ -182,11 +202,53 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -211,6 +273,8 @@ + + @@ -358,14 +422,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -447,13 +568,13 @@ - + - + - + @@ -468,78 +589,35 @@ java -cp "${run.classpath.with.dist.jar}" ${main.class} - - - - - - - - - - - - - - - - - + + + + + + - - - + + + To run this application from the command line without Ant, try: java -jar "${dist.jar.resolved}" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" - + - + @@ -643,7 +721,7 @@ - + @@ -660,7 +738,7 @@ Must select some files in the IDE or set javac.includes - + diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-lib/nbproject/genfiles.properties --- a/java/nekurak.net-lib/nbproject/genfiles.properties Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-lib/nbproject/genfiles.properties Sat Jun 19 11:19:27 2010 +0200 @@ -1,8 +1,8 @@ build.xml.data.CRC32=11ce77af build.xml.script.CRC32=f10c3672 -build.xml.stylesheet.CRC32=958a1d3e@1.32.1.45 +build.xml.stylesheet.CRC32=28e38971@1.38.1.45 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. nbproject/build-impl.xml.data.CRC32=11ce77af -nbproject/build-impl.xml.script.CRC32=4e6301c4 -nbproject/build-impl.xml.stylesheet.CRC32=576378a2@1.32.1.45 +nbproject/build-impl.xml.script.CRC32=8db4fbcf +nbproject/build-impl.xml.stylesheet.CRC32=78c6a6ee@1.38.1.45 diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-lib/src/cz/frantovo/nekurak/ejb/PodnikRemote.java --- a/java/nekurak.net-lib/src/cz/frantovo/nekurak/ejb/PodnikRemote.java Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-lib/src/cz/frantovo/nekurak/ejb/PodnikRemote.java Sat Jun 19 11:19:27 2010 +0200 @@ -41,6 +41,7 @@ /** * @param k komentář, který se má přidat k podniku + * @param uloz true = vloží komentář | false = pouze zkontroluje (naformátuje obsah komentáře) */ - public void komentuj(Komentar k) throws KomentarovaVyjimka, TexyVyjimka; + public Komentar komentuj(Komentar k, boolean uloz) throws KomentarovaVyjimka, TexyVyjimka; } diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-lib/src/cz/frantovo/nekurak/preklady_cs.properties --- a/java/nekurak.net-lib/src/cz/frantovo/nekurak/preklady_cs.properties Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-lib/src/cz/frantovo/nekurak/preklady_cs.properties Sat Jun 19 11:19:27 2010 +0200 @@ -1,103 +1,108 @@ -jazyk=\u010De\u0161tina +jazyk=\u010de\u0161tina -nazev=Neku\u0159\u00E1k.net -popis=Datab\u00E1ze neku\u0159\u00E1ck\u00FDch restaurac\u00ED. -licence=\u00A9 2010 nekurak.net. Licence: Affero GPL. +nazev=Neku\u0159\u00e1k.net +popis=Datab\u00e1ze neku\u0159\u00e1ck\u00fdch restaurac\u00ed. +licence=\u00a9 2010 nekurak.net. Licence: Affero GPL. -meta.popis=Datab\u00E1ze neku\u0159\u00E1ck\u00FDch hospod -meta.klicova-slova=restaurace, hospoda, kou\u0159en\u00ED, cigarety, tab\u00E1k, neku\u0159\u00E1ck\u00E1 -meta.autor=Franti\u0161ek Ku\u010Dera \u2013 http://podnik.frantovo.cz/ +meta.popis=Datab\u00e1ze neku\u0159\u00e1ck\u00fdch hospod +meta.klicova-slova=restaurace, hospoda, kou\u0159en\u00ed, cigarety, tab\u00e1k, neku\u0159\u00e1ck\u00e1 +meta.autor=Franti\u0161ek Ku\u010dera \u2013 http://podnik.frantovo.cz/ -uvod=\u00DAvod +uvod=\u00davod registrovatSe=Registrovat se -prihlasitSe=P\u0159ihl\u00E1sit se -odhlasitSe=Odhl\u00E1sit se +prihlasitSe=P\u0159ihl\u00e1sit se +odhlasitSe=Odhl\u00e1sit se pridatPodnik=P\u0159idat podnik -prihlasenyUzivatel=P\u0159ihl\u00E1\u0161en\u00FD u\u017Eivatel +prihlasenyUzivatel=P\u0159ihl\u00e1\u0161en\u00fd u\u017eivatel -prepinaniJazyku.cestina=\u010De\u0161tina -prepinaniJazyku.cestina.tip=str\u00E1nka ji\u017E je v \u010De\u0161tin\u011B +prepinaniJazyku.cestina=\u010de\u0161tina +prepinaniJazyku.cestina.tip=str\u00e1nka ji\u017e je v \u010de\u0161tin\u011b prepinaniJazyku.slovenstina=sloven\u0161tina prepinaniJazyku.slovenstina.tip=p\u0159epnout na sloven\u0161tinu -prepinaniJazyku.anglictina=angli\u010Dtina -prepinaniJazyku.anglictina.tip=p\u0159epnout na angli\u010Dtinu +prepinaniJazyku.anglictina=angli\u010dtina +prepinaniJazyku.anglictina.tip=p\u0159epnout na angli\u010dtinu -chybovaStranka.404.nazev=404 Str\u00E1nka nenalezena -chybovaStranka.404.popis=Takovou str\u00E1nku tu bohu\u017Eel nem\u00E1me. -chybovaStranka.500.nazev=500 Intern\u00ED chyba serveru -chybovaStranka.500.popis=N\u011Bco se bohu\u017Eel nepovedlo. +chybovaStranka.404.nazev=404 Str\u00e1nka nenalezena +chybovaStranka.404.popis=Takovou str\u00e1nku tu bohu\u017eel nem\u00e1me. +chybovaStranka.500.nazev=500 Intern\u00ed chyba serveru +chybovaStranka.500.popis=N\u011bco se bohu\u017eel nepovedlo. -uvod.naposledyPridanePodniky=Naposledy p\u0159idan\u00E9 podniky -uvod.www=www str\u00E1nka +uvod.naposledyPridanePodniky=Naposledy p\u0159idan\u00e9 podniky +uvod.www=www str\u00e1nka uvod.adresa=Adresa -prihlaseni.odhlaseniUspesne=Odhl\u00E1\u0161en\u00ED prob\u011Bhlo \u00FAsp\u011B\u0161n\u011B. -prihlaseni.nadpis=P\u0159ihl\u00E1\u0161en\u00ED -prihlaseni.nadpis.odhlaseni=Odhl\u00E1\u0161en\u00ED -prihlaseni.zadejte=Zadejte jm\u00E9no a heslo. -prihlaseni.chyba=Nespr\u00E1vn\u00E9 jm\u00E9no nebo heslo, zkuste to pros\u00EDm znovu. -prihlaseni.jmeno=Jm\u00E9no +prihlaseni.odhlaseniUspesne=Odhl\u00e1\u0161en\u00ed prob\u011bhlo \u00fasp\u011b\u0161n\u011b. +prihlaseni.nadpis=P\u0159ihl\u00e1\u0161en\u00ed +prihlaseni.nadpis.odhlaseni=Odhl\u00e1\u0161en\u00ed +prihlaseni.zadejte=Zadejte jm\u00e9no a heslo. +prihlaseni.chyba=Nespr\u00e1vn\u00e9 jm\u00e9no nebo heslo, zkuste to pros\u00edm znovu. +prihlaseni.jmeno=Jm\u00e9no prihlaseni.heslo=Heslo -prihlaseni.tlacitko=P\u0159ihl\u00E1sit se +prihlaseni.tlacitko=P\u0159ihl\u00e1sit se -pridatPodnik.nadpis=P\u0159id\u00E1n\u00ED nov\u00E9ho podniku -pridatPodnik.bylPridan=Podnik byl \u00FAsp\u011B\u0161n\u011B p\u0159id\u00E1n. -pridatPodnik.nebylPridan=P\u0159i p\u0159id\u00E1v\u00E1n\u00ED podniku do\u0161lo k chyb\u011B. Zkontrolujte pros\u00EDm zadan\u00E9 \u00FAdaje. +pridatPodnik.nadpis=P\u0159id\u00e1n\u00ed nov\u00e9ho podniku +pridatPodnik.bylPridan=Podnik byl \u00fasp\u011b\u0161n\u011b p\u0159id\u00e1n. +pridatPodnik.nebylPridan=P\u0159i p\u0159id\u00e1v\u00e1n\u00ed podniku do\u0161lo k chyb\u011b. Zkontrolujte pros\u00edm zadan\u00e9 \u00fadaje. pridatPodnik.tlacitko=P\u0159idat podnik -dto.podnik.nazev=N\u00E1zev +dto.podnik.nazev=N\u00e1zev dto.podnik.popis=Popis dto.podnik.url=URL -dto.podnik.url.tip=www str\u00E1nka +dto.podnik.url.tip=www str\u00e1nka dto.podnik.datum=Datum dto.podnik.ulice=Ulice -dto.podnik.cisloPopisne=\u010D.p. -dto.podnik.cisloPopisne.tip=\u010D\u00EDslo popisn\u00E9 -dto.podnik.mesto=M\u011Bsto +dto.podnik.cisloPopisne=\u010d.p. +dto.podnik.cisloPopisne.tip=\u010d\u00edslo popisn\u00e9 +dto.podnik.mesto=M\u011bsto -registrace.nadpis=Registrace nov\u00E9ho u\u017Eivatele -registrace.kontrola=Zkontrolujte pros\u00EDm zadan\u00E9 \u00FAdaje. -registrace.hotovo=\u00DA\u010Det byl \u00FAsp\u011B\u0161n\u011B zalo\u017Een, m\u016F\u017Eete se -registrace.hotovo.prihlasit=p\u0159ihl\u00E1sit +registrace.nadpis=Registrace nov\u00e9ho u\u017eivatele +registrace.kontrola=Zkontrolujte pros\u00edm zadan\u00e9 \u00fadaje. +registrace.hotovo=\u00da\u010det byl \u00fasp\u011b\u0161n\u011b zalo\u017een, m\u016f\u017eete se +registrace.hotovo.prihlasit=p\u0159ihl\u00e1sit registrace.tlacitko=Registrovat se registrace.potvrdit=Potvrdit registraci -registrace.vyjimka=Nepoda\u0159ilo se zalo\u017Eit u\u017Eivatele. Po\u017Eadovan\u00E1 p\u0159ezd\u00EDvka je pravd\u011Bpodobn\u011B obsazena. -registrace.vyjimka.necekana=Omlouv\u00E1me se, b\u011Bhem registrace do\u0161lo k nezn\u00E1m\u00E9 chyb\u011B. -registrace.vyjimka.token=Relace vypr\u0161ela, registraci nelze dokon\u010Dit. Vypl\u0148te pros\u00EDm formul\u00E1\u0159 znovu. -registrace.vyjimka.heslaSeNeshoduji=Hesla se neshoduj\u00ED. Pro kontrolu je pot\u0159eba vyplnit stejn\u00E9 heslo dvakr\u00E1t. -registrace.email.predmet=V\u00EDtejte na serveru Neku\u0159\u00E1k.net -registrace.email.text=Srde\u010Dn\u011B v\u00EDt\u00E1me nov\u00E9ho u\u017Eivatele: {0} \nVa\u0161e p\u0159ezd\u00EDvka: {1} +registrace.vyjimka=Nepoda\u0159ilo se zalo\u017eit u\u017eivatele. Po\u017eadovan\u00e1 p\u0159ezd\u00edvka je pravd\u011bpodobn\u011b obsazena. +registrace.vyjimka.necekana=Omlouv\u00e1me se, b\u011bhem registrace do\u0161lo k nezn\u00e1m\u00e9 chyb\u011b. +registrace.vyjimka.token=Relace vypr\u0161ela, registraci nelze dokon\u010dit. Vypl\u0148te pros\u00edm formul\u00e1\u0159 znovu. +registrace.vyjimka.heslaSeNeshoduji=Hesla se neshoduj\u00ed. Pro kontrolu je pot\u0159eba vyplnit stejn\u00e9 heslo dvakr\u00e1t. +registrace.email.predmet=V\u00edtejte na serveru Neku\u0159\u00e1k.net +registrace.email.text=Srde\u010dn\u011b v\u00edt\u00e1me nov\u00e9ho u\u017eivatele: {0} \nVa\u0161e p\u0159ezd\u00edvka: {1} -dto.uzivatel.prezdivka=P\u0159ezd\u00EDvka -dto.uzivatel.prezdivka.tip=U\u017Eivatelsk\u00E9 jm\u00E9no +dto.uzivatel.prezdivka=P\u0159ezd\u00edvka +dto.uzivatel.prezdivka.tip=U\u017eivatelsk\u00e9 jm\u00e9no dto.uzivatel.heslo=Heslo dto.uzivatel.heslo.kontrola=Heslo znovu -dto.uzivatel.jmeno=Jm\u00E9no -dto.uzivatel.prijmeni=P\u0159\u00EDjmen\u00ED +dto.uzivatel.jmeno=Jm\u00e9no +dto.uzivatel.prijmeni=P\u0159\u00edjmen\u00ed dto.uzivatel.email=e-mail -hlasovani.graf.nadpis=M\u011Blo by se tu -hlasovani.graf.zadneHlasy=(zat\u00EDm nikdo nehlasoval) -hlasovani.graf.popisSloupce=hlas\u016F: {0} +hlasovani.graf.nadpis=M\u011blo by se tu +hlasovani.graf.zadneHlasy=(zat\u00edm nikdo nehlasoval) +hlasovani.graf.popisSloupce=hlas\u016f: {0} hlasovani.graf.kourit=kou\u0159it hlasovani.graf.nekourit=nekou\u0159it hlasovani.TODO=TODO: lokalizovat Javascript -komentare.vypisNadpis=Koment\u00E1\u0159e k tomuto podniku -komentare.prihlasitSe=Pro vkl\u00E1d\u00E1n\u00ED koment\u00E1\u0159\u016F se pros\u00EDm p\u0159ihla\u0161te. -komentare.zadneKomentare=Zat\u00EDm nikdo nekomentoval. +komentare.vypisNadpis=Koment\u00e1\u0159e k tomuto podniku +komentare.prihlasitSe=Pro vkl\u00e1d\u00e1n\u00ed koment\u00e1\u0159\u016f se pros\u00edm p\u0159ihla\u0161te. +komentare.zadneKomentare=Zat\u00edm nikdo nekomentoval. komentare.komentovat=Komentovat! komentare.nadpis=Nadpis -komentare.tlacitkoOdeslat=Vlo\u017Eit koment\u00E1\u0159 +komentare.tlacitkoOdeslat=Vlo\u017eit koment\u00e1\u0159 +komentare.tlacitkoNahled=N\u00e1hled komentare.napsal=Napsal -komentar.odeslat.nadpis=Vlo\u017Een\u00ED koment\u00E1\u0159e -komentar.odeslat.ok=Koment\u00E1\u0159 byl \u00FAsp\u011B\u0161n\u011B vlo\u017Een -komentar.odeslat.pokracujte=pokra\u010Dujte na str\u00E1nku podniku -komentar.odeslat.chyba=Koment\u00E1\u0159 obsahuje nepovolen\u00E9 form\u00E1tov\u00E1n\u00ED. -komentar.typ.prostyText=Prost\u00FD text -komentar.typ.xhtml=XHTML form\u00E1tovan\u00FD text -komentar.typ.xhtml.povoleneZnacky=Povolen\u00E9 zna\u010Dky jsou: <p>odstavec</p>, <strong>tu\u010Dn\u011B</strong>, <em>kurz\u00EDva</em> a <br/>. -komentar.typ.texy=Texy form\u00E1tovan\u00FD text -komentar.nejdeZobrazit=Tento koment\u00E1\u0159 bohu\u017Eel nelze z technick\u00FDch d\u016Fvod\u016F zobrazit. +komentare.nahledNadpis=Takhle bude vypadat v\u00e1\u0161 koment\u00e1\u0159 +komentare.nahledChybaFormatu=Koment\u00e1\u0159 obsahuje nepovolen\u00e9 form\u00e1tov\u00e1n\u00ed. +komentare.nahledChybaPrihlaseni=Koment\u00e1\u0159e mohou vkl\u00e1dat pouze p\u0159ihl\u00e1\u0161en\u00ed u\u017eivatel\u00e9. +komentare.nahledOdeslano=Koment\u00e1\u0159 byl \u00fasp\u011b\u0161n\u011b ulo\u017een +komentar.odeslat.nadpis=Vlo\u017een\u00ed koment\u00e1\u0159e +komentar.odeslat.ok=Koment\u00e1\u0159 byl \u00fasp\u011b\u0161n\u011b vlo\u017een +komentar.odeslat.pokracujte=pokra\u010dujte na str\u00e1nku podniku +komentar.odeslat.chyba=Koment\u00e1\u0159 obsahuje nepovolen\u00e9 form\u00e1tov\u00e1n\u00ed. +komentar.typ.prostyText=Prost\u00fd text +komentar.typ.xhtml=XHTML form\u00e1tovan\u00fd text +komentar.typ.xhtml.povoleneZnacky=Povolen\u00e9 zna\u010dky jsou: p, strong, em a br. +komentar.typ.texy=Texy form\u00e1tovan\u00fd text +komentar.nejdeZobrazit=Tento koment\u00e1\u0159 bohu\u017eel nelze z technick\u00fdch d\u016fvod\u016f zobrazit. diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-rest/nbproject/ant-deploy.xml --- a/java/nekurak.net-rest/nbproject/ant-deploy.xml Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-rest/nbproject/ant-deploy.xml Sat Jun 19 11:19:27 2010 +0200 @@ -24,7 +24,7 @@ - + @@ -43,18 +43,43 @@ + + + + + - + + + + + + + + + + + + - + + + + + + diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-rest/nbproject/build-impl.xml --- a/java/nekurak.net-rest/nbproject/build-impl.xml Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-rest/nbproject/build-impl.xml Sat Jun 19 11:19:27 2010 +0200 @@ -199,6 +199,20 @@ Must set build.test.results.dir Must set build.classes.excludes Must set dist.war + + + + + + + + + +The Java EE server classpath is not correctly set up - server home directory is missing. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Dj2ee.server.home=<app_server_installation_directory> + The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. Either open the project in the IDE and assign the server or setup the server classpath manually. @@ -216,11 +230,51 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -245,6 +299,35 @@ + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + @@ -387,7 +470,30 @@ - + + + + + + + + + + + + + + + + + + + + + + + + @@ -467,10 +573,10 @@ - + - + Must select some files in the IDE or set javac.jsp.includes @@ -486,10 +592,10 @@ - + - + @@ -724,7 +830,7 @@ - + diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-rest/nbproject/genfiles.properties --- a/java/nekurak.net-rest/nbproject/genfiles.properties Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-rest/nbproject/genfiles.properties Sat Jun 19 11:19:27 2010 +0200 @@ -1,11 +1,11 @@ build.xml.data.CRC32=35b9fabc build.xml.script.CRC32=fb1b7f84 -build.xml.stylesheet.CRC32=c0ebde35@1.21.2.1 +build.xml.stylesheet.CRC32=651128d4@1.24.1.1 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. nbproject/build-impl.xml.data.CRC32=35b9fabc -nbproject/build-impl.xml.script.CRC32=41eb3ef9 -nbproject/build-impl.xml.stylesheet.CRC32=b139b33b@1.21.2.1 +nbproject/build-impl.xml.script.CRC32=3663fe21 +nbproject/build-impl.xml.stylesheet.CRC32=8335d67d@1.24.1.1 nbproject/rest-build.xml.data.CRC32=d32e8880 nbproject/rest-build.xml.script.CRC32=23da2c77 nbproject/rest-build.xml.stylesheet.CRC32=ddd64843@1.4.1 diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-rest/nbproject/project.properties --- a/java/nekurak.net-rest/nbproject/project.properties Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-rest/nbproject/project.properties Sat Jun 19 11:19:27 2010 +0200 @@ -1,3 +1,8 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=true +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output build.classes.dir=${build.web.dir}/WEB-INF/classes build.classes.excludes=**/*.java,**/*.form build.dir=build @@ -24,6 +29,12 @@ includes=** j2ee.deploy.on.save=false j2ee.platform=1.6-web +j2ee.platform.classpath=${j2ee.server.home}/modules/javax.servlet.jar:${j2ee.server.home}/modules/jstl-impl.jar:${j2ee.server.home}/modules/javax.ejb.jar:${j2ee.server.home}/modules/javax.enterprise.deploy.jar:${j2ee.server.home}/modules/javax.security.jacc.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.transaction.jar:${j2ee.server.home}/modules/jsr311-api.jar:${j2ee.server.home}/modules/jsf-api.jar:${j2ee.server.home}/modules/javax.security.auth.message.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/endorsed/javax.annotation.jar:${j2ee.server.home}/modules/javax.management.j2ee.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.jms.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.resource.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/jsf-impl.jar:${j2ee.server.home}/modules/mail.jar +j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar +j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar +j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.ejb.jar +j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.ejb.jar +j2ee.platform.wsit.classpath= j2ee.server.type=gfv3ee6 jar.compress=false javac.classpath=\ @@ -32,6 +43,7 @@ javac.compilerargs= javac.debug=true javac.deprecation=false +javac.processorpath=${javac.classpath} javac.source=1.5 javac.target=1.5 javac.test.classpath=\ @@ -39,6 +51,7 @@ ${build.classes.dir}:\ ${libs.junit.classpath}:\ ${libs.junit_4.classpath} +javac.test.processorpath=${javac.test.classpath} javadoc.additionalparam= javadoc.author=false javadoc.encoding=${source.encoding} diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-web/nbproject/ant-deploy.xml --- a/java/nekurak.net-web/nbproject/ant-deploy.xml Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-web/nbproject/ant-deploy.xml Sat Jun 19 11:19:27 2010 +0200 @@ -24,7 +24,7 @@ - + @@ -43,18 +43,43 @@ + + + + + - + + + + + + + + + + + + - + + + + + + diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-web/nbproject/build-impl.xml --- a/java/nekurak.net-web/nbproject/build-impl.xml Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-web/nbproject/build-impl.xml Sat Jun 19 11:19:27 2010 +0200 @@ -199,6 +199,20 @@ Must set build.test.results.dir Must set build.classes.excludes Must set dist.war + + + + + + + + + +The Java EE server classpath is not correctly set up - server home directory is missing. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Dj2ee.server.home=<app_server_installation_directory> + The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. Either open the project in the IDE and assign the server or setup the server classpath manually. @@ -216,11 +230,51 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -245,6 +299,35 @@ + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + @@ -387,7 +470,30 @@ - + + + + + + + + + + + + + + + + + + + + + + + + @@ -467,10 +573,10 @@ - + - + Must select some files in the IDE or set javac.jsp.includes @@ -486,10 +592,10 @@ - + - + @@ -726,7 +832,7 @@ - + diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-web/nbproject/genfiles.properties --- a/java/nekurak.net-web/nbproject/genfiles.properties Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-web/nbproject/genfiles.properties Sat Jun 19 11:19:27 2010 +0200 @@ -4,8 +4,8 @@ # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. nbproject/build-impl.xml.data.CRC32=28fc3c5a -nbproject/build-impl.xml.script.CRC32=cdc87d62 -nbproject/build-impl.xml.stylesheet.CRC32=b139b33b@1.21.2.1 +nbproject/build-impl.xml.script.CRC32=e58633c2 +nbproject/build-impl.xml.stylesheet.CRC32=8335d67d@1.24.1.1 nbproject/rest-build.xml.data.CRC32=84da1c7b nbproject/rest-build.xml.script.CRC32=3db088b3 nbproject/rest-build.xml.stylesheet.CRC32=ddd64843@1.4.1 diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-web/nbproject/project.properties --- a/java/nekurak.net-web/nbproject/project.properties Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-web/nbproject/project.properties Sat Jun 19 11:19:27 2010 +0200 @@ -1,3 +1,8 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=true +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output build.classes.dir=${build.web.dir}/WEB-INF/classes build.classes.excludes=**/*.java,**/*.form build.dir=build @@ -23,6 +28,12 @@ includes=** j2ee.deploy.on.save=true j2ee.platform=1.5 +j2ee.platform.classpath= +j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar +j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar +j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.ejb.jar +j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.ejb.jar +j2ee.platform.wsit.classpath= j2ee.server.type=gfv3ee6 jar.compress=false javac.classpath=\ @@ -32,6 +43,7 @@ javac.compilerargs= javac.debug=true javac.deprecation=false +javac.processorpath=${javac.classpath} javac.source=1.5 javac.target=1.5 javac.test.classpath=\ @@ -39,6 +51,7 @@ ${build.classes.dir}:\ ${libs.junit.classpath}:\ ${libs.junit_4.classpath} +javac.test.processorpath=${javac.test.classpath} javadoc.additionalparam= javadoc.author=false javadoc.encoding=${source.encoding} diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-web/src/java/cz/frantovo/nekurak/servlet/Komentare.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/nekurak.net-web/src/java/cz/frantovo/nekurak/servlet/Komentare.java Sat Jun 19 11:19:27 2010 +0200 @@ -0,0 +1,57 @@ +package cz.frantovo.nekurak.servlet; + +import cz.frantovo.nekurak.dto.Komentar; +import cz.frantovo.nekurak.ejb.PodnikRemote; +import cz.frantovo.nekurak.web.HledacSluzby; +import java.io.IOException; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * + * @author fiki + */ +public class Komentare extends HttpServlet { + + private HledacSluzby hledac = new HledacSluzby(); + + @Override + protected void doGet(HttpServletRequest pozadavek, HttpServletResponse odpoved) throws ServletException, IOException { + doPost(pozadavek, odpoved); + } + + @Override + protected void doPost(HttpServletRequest pozadavek, HttpServletResponse odpoved) throws ServletException, IOException { + PodnikRemote ejb = hledac.getPodnikEJB(); + + Komentar k = new Komentar(); + k.setPodnik(Integer.decode(pozadavek.getParameter("podnik"))); + k.setNadpis(pozadavek.getParameter("nadpis")); + k.setKomentar(pozadavek.getParameter("komentar")); + k.setTyp(Komentar.TYP.valueOf(pozadavek.getParameter("typ"))); + + boolean ulozit = Boolean.valueOf(pozadavek.getParameter("odeslat")); + + String jsp; + + try { + k = ejb.komentuj(k, ulozit); + pozadavek.setAttribute("komentar", k); + + if (ulozit) { + jsp = "/WEB-INF/casti/ajaxKomentare/odeslano.jsp"; + } else { + jsp = "/WEB-INF/casti/ajaxKomentare/nahled.jsp"; + } + } catch (Exception e) { + pozadavek.setAttribute("chyba", e); + jsp = "/WEB-INF/casti/ajaxKomentare/chyba.jsp"; + } + + RequestDispatcher rd = getServletContext().getRequestDispatcher(jsp); + rd.forward(pozadavek, odpoved); + } +} diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-web/src/java/cz/frantovo/nekurak/web/OdeslatKomentar.java --- a/java/nekurak.net-web/src/java/cz/frantovo/nekurak/web/OdeslatKomentar.java Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-web/src/java/cz/frantovo/nekurak/web/OdeslatKomentar.java Sat Jun 19 11:19:27 2010 +0200 @@ -18,7 +18,7 @@ public void setKomentar(Komentar k) throws TexyVyjimka { try { - hledac.getPodnikEJB().komentuj(k); + hledac.getPodnikEJB().komentuj(k, true); ok = true; } catch (KomentarovaVyjimka e) { log.log(Level.WARNING, "chyba při vkládání komentáře", e); diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-web/web/WEB-INF/casti/ajaxKomentare/chyba.jsp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/nekurak.net-web/web/WEB-INF/casti/ajaxKomentare/chyba.jsp Sat Jun 19 11:19:27 2010 +0200 @@ -0,0 +1,21 @@ + + + +
+ + +

+
+ +

+

+
+
+
+ +
\ No newline at end of file diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-web/web/WEB-INF/casti/ajaxKomentare/nahled.jsp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/nekurak.net-web/web/WEB-INF/casti/ajaxKomentare/nahled.jsp Sat Jun 19 11:19:27 2010 +0200 @@ -0,0 +1,17 @@ + + + + + +
+

:

+ + ${requestScope['komentar'].komentar} +
+ +
\ No newline at end of file diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-web/web/WEB-INF/casti/ajaxKomentare/odeslano.jsp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/nekurak.net-web/web/WEB-INF/casti/ajaxKomentare/odeslano.jsp Sat Jun 19 11:19:27 2010 +0200 @@ -0,0 +1,20 @@ + + + + + +
+

:

+ + ${requestScope['komentar'].komentar} + +
+ +
\ No newline at end of file diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-web/web/WEB-INF/casti/odeslatKomentar.jsp --- a/java/nekurak.net-web/web/WEB-INF/casti/odeslatKomentar.jsp Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-web/web/WEB-INF/casti/odeslatKomentar.jsp Sat Jun 19 11:19:27 2010 +0200 @@ -25,7 +25,9 @@

, - . + + + .

diff -r 91490d5419d2 -r 44ef544460ca java/nekurak.net-web/web/WEB-INF/tags/nekurak/komentareVypis.tag --- a/java/nekurak.net-web/web/WEB-INF/tags/nekurak/komentareVypis.tag Thu Jun 17 15:12:30 2010 +0200 +++ b/java/nekurak.net-web/web/WEB-INF/tags/nekurak/komentareVypis.tag Sat Jun 19 11:19:27 2010 +0200 @@ -24,7 +24,7 @@