Movatterモバイル変換


[0]ホーム

URL:


BloomreachBloomreach
Hippo CMS

Bloomreach Documentation version

Bloomreach.com

Poll Plugin Developer Guide - HST Components

Delegation

The Poll plugin provides the standard poll component class org.onehippo.forge.poll.component.PollComponent, taking care of the processing logic behind voting on and displaying a poll. For the case where your project requires the use of a custom poll component, the Poll plugin has been implemented in such a way that the poll logic is encapsulated in the org.onehippo.forge.poll.component.PollProvider class, to which thePollComponent delegates. Like this, a custom poll component can easily replace the defaultPollComponent by delegating to thePollProvider too.

See the defaultPollComponent for how to delegate the calls to the doActiondoBeforeRender and getParameter functions.

Channel Editor Parameter Support

In order for the Channel Editor to be able to render a configuration dialog, your custom poll component should be annotated using theorg.onehippo.forge.poll.component.PollDocumentComponentInfo interface. As the parameters are defined and handled in thePollProvider, thePollDocumentComponentInfo interface can be re-used for custom poll components.

@ParametersInfo(type = PollDocumentComponentInfo.class)public class [...]

Additionally, the custom component should override the getParameter function and delegate it to thePollProvider.

@Overridepublic String getParameter(String name, HstRequest request) {    return PollProvider.getParameter(name, (PollComponentInfo)getParametersInfo(request));}

For more info on seeDefine a Component's Configuration Parameters andAnnotate Channel or Component Configuration Parameters with UI Directives.

Did you find this page helpful?
How could this documentation serve you better?
Cheers!
On this page
    Did you find this page helpful?
    How could this documentation serve you better?
    Cheers!

    [8]ページ先頭

    ©2009-2025 Movatter.jp