因此,我试图将对象值从Bean传递到primefaces数据表中(当前使用primefaces 3.4),但是与此同时我面临两个问题。
1.我似乎找不到任何方法来显示(或表示)数据表中的列中的布尔值。每当我尝试执行此操作时,表将返回完全为空(即使没有布尔列,其他列也将填充来自bean的数据)。
2.另一个更大的问题(我认为与Java有关,而不是与primefaces有关)是我目前从Siebels CRM ONDemand云解决方案中获得了26个不同的对象,每个对象都包含自己的数据类型和属性值。我无法终生确定如何基于特定对象显示的下拉选择来动态显示质数表中的对象字段。到目前为止,我已经设法将这些对象之一的某些字段显示为一种原型,但是我仍然无法显示布尔值,这也是一个噩梦。
任何人都有类似的经历吗?或建议?我已经对此感到困惑了两个多星期了,我快要疯了!
如果需要,我可以提供代码示例或其他详细信息:)
非常感谢,我非常感谢您的帮助!
雷吉
HTML代码:
<p:panel header ="Source Environment" style="margin-bottom:5px;">
<p:dataTable draggableColumns="true" id="tableFieldSet1" value="#{ODComBean.fields}" var="tableFieldSet1" rowKey="#{ODComBean.fields}" selectionMode ="multiple" style="font-family:sans-serif; width:max-content;">
<p:panel header="OD Object Selection" style="margin-bottom:5px;">
<h:panelGrid columns="2" cellpadding="5">
<p:selectOneMenu immediate ="true" id="pickList" value="#{ODComBean.fieldSetData}" effect="fade" style="font-size: 12px; font-family:sans-serif;" >
<f:selectItems value="#{ODComBean.fieldSet}" itemLabel="#{fieldSet.objectName}" var="fieldSet"/>
<p:ajax event="change" update="@form" />
</p:selectOneMenu>
</h:panelGrid>
</p:panel>
<p:panel header ="Source Environment" style="margin-bottom:5px;">
<p:dataTable draggableColumns="true" id="tableFieldSet1" value="#{ODComBean.fields}" var="tableFieldSet1" rowKey="#{ODComBean.fields}" selectionMode ="multiple" style="font-family:sans-serif; width:max-content;">
<p:column headerText="Type" styleClass="singleLine" style="height: 10px; font-size: 8pt;">
<h:outputText …Run Code Online (Sandbox Code Playgroud)