D2W: Grouping fields in edit form

To group your edit form fields use sectionsContents instead of displayPropertyKeys. A rule for a User for might look like this:

LH: pageConfiguration = 'EditUser'
RH: sectionsContents =
(
  (
    "Personal Info",
    "salutation", 
    "firstName", 
    "lastName", 
    "emailAddress", 
    "phone", 
    "phoneExtension", 
    "mobile"), 
  (	
    "Address", 
    "address.address1", 
    "address.address2", 
    "address.city", 
    "address.province", 
    "address.postalCode"), 
  (	
    "Details", 
    "organization", 
    "role", 
    "loginCredential.password", 
    "loginCredential.isActive", 
    "loginCredential.role"
  )
)

This will result in a form that looks something like this:

d2w_segmented_form.gif

Standard assumptions apply: Wonder’s D2W classes are being used.

D2W: List default sort order

Assumptions: Your D2WList page inherits from ERD2WListPage in Wonder (and if it doesn’t it should).

Apply a default sort order on the list with a rule that looks like this:

LH: task = 'list' and entity.name = 'User'
RH: defaultSortOrdering = ( "name",
"compareAscending" )

Class: com.webobjects.directtoweb.Assignment

Also available are:

compareAscending
compareCaseInsensitiveAscending
compareCaseInsensitiveDescending
compareDescending.