@ tefigel |-- | Generate differnt blocks of code according to the MODE parameter. |-- interface(MODE) case MODE when=get_set |||||||||||| for JPROP=~list_contents(JAVA_PROPERTIES) set JPID=~java/property_id(JPROP) set JPUID=~java/property_id(JPROP,AbcDef) set JPTYPE=~java/property_type(JPROP) @ text /* JPUID */ @ if JPTYPE=String private JPTYPE JPID = null; @ else private JPTYPE JPID; @ endif public JPTYPE get&JPUID() { return (this.JPID); } public void set&JPUID(JPTYPE JPID) { this.JPID = JPID; } @ endtext endfor when=log_data ||||||||||||| @ text // Log the forms data @ endtext for JPROP=~list_contents(JAVA_PROPERTIES) set JPID=~java/property_id(JPROP) set JPUID=~java/property_id(JPROP,AbcDef) @ text servlet.log("JPUID:" + JPID); @ endtext endfor when=check_data ||||||||||||||| for JPROP=~list_contents(JAVA_PROPERTIES) set JPID=~java/property_id(JPROP) set JPTYPE=~java/property_type(JPROP) if JPTYPE=String @ text if (JPID == null || JPID.equals("")) { errors.add("JPID", new ActionError("error.JPID.missing")); } @ endtext else @ text // Should check for errors on JPID (type: JPTYPE) @ endtext endif endfor endcase