Top.Mail.Ru
May 11th, 2004 - Java developers — LiveJournal
? ?

Java developers

May 11th, 2004
Image

09:00 am - Imagealistairg - Auto numbering objects

Just a quickie:

I want to create a set of several Objects, all with a name and then a number after them.

For example:

Job1
Job2
Job3
Job4

I've tried using something along the lines of:

Job Job+i = new Job();
Job "Job+1" = new Job();
Job "Job"+i = new Job();

None of which work. Is it not possible to use variables when creating or accessing objects?

Edit: I was being stupid, am using an array of objects now...
Image

01:13 pm - Imagetrajano - Struts validation template done

Finally, I got my struts validation template created and posted it to http://jira.codehaus.org/secure/ViewIssue.jspa?key=MPGENAPP-9. Bloody bugger is hard to set up, hopefully by putting what I wrote into maven genapp it will reduce the amount of people that had to go through my suffering :) One of the major things you have to watch out for is that Internet Explorer will not work with client side scripting if you have XHTML mode turned on, and if you remove your CDATA section from the html:javascript tag you won't end up with a valid XHTML file any how. I think to fix this the output of the html:javascript will have to be XML escaped specifically the &, > and < characters.

For those of you that don't know what Maven is, its basically ant + some plugins which allow you to reduce the amount of time you have to manage writing a build script. However, you have to follow some mostly sane rules. And genapp is an plugin for maven which generates a template project for you, most of which I created myself. Namely:


As I have specified in my previous blog I am learning tapestry as well and hopefully will have an attachment to http://jira.codehaus.org/secure/ViewIssue.jspa?key=MPGENAPP-10
Powered by LiveJournal.com
Image