gpt4 book ai didi

java - p :commandLink action does not fire

转载 作者:行者123 更新时间:2023-12-01 07:26:34 25 4
gpt4 key购买 nike

p:commandLink 操作不会在我的 View bean 上触发。我尝试了很多东西,但没有实现:((应该有一个简单的问题。如果你能帮助我,我将不胜感激。

<p:dataTable var="message" value="#{messagesView.dataModel}"
id="messageDt" emptyMessage="#{msg['kayitBulunamadi']}"
lazy = "true" paginator="true" rows="10"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="10,15,30" currentPageReportTemplate="{currentPage} / {totalPages}">

<p:column styleClass="min-image">
<f:facet name="header">
<h:outputText value="Durum" />
</f:facet>
<p:commandLink ajax="true" process="@this"
action="#{messagesView.selectedMessages(message)}"
oncomplete="PF('msjDialog').show();">
<!--<p:graphicImage value="#{message.mesajDurumu=='NEW'?'/images/DealerNewMessages.png':'/images/DealerReadMessage.png'}" style="width: 60px; height: 60px;" />-->
<p:graphicImage rendered="#{message.mesajDurumu=='REP'}"
value="/images/email-send.png" style="width: 30px; height: 30px;" />
<p:graphicImage rendered="#{message.mesajDurumu=='NEW'}"
value="/images/DealerNewMessages.png"
style="width: 30px; height: 30px;" />
<p:graphicImage
rendered="#{message.mesajDurumu!='REP' and message.mesajDurumu!='NEW'}"
value="/images/DealerReadMessage.png"
style="width: 30px; height: 30px;" />
</p:commandLink>
</p:column>

Bean 代码:

public void selectedMessages(DealerMessages msj) {
SELECTedMessage = msj;
oncekiMesajiAl();
UpdateMessageStatusRead(msj);
}

最佳答案

<p:commandLink>必须嵌套在 <h:form> 内才能正常工作。

关于java - p :commandLink action does not fire,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23647989/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com