Sorry, my mistake. I wrote wrong beaneditform.
*TML*
<t:beaneditform <b>t:id="telefonKupca*" object="telefonKupca" add="ime,
prezime, adresa" submitlabel="message:create/update">
<t:errors/>
<t:parameter name="brojTelefona">
<t:label for="brojTelefona"/>
<t:textfield t:id="brojTelefona"
t:value="telefonKupca.brojTelefona" t:validate="required" />
</t:parameter>
<t:parameter name="ime">
<t:label t:for="ime">Ime Kupca</t:label>
<t:textfield t:value="telefonKupca.kupac.ime" t:id="ime"
t:validate="required"/>
</t:parameter>
<t:parameter name="prezime">
<t:label t:for="prezime"/>
<t:textfield t:value="telefonKupca.kupac.prezime"
t:id="prezime"/>
</t:parameter>
<t:parameter name="adresa">
<t:label t:for="adresa"/>
<t:textfield t:value="telefonKupca.kupac.adresa" t:id="adresa"/>
</t:parameter>
</t:beaneditform>
JAVA
void onValidateFromTelefonKupca() throws ValidationException
> {
> Telefonkupca tk = (Telefonkupca) service.find(Telefonkupca.class,
> telefonKupca.getBrojTelefona());
> if(tk!=null){
> throw new ValidationException("Vec postoji");
> }
> }
>
> .
> .
> .
> Object onSubmitFromTelefonKupca(){
> service.persist(telefonKupca);
> return index;
> }
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/onValidate-behave-strange-tp5587786p5588624.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]