Another approach is to create a converter component, which is a component that consumes an action of one type and produces a property of another type.
另一种方法是创建转换器组件,该组件使用一种类型的行为并产生另一种类型的属性。
The temperature Converter component has a method called convert which accepts the given temperature in Celsius as input and returns the corresponding temperature in Fahrenheit as the output.
Temperature Converter组件具有名为convert的方法,该方法接受以摄氏度表示的给定温度,并将返回对应的华氏度温度作为输出。
This is where the converter must convert the request string value into the desired object type, and then return the object for storage in the corresponding JSF component.
转换器必须在这里将请求字符串转换为所需的对象类型,然后返回这个对象,将它存储在相应的JSF组件中。
应用推荐