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

com.databasesandlife.util.wicket.DisplayNoneRemover Maven / Gradle / Ivy

There is a newer version: 21.0.1
Show newest version
package com.databasesandlife.util.wicket;

import org.apache.wicket.AttributeModifier;

/**
 * Removes "display:none" from an HTML tag. 
 *
 * @author This source is copyright Adrian Smith and licensed under the LGPL 3.
 * @see Project on GitHub
 */
@SuppressWarnings("serial")
public class DisplayNoneRemover extends AttributeModifier {
    public DisplayNoneRemover() { super("style", ""); }
    @Override protected String newValue(final String currentValue, final String replacementValue) {
        if (currentValue == null) return null;
        return currentValue.replaceAll("display:\\s*none", "");
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy