public class TargetDetailIs extends ClientSideCriterion
Constructor and Description |
---|
TargetDetailIs(String dataFlavor,
Boolean true1) |
TargetDetailIs(String dataFlavor,
String value)
Constructs a criterion which ensures that the value there is a value in
TargetDetails that equals the reference value. |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(DragAndDropEvent dragEvent)
Validates the data in event to be appropriate for the
DropHandler.drop(DragAndDropEvent) method. |
protected String |
getIdentifier() |
void |
paintContent(PaintTarget target) |
isClientSideVerifiable, paint, paintResponse
public TargetDetailIs(String dataFlavor, String value)
TargetDetails
that equals the reference value.dataFlavor
- the type of data to be checkedvalue
- the reference value to which the drop target detail will be
comparedpublic void paintContent(PaintTarget target) throws PaintException
paintContent
in class ClientSideCriterion
PaintException
public boolean accept(DragAndDropEvent dragEvent)
AcceptCriterion
DropHandler.drop(DragAndDropEvent)
method.
Note that even if your criterion is validated on client side, you should always validate the data on server side too.
protected String getIdentifier()
getIdentifier
in class ClientSideCriterion
Copyright © 2017 Vaadin Ltd. All rights reserved.