Oh, oops, I thought that's what you were talking about. :) Don't use the GridPanel. Just wrap the save in a try catch, or check first to see if the row exists.
On 8/16/05, Oleg Marchuk <[EMAIL PROTECTED]> wrote: > May be I can use something like this? > http://www.cs.uoregon.edu/~torok/GridPanelDocs/ > > IDataSource ds = new HibernateDataSource(Customer.class, COMPONENT_DAO); > > List states = (List) COMPONENT_DAO.execute(new IHibernateCallback() { > public Object execute(Session session) { > return session.createQuery("FROM State s ORDER BY s.abbrev") > .list(); > } > }); > > // Our custom columns > ArrayList cols = new ArrayList(); > > cols.add(new MultiColumn() > .add(new DeleteColumn()) > .add(new EditColumn())); > > cols.add(new TextFieldColumn("Address", "address")); > cols.add(new TextFieldColumn("City", "city")); > cols.add(new DropDownChoiceColumn("State", "state", states) > .setAllowOrderBy(false)); > cols.add(new TextFieldColumn("Name", "name") > .add(RequiredValidator.getInstance())); > cols.add(new CheckBoxColumn("Prefered", "prefered")); > > // Our feedback panel. > FeedbackPanel feedback = new FeedbackPanel("feedback"); > add(feedback); > > GridPanel gridPanel = new GridPanel("allCustomers", ds, 5, cols, feedback); > add(gridPanel); > > > Phil Kulak wrote: > > >Hmm.. there's another reason why I don't like coarse-grained > >components like that. Since the component is doing all the saving and > >updating, there's not a whole lot you can do. > > > >On 8/15/05, Oleg Marchuk <[EMAIL PROTECTED]> wrote: > > > > > >>Hello. > >> > >>Today I get cdapp example and play with it. I set one of the field of > >>Album to unique in mapping. And now when I am trying to save object with > >>same values I always get exception. How to rewrite code to show feedback > >>messsage like "Error: this field must be unique. Try other value" ? > >> > >> > >> > >> > > -- > Oleg Marchuk > > Softzone ltd., software and IT consulting > Ukraine, Kiev, +380-44-2460965 > [EMAIL PROTECTED] > http://www.softzonenet.com/ > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user