|
Re: Scanner Application with injected JavaScript [message #1799021 is a reply to message #1798933] |
Wed, 28 November 2018 20:02 |
|
Hi Bernard,
In development mode, classIds and model class names are transferred to the UI to help with debugging. Because this information is usually internal (and internal information should not be exposed for security reasons), it is not activated on production environments. If you allow it by setting the config property scout.urlHints.enabled=true in your config.properties you may activate the feature dynamically using the URL parameter ?inspector=true. But this is mainly intended for automatic testing (e.g. using the Selenium testing framework that also requires stable IDs) and should not be done on applications exposed to the internet. Reason: enabling the property also allows bypassing minification and caching.
So you can do three things:
1. @Replace the bean org.eclipse.scout.rt.ui.html.json.InspectorInfo (have a look at the code, it is very short) and implement it without the check "if inspector hints enabled". This will then always emit the inspector properties.
2. If you only require a special marker for one specific field in your application, consider adding a custom JS implementation that adds a special marker attribute in the _render() method. This is done most easily with a @ModelVariant, you can read more about this mechanism here: https://eclipsescout.github.io/8.0/technical-guide.html#extensibility
3. Most basic solution: override getConfiguredCssClass() and set a css class with a unique name that does not influence the style but is only used by your scanner to find the field.
Regards,
Beat
|
|
|
|
Powered by
FUDForum. Page generated in 0.03065 seconds