In AndroMDA 3.x, the only variables available to the template are those defined in the andromda-cartridge.xml, so if you have the "class" defined in the andromda-cartridge.xml, then that will be available to the template as $class. The class variable contains what we call a metafacade, take a look at the docs that come with the M1 distribution (or M2 snapshot distribution if you have that). If you look at the metafacades module in the docs and go to the UML Metafacades submodule and then from there find the javadocs in the project reports section, you'll see what is available to you for each metafacade interface. The $class is most likely an instance of ClassifierFacade. Again I would give you a link to the docs, but the AndroMDA Team server is down for some reason.
----- Original Message ----- From: "Sunondo Ghosh" <[EMAIL PROTECTED]> To: "Chad Brandon" <[EMAIL PROTECTED]> Sent: Tuesday, June 08, 2004 8:23 PM Subject: RE: Question about Maven and Velocity Thanks Chad, I will log the bug. Regarding writing templates, how can I figure out what are all the available variables to use in the template? If I have a $class variable, and want to find out the "Other end" of an association, how can I do that? I think the variable being used in "foreach" is probably wrong, but I don't know what are all the available variables. Thanks, Sunondo -----Original Message----- From: Chad Brandon [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 08, 2004 5:12 PM To: Sunondo Ghosh Cc: [EMAIL PROTECTED] Subject: Re: Question about Maven and Velocity Can you file it as a bug and attach the fix? I'll apply the patch then and check it in. See below for more comments: ----- Original Message ----- From: "Sunondo Ghosh" <[EMAIL PROTECTED]> To: "Chad Brandon" <[EMAIL PROTECTED]> Sent: Tuesday, June 08, 2004 8:03 PM Subject: RE: Question about Maven and Velocity Hi Chad, Yes that is a bug in StrutsJSP.vsl. I printed out a bunch of stuff from that vsl, and it is not going into the foreach loop at all. My print statements inside #foreach ( $associationEnd in $class.associationEnd ) do not get printed out in the JSP. My print statement just before the loop gets printed out. If you get a chance to fix it, can you please send it to me tonight? I will most probably need to do a small demo tomorrow. -- I can check it into CVS and you can check out the source. There may be another bug in the StrutsJSP.vsl. I have a "success" relationship from a ListOfUsersAction to the UserListPage (similar to the ListOfCustomersAction and CustomerListPage in the care-rental-sample). That part of the JSP to list the users is not getting generated the JSP. Is that a bug? -- Not sure, Matthias wrote this cartridge a while back, I haven't used it. I had a few other quick questions: - How to generate the properties file for the JSP? Is there a vsl for that? -- Don't think this is done in that struts cartridge, I'd take a look at the bpm4struts one, I know it does all that. - Can I only build the web dir or the ejb dir without building the entire source code? -- Yes, just cd to the module, i.e. animal-quiz/web and type war:install for the war. for the ejb you could cd to animal-quiz/ejb and type ejb:install. They used the Maven War and EJB plugin, so you can find out information on how those are used by just doing a search for maven ejb plugin or maven war plugin on google. Thanks, Sunondo -----Original Message----- From: Chad Brandon [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 08, 2004 4:38 PM To: Sunondo Ghosh Subject: Re: Question about Maven and Velocity See below: ----- Original Message ----- From: "Sunondo Ghosh" <[EMAIL PROTECTED]> To: "Chad Brandon" <[EMAIL PROTECTED]> Sent: Tuesday, June 08, 2004 7:24 PM Subject: RE: Question about Maven and Velocity Found it! Thanks. I was looking under samples, animal-quiz and under web but didn't look under mda. Another quick question. I really need to debug some cartridges. The older struts cartridge (StrutsJSP.vsl) has a bug that I need to fix. It is not generating the <html:form action="${class2.name}.do"> line in the JSP. There are the following two lines before this line: #set ($class2 = $target.type) #if (class2) How do I figure out the value of class2 at this point of time? I couldn't any info in andromeda-struts.log (I searched by class2 and type in the log). -- What you can do is just write out the value of class2, so just do something like //$class2 and then run andromda again...if you find the bug, submit it and I'll add the patch. As always thanks for your help. Sunondo -----Original Message----- From: Chad Brandon [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 08, 2004 4:11 PM To: Sunondo Ghosh Subject: Re: Question about Maven and Velocity Hi Sunondo, I would point you to some online docs, except the server is down for some reason. Hopefully it will be back up soon. Probably the best place to look on how to specify the andromda dependencies (i.e. cartridges) with maven is to take a look at the samples/animal-quiz/mda/project.xml.....that project.xml in the mda module has the cartridges that are used...you can see in there that bpm4struts is used with animal quiz. Chad ----- Original Message ----- From: "Sunondo Ghosh" <[EMAIL PROTECTED]> To: "Chad Brandon" <[EMAIL PROTECTED]> Sent: Tuesday, June 08, 2004 7:05 PM Subject: Question about Maven and Velocity Hi Chad, I have a basic question about how Andromda integrates with Velocity. Where in Maven is the cartridge to be used specified? So far I was building my application with the struts cartridge but want to now move to the newer bpm4struts cartridge. Where do I make this change? If you can point me to some online docs about this, that will be great. Thanks, Sunondo ------------------------------------------------------- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org _______________________________________________ Andromda-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/andromda-user