我在数据表中有四列,我需要使用两个命令链接进行两个单独的操作,我需要一个包含两个菜单项的上下文菜单。 上下文菜单显示和操作侦听器仅触发仅具有输出文本的列,而对于具有此错误的命令链接的列则失败
Received 'java.lang.NullPointerException' when invoking action listener '#{displayIssuesBean.moveIssue()}' for component 'moveIssueFromNextSprintToCurrentSprint'
17:29:51,524 SEVERE [javax.faces.event] (http--127.0.0.1-8080-6) java.lang.NullPointerException
我甚至尝试使用命令按钮,但问题仍在继续 请提前帮助我
有没有办法让上下文菜单只能使用一个列,并且选择需要上下文菜单的整个行和动作侦听器工作?
<p:contextMenu for="currentSprint">
<p:menuitem id="moveIssueFromCurrentSprintToNextSprint"
value="#{msg['prometheus_movetonextsprint']}"
icon="ui-icon-circle-arrow-s"
update="currentBacklog,currentSprint,nextSprint"
actionListener="#{displayIssuesBean.moveIssue}">
<f:param name="fromIssue" value="3" />
<f:param name="toIssue" value="2" />
</p:menuitem>
</p:contextMenu>
<p:dataTable id="currentSprint" var="currentSprintList"
value="#{displayIssuesBean.currentSprintList}" scrollable="true"
style="width:1000px;"
emptyMessage="#{msg['prometheus_issuesdisplayemptymessage']}"
draggableRows="true" rowKey="#{currentSprintList.title}"
sortBy="#{currentSprintList.priorityOrder}"
selection="#{displayIssuesBean.currentSprintSelectedIssue}"
selectionMode="single" ajax="false">
<p:ajax event="rowReorder"
listener="#{displayIssuesBean.onRowReorderCurrentSprint}"
update="currentSprint" />
<f:facet name="header">#{msg['prometheus_issues']}</f:facet>
<p:column headerText="#{msg['prometheus_priority']}">
<h:outputText value="#{currentSprintList.priorityOrder}" />
</p:column>
<p:column headerText="#{msg['prometheus_number']}">
<p:commandLink action="#{menuBarBean.navigateToModifyIssue}"
value="#{currentSprintList.issueNumber}" ajax="false">
<f:setPropertyActionListener target="#{modifyIssueBean.issueId}"
value="#{currentSprintList.issueNumber}" />
</p:commandLink>
</p:column>
<p:column headerText="#{msg['prometheus_title']}">
<h:commandLink action="#{menuBarBean.navigateToViewIssue}"
value="#{currentSprintList.title}" target="_blank">
<f:setPropertyActionListener target="#{viewIssueBean.issueId}"
value="#{currentSprintList.issueNumber}" />
<f:setPropertyActionListener target="#{viewIssueBean.locale}"
value="#{loginBean.locale}" />
</h:commandLink>
</p:column>
<p:column headerText="#{msg['prometheus_type']}">
<h:outputText value="#{currentSprintList.issueType}" />
</p:column>
</p:dataTable>