Package ch.tocco.nice2.netui.spi.bind
Interface CustomDataProvider
- All Known Implementing Classes:
- AbstractPrivilegedRelationDataProvider,- AttachmentMimeTypeIconCustomDataProvider,- AuthorPostCountProvider,- BinarySizeCustomDataProvider,- EditedUrlCustomDataProvider,- EntityDocThumbnailDataProvider,- EvaluationSourceDataProvider,- ExternalTemplateCustomDataProvider,- ForumAdministratorProvider,- FreemarkerTitleDataProvider,- IsForumSubscribedDataProvider,- MarkProvider,- MembershipAdministrationAddressPrivilegedCustomDataProvider,- MembershipAdministrationUserPrivilegedCustomDataProvider,- MimeTypeCustomDataProvider,- MimeTypeIconCustomDataProvider,- PostDocumentsDataProvider,- ReferencesCustomDataProvider,- ReservationRegistrationUserCustomDataProvider,- ShowRegisterButtonProvider,- SubscriptionProvider,- ThumbnailCustomDataProvider,- UrlCustomDataProvider
Deprecated.
This interface can be implemented to display custom data in a grid or form. For example if you want to display, if the current principal is subscribed to a certain entity or to list 1:n relations.
The provider can be referenced in form model by using the prefix "custom:" and the full qualified class name.
The declaration in the form model:
 <column name="subscribed">
    <checkbox data="custom:nice2.optional.forum.SubscriptionProvider"/>
 </column>
 Please note, that the using component for the custom data must be specified (don't just use <field ... >), because there exists no such field in the entity model to get this information from.
If you are using something like a DataView and you need some fancy data,
 you can use a custom-data-field and return a TypedValue of type "custom".
An example of how to do this:
 CustomData<FancyDataObject> data = new CustomData<FancyDataObject>(myFancyDataObject);
 Type<CustomData<FancyDataObject>> customType = (Type<CustomData<FancyDataObject>>) typeManager.requireType("custom");
 return new TypedValue<CustomData<FancyDataObject>>(customType, data);
 - 
Method SummaryModifier and TypeMethodDescriptionDeprecated.Collects the custom data for this field and returns it as aTypedValue.
- 
Method Details- 
getDataDeprecated.Collects the custom data for this field and returns it as aTypedValue.- Parameters:
- entity- The current entity, which gets loaded in the grid or form (is null in create scope).
- Returns:
- a TypedValuecontaining the custom data for this field.
- Throws:
- CustomDataProviderException- in case of error.
 
 
-