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

com.google.sitebricks.core.ShowIf Maven / Gradle / Ivy

package com.google.sitebricks.core;


import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * 

* Hides or shows content. Place this annotation on any tag to control whether it [and * all children] are hidden or shown. {@code @ShowIf} takes a single direct argument of type * boolean. You must provide this argument as an MVEL expression. For example: *

* *
 * {@code @ShowIf}(true)
 * <p>Hello World!</p>
 * 
* *

* Renders the content in the paragraph tags (including the tags themselves), and any * nested content. Use the {@code @ShowIf(..)} expression to conditionally render parts of your template, * controlled by logic from the page object: *

* *
 * {@code @ShowIf}(movie.length > 2)
 * <div>This movie is really looooong...</div>
 * 
* *

* You can, of course, annotate *any* HTML/XML element with {@code @ShowIf}. *

* * @author Dhanji R. Prasanna ([email protected]) */ @Retention(RetentionPolicy.RUNTIME) @interface ShowIf { boolean value(); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy