Title: Comma Separated list

Hello,
I'm working on a custom template file, and I've run against the need to have a comma separated list (i.e. for creating an array, or SQL code or whatever).  The difficulty I am having is in creating the commas (!).  What I would really like to do is something like this:

        String[] fieldNames = {
         <XDtEjbPersistent:forAllPersistentFields>
                <XDtLoop:isNotFirstTime>,</XDtLoop:isNotFirstTime>"<XDtMethod:propertyName/>"
         </XDtEjbPersistent:forAllPersistentFields>
                null};


I'm thinking the <XDtLoop:isNotFirstTime> or whatever would let the template know whether it should put in a comma to separate the items.

As a workaround, I have done this:

        String[] fieldNames = {
         <XDtEjbPersistent:forAllPersistentFields>
                "<XDtMethod:propertyName/>",
         </XDtEjbPersistent:forAllPersistentFields>
                null};

and then I had to explicitly put in code to remove the null trailing entry.  This works for this instance, but not for everything.  Is there any good way to do this? 

By the way, except for this small but seemingly insurmountable problem, Xdoclet has been amazing - Thanks!!!

Thanks,
Ross Sponholtz



***************************************************************************************
WARNING: All e-mail sent to and from this address will be received or
otherwise recorded by the A.G. Edwards corporate e-mail system and is
subject to archival, monitoring or review by, and/or disclosure to,
someone other than the recipient.
***************************************************************************************

Reply via email to