Package muntjac :: Package ui :: Module abstract_select :: Class TargetItemIs
[hide private]
[frames] | no frames]

Class TargetItemIs

source code

                                                   object --+            
                                                            |            
    event.dd.acceptcriteria.accept_criterion.IAcceptCriterion --+        
                                                                |        
event.dd.acceptcriteria.client_side_criterion.ClientSideCriterion --+    
                                                                    |    
                                             AbstractItemSetCriterion --+
                                                                        |
                                                                       TargetItemIs

Criterion which accepts a drop only if the drop target is (one of) the given IItem identifier(s). Criterion can be used only on a drop targets that extends AbstractSelect like Table and Tree. The target and identifiers of valid Items are given in constructor.

Instance Methods [hide private]
 
__init__(self, select, *itemId)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
accept(self, dragEvent)
Validates the data in event to be appropriate for the DropHandler.drop method.
source code

Inherited from AbstractItemSetCriterion: paintContent

Inherited from event.dd.acceptcriteria.client_side_criterion.ClientSideCriterion: getIdentifier, isClientSideVerifiable, paint, paintResponse

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, select, *itemId)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • select - the select implementation that is used as a drop target
  • itemId - the identifier(s) that are valid drop locations
Overrides: object.__init__

accept(self, dragEvent)

source code 

Validates the data in event to be appropriate for the DropHandler.drop method.

Note that even if your criterion is validated on client side, you should always validate the data on server side too.

Overrides: event.dd.acceptcriteria.accept_criterion.IAcceptCriterion.accept
(inherited documentation)