Package muntjac :: Package event :: Package dd :: Package acceptcriteria :: Module server_side_criterion :: Class ServerSideCriterion
[hide private]
[frames] | no frames]

Class ServerSideCriterion

source code

                       object --+    
                                |    
accept_criterion.IAcceptCriterion --+
                                    |
                                   ServerSideCriterion
Known Subclasses:

Parent class for criteria which are verified on the server side during a drag operation to accept/discard dragged content (presented by Transferable).

Subclasses should implement the IAcceptCriterion.accept method.

As all server side state can be used to make a decision, this is more flexible than ClientSideCriterion. However, this does require additional requests from the browser to the server during a drag operation.


See Also:
IAcceptCriterion, ClientSideCriterion
Instance Methods [hide private]
 
isClientSideVerifiable(self)
Returns whether the criteria can be checked on the client or whether a server request is needed to check the criteria.
source code
 
paint(self, target) source code
 
paintContent(self, target) source code
 
paintResponse(self, target)
This needs to be implemented iff criterion does some lazy server side initialization.
source code
 
getIdentifier(self) source code

Inherited from accept_criterion.IAcceptCriterion: accept

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

isClientSideVerifiable(self)

source code 

Returns whether the criteria can be checked on the client or whether a server request is needed to check the criteria.

This requirement may depend on the state of the criterion (e.g. logical operations between criteria), so this cannot be based on a marker interface.

Overrides: accept_criterion.IAcceptCriterion.isClientSideVerifiable
(inherited documentation)

paint(self, target)

source code 
Overrides: accept_criterion.IAcceptCriterion.paint

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: accept_criterion.IAcceptCriterion.paintResponse
(inherited documentation)