Created
June 23, 2010 14:26
-
-
Save roderik/449989 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<templates> | |
<template autoinsert="false" context="java" deleted="false" description="FileField" enabled="true" name="ff"> { | |
FileField ff = new FileField(this, ${var}); | |
addField(ff, true); | |
} | |
</template> | |
<template autoinsert="true" context="java" deleted="false" description="Getter and Setter for FileField" enabled="true" name="gsff"> public void set${field}(File file) { | |
getFieldAt(${var}, FileField.class).setValue(file); | |
} | |
public File get${field}() { | |
return getFieldAt(${var}, FileField.class).getFile(); | |
} | |
public String get${field}Link(HttpServletRequest rq) { | |
if (getFieldAt(${var}, FileField.class).isNull()) { | |
return null; | |
} | |
return getFieldAt(${var}, FileField.class).getFileLink(rq); | |
} | |
</template> | |
<template autoinsert="false" context="java" deleted="false" description="Getter and setter for a LinkField" enabled="true" name="gslf"> public void set${field}(String string) { | |
getFieldAt(${var}, LinkField.class).setValue(string); | |
} | |
public String get${field}() { | |
return getFieldAt(${var}, LinkField.class).getValue(); | |
}</template> | |
<template autoinsert="false" context="java" deleted="false" description="Getter and Setter for a ReferenceField" enabled="true" name="gsrf"> public void set${functioname:var}(${type:var(Class)} ref) { | |
getFieldAt(${fieldname:var(String)}, ReferenceField.class).setValue(ref); | |
} | |
public (${type} set${functioname}() { | |
return (${type}) getFieldAt(${fieldname}, ReferenceField.class).getObject(); | |
}</template> | |
<template autoinsert="false" context="java" deleted="false" description="Getter and setter for a RichTextField" enabled="true" name="gsrtf"> public void set${field}(String string) { | |
getFieldAt(${var}, RichTextField.class).setValue(string); | |
} | |
public String get${field}() { | |
return getFieldAt(${var}, RichTextField.class).getValue(); | |
}</template> | |
<template autoinsert="false" context="java" deleted="false" description="Getter and setter for a SingleLineTextField" enabled="true" name="gssltf"> public void set${field}(String string) { | |
getFieldAt(${var}, SingleLineTextField.class).setValue(string); | |
} | |
public String get${field}() { | |
return getFieldAt(${var}, SingleLineTextField.class).getValue(); | |
}</template> | |
<template autoinsert="false" context="java" deleted="false" description="LinkField" enabled="true" name="lf">{ | |
LinkField lf = new LinkField(this, ${var}); | |
addField(lf, true); | |
}</template> | |
<template autoinsert="false" context="java" deleted="false" description="ReferenceField" enabled="true" name="rf"> { | |
ReferenceField rf = new ReferenceField(this, ${fieldname:var(String)}); | |
rf.setRefClass(${classname:var(Class)}); | |
addField(rf, ${langdep:var(boolean)}); | |
}</template> | |
<template autoinsert="true" context="java" deleted="false" description="RichTextfield" enabled="true" name="rtf"> { | |
RichTextField rtf = new RichTextField(this, ${var}); | |
addField(rtf, true); | |
}</template> | |
<template autoinsert="false" context="java" deleted="false" description="SingleLineTextField" enabled="true" name="sltf">{ | |
SingleLineTextField sltf = new SingleLineTextField(this, ${var}); | |
addField(sltf, true); | |
}</template> | |
</templates> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment