Here's a velocity user's guide (since its just standard velocity, it should help): http://jakarta.apache.org/velocity/user-guide.html

With regards to the APIs available, you can look at the andromda-cartridge.xml and can determine which metafacades are used in each template and then look up the API of the metafacade(s) used, each cartridge, has a report like this (http://team.andromda.org/docs/andromda-bpm4struts-cartridge/xref/index.html) available where you can see what facade contains what APIs: (unfortunately the javadocs are missing the interfaces therefore I'm pointing you do the source reference).

The reason “$usecase.actions()” isn't working is because it should be "$usecase.actions", its just like java bean notation. Therefore one the usecase object there would be a getActions() operation, you could do either "$usecase.getActions()" or "$usecase.actions" (both will work, however we recommend the shorter one as its more consistent with the meta model and less to write)

P.S. the source reference for the UML metafacades (which all cartridge metafacades extend), are located here: http://team.andromda.org/docs/andromda-metafacades-uml/xref/index.html


safaa hashim wrote:

Hi All;

I am currently trying to customize some of the Velocity templates (I am new to this) for generating BPM4Struts pages to suite my front-end application needs. I am having difficulty figuring out the API objects that I can use in these templates. Is there a documentation somewhere that I can use in getting started for writing Velocity templates and macros that work with AndroMDA.

A concrete example of what I am looking for is the following macro for rendering separate menu (one for each action in a page so that I can render action tiles in a tabbed page layout).

#if(!$applicationUseCases.empty)#set($applicationUseCase=$applicationUseCases.iterator().next())#end

#set ($root = $applicationUseCase.applicationHierarchyRoot)

##

## MACRO

##

#macro (renderTabMenu $item)

#set ($useCase = $item.useCase)

#set ($childItems = $bpmUtils.listEnumeration($item.children()))

#if ($childItems.empty)

#set ($actions = $usecase.actions())

#if (!$actions.empty)

#foreach ($action in $actions)

<Menu name="$action.titleKey" title="$action.titleKey" tooltip="$action.onlineHelpKey" location="$action.titleKey"/>

#end

#end

#else

#foreach ($childItem in $childItems)

#renderTabMenu($childItem)

#end

#end

#end

##

## TEMPLATE

##

#foreach ($childItem in $bpmUtils.listEnumeration($root.children()))

#renderTabMenu($childItem)

#end

The part that is not working is the reference to “$usecase.actions()” is not working thus my need for an API reference or How-to use AndroMDA objects in Velocity templates.

Thanks in Advance

Safaa Hashim

------------------------------------------------------------------------
Yahoo! Mail Mobile
Take Yahoo! Mail with you! <http://us.rd.yahoo.com/mail_us/taglines/mobile/*http://mobile.yahoo.com/learn/mail> Check email on your mobile phone.




-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
Andromda-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to