java - 丰富的面孔 : how to add static text beside value on InputNumberSlider tooltip?

标签 java javascript jsf-2 richfaces

我正在使用丰富的面孔4 我正在使用输入数字 slider

 <rich:inputNumberSlider value="10" width="500" minValue="1" maxValue="30" step="1"   showInput="false"  enableManualInput="false" showArrows="false" tooltipClass=""  showTooltip="true" label="Days" /> 

我想在工具提示中添加“Days”一词,将其变为“10 Days”而不是“10”。

最佳答案

RichFaces API on <rich:inputNumberSlider> 说:

The "label" attribute is a generic attribute. The "label" attribute provides an association between the component and the message that the component (indirectly) produced. This attribute defines the parameters of a localized error and informational messages that occur as a result of conversion, validation, or other application actions during the request processing lifecycle. With the help of this attribute you can replace the last parameter substitution token shown in the messages. For example, {1} for "DoubleRangeValidator.MAXIMUM" , {2} for "ShortConverter.SHORT".

简而言之 - 标签在所有组件中用作 jsf 消息的参数。

我调查过richfaces sources对于 <rich:inputNumberSlider>用户界面 JavaScript。可以在某些地方更改 javascript,添加硬编码的“Days”字符串。为了实现这一目标,除了重新编译源代码之外,我想不出任何其他选择。

我建议在其他地方指定该 slider 测量天数。

关于java - 丰富的面孔 : how to add static text beside value on InputNumberSlider tooltip?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10995444/

相关文章:

java - 需要在 HTML+JavaScript 的客户端和 Java/C++ 的服务器端程序之间进行通信

javascript - 单击 svg 路径并更改所选组件上的选项值

jsf - #{bean.function} 和#{bean.function()} 有什么区别?

javascript - while循环一元递增和递减不起作用

jsf - 选择一个 selectOneMenu 后渲染其他 selectOneMenu 组件

jsf - 如何将默认值设置为 <h :selectOneMenu>

java包和相互导入

java - 不同类中的方法重载

java - 正则表达式查询出现致命信号 11 (SIGSEGV) 错误

asp.net - 检测 ASP.NET 中客户端 DOM 更改服务器端 : Is It Possible?