All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xapi.ui.html.api.HtmlTemplate Maven / Gradle / Ivy

Go to download

Everything needed to run a comprehensive dev environment. Just type X_ and pick a service from autocomplete; new dev modules will be added as they are built. The only dev service not included in the uber jar is xapi-dev-maven, as it includes all runtime dependencies of maven, adding ~4 seconds to build time, and 6 megabytes to the final output jar size (without xapi-dev-maven, it's ~1MB).

The newest version!
/**
 *
 */
package xapi.ui.html.api;

import xapi.annotation.compile.Import;

/**
 * @author "James X. Nelson ([email protected])"
 *
 */
//@Target({}) // consider not allowing anywhere except inside other annotations.
public @interface HtmlTemplate {

  String
  // Looping feature on hold for now
//      KEY_FOR = "$for",
//      KEY_LOOP_START = "{{",
//      KEY_LOOP_END = "}}",
      KEY_PARENT = "$parent",
      KEY_CHILDREN = "$children",
      KEY_CONTEXT = "$ctx",
      KEY_VALUE = "$value"
      ;

  /**
   * @return true if you want the annotations on the template to be applied.
   *         Leave false (default) to have the template treated as a named
   *         child, to be applied by some other {@link Html}, {@link El} or
   *         {@link HtmlTemplate}.
   */
  boolean inherit() default false;

  boolean wrapsChildren() default false;

  /**
   * @return any string to allow ${bean.naming} references to this template.
   */
  String name() default "";

  /**
   * @return An optional template to be parsed for replacement keys
   */
  String template() default "";

  /**
   * @return The default "global" keys you want to handle.
   * 

* Unless you are implementing your own generator, the only reason to set this * variable will be to declare aliases to snippets of code that will be within scope in generated code. *

* To use an alias, use a templateKey in the form of "keyName:scopedObject.doSomething". *

* If you use {@link Import} tags, you can _try_ using short classnames, * however a fully qualified reference to type names is recommended. *
* static imports with unique names is general the safest way to make concise references in template values. * */ String[] templateKeys() default { KEY_VALUE, KEY_CHILDREN, KEY_PARENT, KEY_CONTEXT }; Import[] imports() default {}; /** * @return classes to use to extract {@link Html}, {@link El} and {@link Style} data from. */ Class[] references() default {}; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy