Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.cantaa.util.wicket.behaviors;
Sets the visibility of the attached component, controlled by the Boolean Model

Hans Lesmeister
public class VisibilityBehavior extends Behavior {
    private IModel<BooleanvisibilityModel;
    private final boolean negate;
    public VisibilityBehavior(IModel<BooleanvisibilityModel) {


visibilityModel The model that controls the visibility of the attached component
negate false (def.): the component's visibility is set according the model, i.e. if the model is true, then visibility is set to true as well. If negate = true then the opposite happens: if the model is true then the visibility of the component is set to false
    public VisibilityBehavior(IModel<BooleanvisibilityModelboolean negate) {
        this. = visibilityModel;
        this. = negate;
    public void onConfigure(Component component) {
        if ( != null) {
            if () {
            } else {
New to GrepCode? Check out our FAQ X