How to display a tooltip with the value of a slider field in a Classic UI AEM dialog?

守給你的承諾、 提交于 2019-12-25 04:03:29

问题


I use Slider xtype in dialog.xml

Is it possible to automatically display the value of this slider? for example - like a tooltip when the value changes

<slider
   jcr:primaryType="cq:Widget"
   fieldLabel="Tile Background Transparency"
   name="./slider"
   width="{Long}200"
   value="42"
   increment="1"
   minValue="0"
   maxValue="100"
   xtype="slider"/>

回答1:


You can use the sliderfield xtype which provides this functionality.

The useTips property allows to enforce the desired behaviour.

<slider
    jcr:primaryType="cq:Widget"
    fieldLabel="Tile Background Transparency"
    name="./slider"
    width="{Long}200"
    value="42"
    increment="1"
    useTips="true"
    minValue="0"
    maxValue="100"
    xtype="sliderfield"/>

Check out the docs for more information.



来源:https://stackoverflow.com/questions/40147453/how-to-display-a-tooltip-with-the-value-of-a-slider-field-in-a-classic-ui-aem-di

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!