[Opensource] ErrorMessageBundleTag and ErrorTag

Juris Zubkans juris at ri.lv
Fri Oct 10 03:58:52 PDT 2003


Hi

The new ErrorMessageBundleTag has bad look if the ErrorColection has more as one
error.
The reason is that errors are not separeted with some formating and printed in
one big line,
that produces a bad and somtimes not understandable text.

The non i188n ErrorTag prints each line in html <li> </li> tags,
 and produces redable error messages

juris


> -----Original Message-----
> From: opensource-admin at jcorporate.com
> [mailto:opensource-admin at jcorporate.com]On Behalf Of larry hamel
> Sent: Wednesday, October 01, 2003 1:35 AM
> To: opensource at jcorporate.com
> Subject: [Opensource] cloning auto-inc dbobjects
>
>
> here's a "hacky" technique for deep cloning of dbobjects which have
> auto-inc keys.  this could be dangerous if original could not be
> restored... but we throw an exception in that case anyway... is there
> a better way that is this that is just as easy?  seems like DBObject
> could support cloning easily, even in the general case w/o auto-inc.
>
> larry
> -------------------
>
>     /**
>      * deep copy fields to new object
>      */
>     public Attribute clone(String cloneNodeId) throws DBException {
>         String origId = getId();
>         String cloneId = null;
>
>         try {
>             this.setId("0");  // resetting id isn't technically
> necessary, since auto-inc field WILL get new value with add() method
>             // clone by just adding
>             this.add();
>             cloneId = this.getId();
>         } finally {
>             // make sure we reset even if there are problems
>             this.setId(origId);
>             this.retrieve();
>         }
>
>         Attribute clone = new Attribute(getRequestingUid());
>         clone.setDBName(getDBName());
>         clone.setAttributeId(cloneId);
>         clone.retrieve();
>
>         return clone;
>     }
>
> _______________________________________________
> Opensource mailing list
> Opensource at jcorporate.com
> http://mail.jcorporate.com/mailman/listinfo/opensource
> Archives: http://mail.jcorporate.com/pipermail/opensource/




More information about the Opensource mailing list