Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Private Attributes
archetypes.kss.commands.validation.ValidationCommands Class Reference
Inheritance diagram for archetypes.kss.commands.validation.ValidationCommands:
Inheritance graph
[legend]
Collaboration diagram for archetypes.kss.commands.validation.ValidationCommands:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def issueFieldError
def getCommandSet

Public Attributes

 view
 context
 request
 commands

Static Private Attributes

int __allow_access_to_unprotected_subobjects__ = 1

Detailed Description

Definition at line 6 of file validation.py.


Member Function Documentation

def kss.core.kssview.CommandSet.getCommandSet (   self,
  name 
) [inherited]

Definition at line 180 of file kssview.py.

00180 
00181     def getCommandSet(self, name):
00182         return self.view.getCommandSet(name)
00183 
# BBB deprecated

Definition at line 10 of file validation.py.

00010 
00011     def issueFieldError(self, fieldname, error):
00012         'Issue this error message for the field'
00013         context = aq_inner(self.context)
00014         ksscore = self.getCommandSet('core')
00015         selector = ksscore.getCssSelector('div#archetypes-fieldname-%s div.fieldErrorBox' % fieldname)
00016         if error:
00017             ksscore.replaceInnerHTML(selector, error)
00018             errorklass = ' error'
00019         else:
00020             ksscore.clearChildNodes(selector)
00021             errorklass = ''
00022         klass = "field%s Archetypes%sfield" % (errorklass, fieldname)
00023         kssattr = context.restrictedTraverse('kss_field_decorator_view').getKssClasses(fieldname)
00024         if kssattr:
00025             klass += ' ' + kssattr
00026         # set the field style in the required way
00027         ksscore.setAttribute(
00028             ksscore.getHtmlIdSelector('archetypes-fieldname-%s' % fieldname),
00029             'class', klass)

Here is the call graph for this function:


Member Data Documentation

Definition at line 8 of file validation.py.

Definition at line 178 of file kssview.py.

Definition at line 176 of file kssview.py.

Definition at line 177 of file kssview.py.

Definition at line 175 of file kssview.py.


The documentation for this class was generated from the following file: