Fornax-Platform
Forum

 « Return to Thread: New concept

Re: New concept

by Patrik Nordwall :: Rate this Message:

Reply to Author | View in Thread

I thought of it as a plain string, but your idea with parameters and separators is even better.

We add convenient extension functions so it could look like this:

 «AROUND templates::DomainObject::jpaAnnotations FOR Attribute»
    «IF hasHint("xml")»
        @javax.xml.bind.annotation.XmlElement(required=true«IF
getHintParam("xml", "default") != null»,
defaultValue=getHintParam("xml", "default")«ENDIF»)
        «targetDef.proceed()»
    «ENDIF»
 «ENDAROUND»

Oliver has done parsing for the validation that we might be able to reuse.


/Patrik

 « Return to Thread: New concept