org.wicketstuff.minis.model
Class NotModel

java.lang.Object
  extended by org.apache.wicket.model.LoadableDetachableModel<T>
      extended by org.wicketstuff.minis.model.LoadableDetachableDependentModel<Boolean,Boolean>
          extended by org.wicketstuff.minis.model.NotModel
All Implemented Interfaces:
Serializable, org.apache.wicket.model.IDetachable, org.apache.wicket.model.IModel<Boolean>, org.apache.wicket.util.io.IClusterable

public class NotModel
extends LoadableDetachableDependentModel<Boolean,Boolean>

Boolean model that returns the opposite of the dependent Boolean model value. The value returned when the dependent model value is null is configurable -- it defaults to true.

See Also:
Serialized Form

Constructor Summary
NotModel(org.apache.wicket.model.IModel<Boolean> dependentModel)
          Constructor.
NotModel(org.apache.wicket.model.IModel<Boolean> dependentModel, boolean nullValue)
          Constructor.
 
Method Summary
protected  Boolean load()
           
 
Methods inherited from class org.wicketstuff.minis.model.LoadableDetachableDependentModel
getDependentModel, onDetach
 
Methods inherited from class org.apache.wicket.model.LoadableDetachableModel
detach, getObject, isAttached, onAttach, setObject, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NotModel

public NotModel(org.apache.wicket.model.IModel<Boolean> dependentModel)
Constructor.

Parameters:
dependentModel - non-null model this model depends on

NotModel

public NotModel(org.apache.wicket.model.IModel<Boolean> dependentModel,
                boolean nullValue)
Constructor.

Parameters:
dependentModel - non-null model this model depends on
nullValue - the value load() will return if the dependent model value is null
Method Detail

load

protected Boolean load()
Specified by:
load in class org.apache.wicket.model.LoadableDetachableModel<Boolean>


Copyright © 2018. All rights reserved.