Package muntjac :: Package ui :: Module tree :: Class TreeDropCriterion
[hide private]
[frames] | no frames]

Class TreeDropCriterion

source code

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

Lazy loading accept criterion for Tree. Accepted target nodes are loaded from server once per drag and drop operation. Developer must override one method that decides accepted tree nodes for the whole Tree.

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, tree) 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)