Click or drag to resize

PFView Class

Represents a view displaying items or group of items of one or more content-types, mainly based on a PFQuery.

The list of targetable content-types depends on the scope of the view: Site, Application or Content-Type.

Views can be created runtime or from an application's model.

Inheritance Hierarchy

Namespace:  Packflow.Core
Assembly:  MicaSystems.Packflow.Core (in MicaSystems.Packflow.Core.dll) Version: 1.0.0.0 (3.2.0.306)
Syntax
C#
public class PFView : PFBaseObject

The PFView type exposes the following members.

Constructors
  NameDescription
Public methodPFView
Top
Properties
  NameDescription
Public propertyApplicationContextIds
Gets the ids of application contexts allowed to access the view.
Public propertyBeforeSaveValues
Gets the previous values of modified fields before the latest Save.

Note: this feature is NOT persisted in the database and therefore only concerns this instance.

(Inherited from PFBaseObject.)
Public propertyCanDelete
Checks if the current permission context allows current user to delete this object.
(Inherited from PFBaseObject.)
Public propertyCanRead
Checks if the current permission context allows current user to access this object.
(Inherited from PFBaseObject.)
Public propertyCanUpdate
Checks if the current permission context allows current user to update this object.
(Inherited from PFBaseObject.)
Public propertyContentTypes
Gets the list of content-types whose contents are displayed in the view.
Public propertyCreated
Indicates if this object has been created and is still in database (positive Id).
(Inherited from PFBaseObject.)
Public propertyCreatedAt
Gets the date of creation of this object in the database.
(Inherited from PFBaseObject.)
Public propertyCreatedBy
Gets the user who created this object in the database.
(Inherited from PFBaseObject.)
Public propertyData
Gets the data collection of this object.
(Inherited from PFBaseObject.)
Public propertyDateObjectCreation
Gets the date of the creation of this object in memory.
(Inherited from PFManagedObject.)
Public propertyDeleted
True if this object is flagged as deleted.
(Inherited from PFBaseObject.)
Public propertyDeletedAt
Date of the suppression of this object.
(Inherited from PFBaseObject.)
Public propertyDeletedBy
The user who deleted this object.
(Inherited from PFBaseObject.)
Public propertyDescription
Gets or sets the description.
Public propertyDisableAllLinks
Gets or sets a value indicating whether all links should be disabled in this view.

Note: this functionality is not currently active.

Public propertyDisplayName
Gets or sets the display name. On the application (or content-type) level, this name is translated from the model.
Public propertyEditorUrl
Gets the url of the edition page of the view.
Public propertyEnableVersionMergeToResolveSaveConflicts
Gets a value indicating whether versions can be merged to resolve save conflicts. If an object is saved with an older version than the last persisted (in database), the system will try to merge the versions values (if no conflicts between values) and will then save the merged item to database. Note : this setting is NOT persisted and will affect this object instance only.
(Inherited from PFBaseObject.)
Public propertyExists
Indicates if this object has been created, still exists in database and is not flagged for suppression.
(Inherited from PFBaseObject.)
Public propertyFixedWidths
Gets or sets the fixed widths, overriding some of the fields' width.
Public propertyGuid
Gets the GUID identifying this object. Must be used if Id is no more viable, example if content were merged.
(Inherited from PFBaseObject.)
Public propertyHasPendingModifications
Checks if there is pending changes. Will check if the values are different from the currently persisted values.
(Inherited from PFBaseObject.)
Public propertyHasPendingPermissionsModifications
Checks if there is pending modifications in permissions. Will compute permissions (RUD) and check if there is differences with current persisted permissions.
(Inherited from PFBaseObject.)
Public propertyHidden
Gets or sets a value indicating whether this PFView is hidden (in the navigation).
Public propertyId
Gets the id identifying this object. Must be used to find or identify an object because faster than Guid.
(Inherited from PFBaseObject.)
Public propertyInlineCreation
Gets or sets a value indicating whether inline creation can be used on this view.
Public propertyInlineEditing
Gets or sets a value indicating whether inline edition can be used on this view.
Public propertyInlineSuppression
Gets or sets a value indicating whether inline deletion can be used on this view.
Public propertyIsDefaultView
Gets a value indicating whether this view is default view for the parent object.
Public propertyIsModelView
Gets a value indicating whether this view has been created from an application's model.
Public propertyKeepBeforeSaveValues
Gets or sets a value indicating whether the Save should keep a collection of the modified fields previous values.

