Re: Exception handling after violation of unique constraint

2009-09-12 Thread Hilco Wijbenga
2009/9/12 Thiago H. de Paula Figueiredo : > Em Sat, 12 Sep 2009 17:38:43 -0300, Bruno Santos > escreveu: > >> Well, even if i do: >> >> league = new League(); >> league.setName("repeated name"); > > Unique constraints like this should be checked by you *before* sending an > insert or update to the

Re: form that create an object

2009-09-12 Thread ningdh
Hi, t:id should be a valid Java identifier, you should use like t:id="lastName"。 textfield component will map the bean property(lastName) to the form field, so you can just think that after form submit, the bean's property is properly set. DH - Original Message - From: "limonn" To:

Re: form that create an object

2009-09-12 Thread limonn
is not working I did try but Failure parsing template context:Form.tml: Component id 'user.name' is not valid; component ids must be valid Java identifiers: start with a letter, and consist of letters, numbers and underscores How you get an object from a form ?? Thanks limonn wrote: >

palette and list

2009-09-12 Thread rolfst
Hi is there a way to use a custom list with entities as a selection and a property from another domainobject to set. like a onetomany relation. sorry for my bad english its late. thanks rolf -- View this message in context: http://www.nabble.com/palette-and-list-tp25419024p25419024.html Sent

Re: Exception handling after violation of unique constraint

2009-09-12 Thread Thiago H. de Paula Figueiredo
Em Sat, 12 Sep 2009 17:38:43 -0300, Bruno Santos escreveu: Well, even if i do: league = new League(); league.setName("repeated name"); Unique constraints like this should be checked by you *before* sending an insert or update to the database. -- Thiago H. de Paula Figueiredo Independen

Re: form that create an object

2009-09-12 Thread Thiago H. de Paula Figueiredo
Em Sat, 12 Sep 2009 15:59:45 -0300, limonn escreveu: Never use ${} when passing parameters. It should be value="user.name". -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago --

Re: How to .tml template access a class's static variable

2009-09-12 Thread Howard Lewis Ship
public class StaticWrapper{ public String getConstantA() return { StaticClass.A; } public int getConstantB() return { OtherClass.B; } ... etc. } public class MyPage { private static final StaticWrapper wrapper = new StaticWrapper(); public StaticWrapper getWrapper() { return wrapper;

Re: Exception handling after violation of unique constraint

2009-09-12 Thread Bruno Santos
Well, even if i do: league = new League(); league.setName("repeated name"); I still have same problem, even without that piece of code. Everything works fine with Create/Update of entity if saveorupdate doesn't violate any constraint. On Sat, Sep 12, 2009 at 7:34 PM, Kalle Korhonen wrote: > Y

Tapestry5SelectObject problem with Tomcat - selection is not persisted

2009-09-12 Thread Vangel V. Ajanovski
Hi, I have a problem with submitting selection from list box when the application is deployed on Tomcat, while it works correctly in Jetty and Glassfish. The selection lists are implemented like in: http://wiki.apache.org/tapestry/Tapestry5SelectObject Here is the snippet of code:

Re: form that create an object

2009-09-12 Thread limonn
I tried but is not working, it must be a way, or may be not ? Here is what I did name : last name : limonn wrote: > > I want to have a form that represent an object, so far I have something > but is not working. > > > > name : > > > > last name : t:id="${user.lastname}

Problem with UTF-8 input in forms on Glassfish

2009-09-12 Thread Vangel V. Ajanovski
Hello everyone, this is my first email on this list. I'd like to introduce myself first, I am coordinating (and co-developing) a project for a Student information system at the Institute of Informatics in Skopje, Macedonia (a CS department at the Saints Cyril and Methodius University) . While

Re: Exception handling after violation of unique constraint

2009-09-12 Thread Kalle Korhonen
Yes, but the problem originates from this: if (entity.getId().longValue() == 0l) { league.setId(null); } You can't make that league object a new entity just by nullifying it's id. Try creating a new league if you need to. Later on, since the save

Re: Exception handling after violation of unique constraint

2009-09-12 Thread Bruno Santos
The question is i'm not trying to flush anything, i do (through DAO) session.saveOrUpdate, catch the exception and the only thing i do besides registering the error on the form is returning this (the page i'm at) wich causes (i guess) tapestry to query database to fill data for selectmodels. And, a

Re: form that create an object

2009-09-12 Thread Ulrich Stärk
Read the component reference about the textfield component. You want to use textfield's value attribute. Uli On 12.09.2009 16:15 schrieb limonn: I want to have a form that represent an object, so far I have something but is not working. name : last name : -

form that create an object

2009-09-12 Thread limonn
I want to have a form that represent an object, so far I have something but is not working. name : last name : and java (User.java is a regular class with 2 String properties name and lastName getters and setters