[ https://issues.apache.org/jira/browse/FELIX-3880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13566600#comment-13566600 ]
Bertrand Delacretaz commented on FELIX-3880: -------------------------------------------- Each element gets a help link *placeholder*, which is initially invisible on the config form. They are enhanced by the javascript code that can be plugged in with the FELIX-3879 mechanism, and which can decide if a specific parameter gets a link or not. We could make the decision to generate a link or not server-side, but assuming you need to query an external service (like a docs website) to find out if a link is available that would slow down the config display, while with my client-side solution the links are generated asynchronously, once the form is displayed. Generating help *texts* server-side won't work for my use case - my goal is to have those links point to a website maintained by a docs team and/or system users, so totally decoupled from the system where this runs. > [PATCH] placeholders for help links in the webconsole > ----------------------------------------------------- > > Key: FELIX-3880 > URL: https://issues.apache.org/jira/browse/FELIX-3880 > Project: Felix > Issue Type: Improvement > Components: Web Console > Affects Versions: webconsole-4.0.0 > Reporter: Bertrand Delacretaz > Priority: Minor > Fix For: webconsole-4.0.2 > > Attachments: FELIX-3880.patch, helplinks.jpg > > > The attached patch adds placeholders for help links to the webconsole, like > <span > class="configHelpLink" > data-config-param="ds.loglevel" > data-config-pid="org.apache.felix.scr.ScrService" > data-config-name="SCR Log Level" > data-config-description="Allows limiting the amount..." > > </span> > which can be enhanced with client-side javascript to build customized help > links. > The patch also adds a script reference at the end of the config page: > <script > type="text/javascript" > src="/system/console/overridable/scripts/confighelp.js"></script> > which by default points to an empty script provided by the FELIX-3879 > mechanism, overridable by providing a Servlet service that returns the > desired code. > I have created an example such servlet/script at > https://github.com/bdelacretaz/felix-confighelp-demo, to test this feature: > -Apply the FELIX-3879 patch and this patch and install the patched webconsole > -Install the felix-confighelp-demo bundle > -The /system/console/overridable/scripts/confighelp.js path must then return > the felix-confighelp-demo's confighelp.js script > -Open a config form in the console, help links should be present next to each > parameter, which point to google.com for the demo -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira