List of usage examples for org.apache.wicket Component setVisibilityAllowed
public final Component setVisibilityAllowed(boolean allowed)
From source file:org.devgateway.toolkit.forms.wicket.components.form.GenericEnablingBootstrapFormComponent.java
License:Open Source License
/** * Add component that is bound to the value of this current component, * changing the selected element of this component may influence if the * bound component is visible or not. By default all bound components are * not visible// ww w . j a v a 2 s. com * * @param c * @return */ public GenericEnablingBootstrapFormComponent<TYPE, FIELD> addBoundComponent(final Component c) { TYPE selectedValue = this.getModelObject(); c.setVisibilityAllowed(selectedValue == null ? false : boundComponentsVisibilityAllowed(selectedValue)); visibilityBoundComponents.add(c); return this; }
From source file:org.devgateway.toolkit.forms.wicket.components.form.GenericEnablingBootstrapFormComponent.java
License:Open Source License
/** * This is the negated version of/* w ww.j a va 2 s.c o m*/ * {@link GenericEnablingBootstrapFormComponent#addBoundComponent(Component)} * * @param c * @return */ public GenericEnablingBootstrapFormComponent<TYPE, FIELD> addReverseBoundComponent(final Component c) { TYPE selectedValue = this.getModelObject(); c.setVisibilityAllowed(selectedValue == null ? false : !boundComponentsVisibilityAllowed(selectedValue)); visibilityReverseBoundComponents.add(c); return this; }