using session variable in derived entity property causes compilation error
using session variable in derived entity property causes compilation error
entity City { name :: String := if(language.isEnglish) ename else aname ename :: String aname :: String } session language{ english :: Bool isEnglish :: Bool := english }
error:
[javac] 1. ERROR in /Users/dan/workspace/sas/.servletapp/src-generated/webdsl/generated/domain/City.java (at line 127) [javac] Language language = (Language)env.getVariable("language"); [javac] ^^^ [javac] env cannot be resolved
workaround:
put session var access in an entity method:
Submitted by Danny Groenewegen on 28 June 2011 at 13:40entity City { name :: String := getName() //if(language.isEnglish) ename else aname function getName():String{ return if(language.isEnglish) ename else aname;} ename :: String aname :: String }