• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 27. Principal Annotations > Step 3: Registering the Components

Step 3: Registering the Components

Now that you have an adapter, you need to register it as such. Also, you need to create an edit form that allows you to edit the values. Here's the code to do these things:

01 <configure
02     xmlns="http://namespaces.zope.org/zope"
03     xmlns:browser="http://namespaces.zope.org/browser"
04     i18n_domain="principalinfo">
05
06   <adapter
07       factory=".info.PrincipalInformation"
08       provides=".interfaces.IPrincipalInformation"
09       for="zope.app.security.interfaces.IPrincipal"
10       permission="zope.ManageServices"
11       />
12
13   <browser:editform
14       name="userInfo.html"
15       schema=".interfaces.IPrincipalInformation"
16       for="zope.app.security.interfaces.IPrincipal"
17       label="Change User Information"
18       permission="zope.ManageServices"
19       menu="zmi_views" title="User Info" />
20 </configure>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint