Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Primefaces 什么是转换器=";“主题”;请参阅p:pickList示例中的?_Primefaces_Jsf 2 - Fatal编程技术网

Primefaces 什么是转换器=";“主题”;请参阅p:pickList示例中的?

Primefaces 什么是转换器=";“主题”;请参阅p:pickList示例中的?,primefaces,jsf-2,Primefaces,Jsf 2,文件包含声明 <p:pickList id="PojoPickList" value="#{pickListView.themes}" var="theme" effect="bounce" itemValue="#{theme}" itemLabel="#{theme.displayName}" showSourceControls="true" showTargetControls="true" showCheckbox="true" responsive="t

文件包含声明

<p:pickList id="PojoPickList" value="#{pickListView.themes}" var="theme" effect="bounce"
            itemValue="#{theme}" itemLabel="#{theme.displayName}" showSourceControls="true" showTargetControls="true" showCheckbox="true" responsive="true"
            showSourceFilter="true" showTargetFilter="true" filterMatchMode="contains"
            converter="theme">

converter=“theme”
指的是什么?唯一可能的参考是
var
的值,但这不是有效的转换器,是吗?将示例提取到一个单独的Java EE项目中并在GlassFish 4.1上运行它,毫不奇怪会导致失败~
找不到命名对象主题
(请参阅作为git存储库的规定)。

在showcase文件中丢失,您可以在其中看到使用的真实名称,注意“主题”是一个键入错误。在示例项目中使用以下代码

<p:pickList id="PojoPickList" value="#{pickListView.themes}" var="theme" effect="bounce"
                        itemValue="#{theme}" itemLabel="#{theme.displayName}" showSourceControls="true" showTargetControls="true" showCheckbox="true"
                        showSourceFilter="true" showTargetFilter="true" filterMatchMode="contains" converter="themeConverter" responsive="true">


我还将尝试在github项目中进行修复。

尝试使用themeConverter代替主题。看起来是打字错误。@SumitGulati:请将此创建为一个答案,并添加themeConverter代码在运行/在线showcase中丢失,但在github的源代码中:谢谢@Kukeltje。当然,我会发布答案。