标签: jsf
如何在selectOneMenu中使用转换器提供noSelectionLabel?
在selectItem中使用noSelectionLabel在转换器类中使用NullPointerException。
答案 0 :(得分:3)
如果传入的值为null,只需检入转换器,如果是,则立即返回。
if (value == null) { return null; } // ... return convertedValue;