Note: this feature is NOT persisted in the database and therefore only concerns this instance.

(Inherited from PFBaseObject.)
Public propertyLogger
Gets the logger, used to log any useful warning, error or information in the database.
(Inherited from PFManagedObject.)
Public propertyLogIdentification
Gets a technical text representing this object.
(Overrides PFBaseObjectLogIdentification.)
Public propertyModelView
Gets the equivalent object of this view in the parent application's model.
Public propertyModelViewGuid
Gets the GUID of this view in the parent application's model.
Public propertyName
Gets or sets the view name.
Public propertyOrderNo
Gets or sets a number used to sort the parent content-type's views when its ViewOrderType is set to OrderNo.
Public propertyParentObject
Gets the parent object (can be a Site, Application or Content-Type).
Public propertyPermissionContext
Gets an object calculating permissions on demand.
Public propertyPermissions
Gets the permission set (RUD permissions) of this item.
(Inherited from PFBaseObject.)
Protected propertyPermissionSetDeleteId
Id of the permission set for Delete access.
(Inherited from PFBaseObject.)
Protected propertyPermissionSetDeleteXml
XML of serialized permission set for Delete access.
(Inherited from PFBaseObject.)
Protected propertyPermissionSetReadId
Id of the permission set for Read access.
(Inherited from PFBaseObject.)
Protected propertyPermissionSetReadXml
XML of serialized permission set for Read access.
(Inherited from PFBaseObject.)
Protected propertyPermissionSetUpdateId
Id of the permission set for Update access.
(Inherited from PFBaseObject.)
Protected propertyPermissionSetUpdateXml
XML of serialized permission set for Update access.
(Inherited from PFBaseObject.)
Public propertyPinned
Gets or sets a value indicating whether the view should appear in the top of the navigation breadcrumbs views list.
Public propertyQuery
Gets or sets the query executed to fill the view.
Public propertyScope
Gets the scope of the view, specifying the type of parent object.
Public propertySite
Gets the root of the persisted objects tree.
(Inherited from PFBaseObject.)
Public propertyUpdatedAt
Gets the date of the last update of this object.
(Inherited from PFBaseObject.)
Public propertyUpdatedBy
Gets the user who last updated this object in the database.
(Inherited from PFBaseObject.)
Public propertyUrl
Gets the url of the view in the navigation.
Public propertyVersionNumber
Gets the version number of this object in database. Incremented after each save.
(Inherited from PFBaseObject.)
Public propertyVisibilityScope
Gets the rule used to know which users can access the view.
Top
Methods
  NameDescription
Public methodStatic memberCheckFieldsAvailability
Checks how all fields of multiple content-types can be used in a view.
Public methodCustomizeGroupsBeforeRendering
Customizes the groups list before rendering in the gridview.

Note: it is NOT recommended to customize the list in a view with paging as it could provide the user with unexpected results. Moreover if the paging is enabled and a next page is available, the items list will contain an extra-item at the end.

Public methodCustomizeGroupTitle(Html, PFField, Object, DictionaryString, Object)
Customizes the title of a group being displayed in the view.

By default, returns "{GroupFieldDisplay} : {defaultValue}".

Public methodCustomizeGroupTitle(Html, PFField, PFQuery, Object, DictionaryString, Object)
Customizes the title of a group being displayed in the view.

By default, customizes some system fields (WorkflowContentTypeId, StateId, ContentTypeId), otherwise returns "{GroupFieldDisplay} : {defaultValue}" (from the other CustomizeGroupTitle method).

Public methodCustomizeItemsBeforeRendering
Customizes the items list before rendering in the gridview.

Note: it is NOT recommended to customize the list in a view with paging as it could provide the user with unexpected results. Moreover if the paging is enabled and a next page is available, the items list will contain an extra-item at the end.

Public methodCustomizeQuery
Method used to customize the view query. Override this method to change the query of a view before its execution. Note: this method is also called during the installation for model views.
Public methodDelete
Flags this object as deleted.

If it fails, throws an error.

If the object could not be deleted because it does not yet exist in database, returns false.

