Package muntjac :: Package ui :: Module table :: Class TableDropCriterion
[hide private]
[frames] | no frames]

Class TableDropCriterion

source code

                                                   object --+        
                                                            |        
    event.dd.acceptcriteria.accept_criterion.IAcceptCriterion --+    
                                                                |    
event.dd.acceptcriteria.server_side_criterion.ServerSideCriterion --+
                                                                    |
                                                                   TableDropCriterion

Lazy loading accept criterion for Table. Accepted target rows are loaded from server once per drag and drop operation. Developer must override one method that decides on which rows the currently dragged data can be dropped.

Initially pretty much no data is sent to client. On first required criterion check (per drag request) the client side data structure is initialized from server and no subsequent requests requests are needed during that drag and drop operation.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
getIdentifier(self) source code
 
accept(self, dragEvent)
Validates the data in event to be appropriate for the DropHandler.drop method.
source code
 
paintResponse(self, target)
This needs to be implemented iff criterion does some lazy server side initialization.
source code
 
getAllowedItemIds(self, dragEvent, table, visibleItemIds)
Returns: the set of identifiers for items on which the dragEvent will be accepted
source code

Inherited from event.dd.acceptcriteria.server_side_criterion.ServerSideCriterion: isClientSideVerifiable, paint, paintContent

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)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

getIdentifier(self)

source code 
Overrides: event.dd.acceptcriteria.server_side_criterion.ServerSideCriterion.getIdentifier

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)

paintResponse(self, target)

source code 

This needs to be implemented iff criterion does some lazy server side initialization. The UIDL painted in this method will be passed to client side drop handler implementation. Implementation can assume that accept is called before this method.

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

getAllowedItemIds(self, dragEvent, table, visibleItemIds)

source code 
Parameters:
  • dragEvent
  • table - the table for which the allowed item identifiers are defined
  • visibleItemIds - the list of currently rendered item identifiers, accepted item id's need to be detected only for these visible items
Returns:
the set of identifiers for items on which the dragEvent will be accepted