If successful, returns true.

(Inherited from PFBaseObject.)
Public methodGetFields
Gets the list of fields displayed in the view.
Public methodGetFieldsNames
Gets the list of field names that will be displayed in the view.
Protected methodGetNewPermissionContext
Creates a new permission context based on current object type.
(Overrides PFBaseObjectGetNewPermissionContext.)
Public methodGetParents
Gets the structure objects parents of this view.
Public methodGetQuickSearchFields
Gets the list of fields filtered during quick searches on this view.

Note : returned fields must be common to all content-types and filterable with a text.

Public methodGetSerializedQuery
Gets the serialized query.
Public methodGetSiblings
Gets the list of views of the parent object.
Protected methodInitializeLogger
Use this method to override the way the logger is initialized.
(Inherited from PFBaseObject.)
Protected methodProcessPermissions
Compute permissions from permission context and set in data properties.
(Inherited from PFBaseObject.)
Public methodRunInTransactionArea
Runs a code with a transaction on object connection. If there is no current transaction and if the code succeed, transaction is committed. If an exception is thrown, transaction is rollback.
(Inherited from PFBaseObject.)
Public methodSave
Applies the data of this object in the database.
(Inherited from PFBaseObject.)
Protected methodSaveObjectsInDataCollection
Saves data loaded from temp specialized object in data properties collection before save or check hasPendingChanges.
(Overrides PFBaseObjectSaveObjectsInDataCollection.)
Public methodSetFields
Sets the list of fields to show in the view. This methods changes the query.
Public methodSetFixedWidth
Forces a width (in pixels) for the specified field.
Public methodSubViews_Add
Adds a new subview. Currently not active.
Public methodSubViews_Get
Gets the children subviews. Currently not active.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldStatic memberFieldName_ApplicationContexts
Column name in database.
Public fieldStatic memberFieldName_DisableAllLinks
Column name in database.
Public fieldStatic memberFieldName_DisplayName
Column name in database.
Public fieldStatic memberFieldName_Hidden
Column name in database.
Public fieldStatic memberFieldName_InlineCreation
Column name in database.
Public fieldStatic memberFieldName_InlineEditing
Column name in database.
Public fieldStatic memberFieldName_InlineSuppression
Column name in database.
Public fieldStatic memberFieldName_ModelView
Column name in database.
Public fieldStatic memberFieldName_ModelViewGuid
Column name in database.
Public fieldStatic memberFieldName_Name
Column name in database.
Public fieldStatic memberFieldName_OrderNo
Column name in database.
Public fieldStatic memberFieldName_Pinned
Column name in database.
Public fieldStatic memberFieldName_VisibilityScope
Column name in database.
Top
Extension Methods
  NameDescription
Public Extension MethodAsT
Casts an object to another type. Returns default(T) if the object is null.
(Defined by Utils_Other.)
Public Extension MethodEqualsAll
Checks that this object is equal to every object in parameters.
(Defined by Utils_Other.)
Public Extension MethodEqualsAny
Checks that this object is equal to at least one of the parameters.
(Defined by Utils_Other.)
Public Extension MethodGetString
Converts an object to String using ToString() method, else returns String.Empty.
(Defined by Utils_Other.)
Public Extension MethodIsGenericListOverloaded.
Checks if this object is a System.Collections.Generic.List.
(Defined by Utils_Linq.)
Public Extension MethodIsGenericList(Type)Overloaded.
Checks if this object is a System.Collections.Generic.List using type as T.
(Defined by Utils_Linq.)
Public Extension MethodSerializeOverloaded.
Serializes an object into an XML document.
(Defined by Utils_Xml.)
Public Extension MethodSerialize(String)Overloaded.
Serializes an object into an XML document.
(Defined by Utils_Xml.)
Public Extension MethodSerializeJsonOverloaded.
Serializes an object using a DataContractJsonSerializer.
(Defined by Utils_String.)
Public Extension MethodSerializeJson(ListType)Overloaded.
Serializes an object using a DataContractJsonSerializer.
(Defined by Utils_String.)
Public Extension MethodSerializeJson(DataContractJsonSerializerSettings)Overloaded.
Serializes an object using a DataContractJsonSerializer.
(Defined by Utils_String.)
Top
See Also