Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/14.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
Java p:InputExtArea值不为';无法获取最新的值_Java_Spring_Jsf_Primefaces - Fatal编程技术网

Java p:InputExtArea值不为';无法获取最新的值

Java p:InputExtArea值不为';无法获取最新的值,java,spring,jsf,primefaces,Java,Spring,Jsf,Primefaces,我在我的应用程序中有一个奇怪的行为,我已经没有办法解决它了,因为有时它能工作,有时它不能(取决于组件层次结构)。基本上,我使用的是InputExtArea,并通过setPropertyActionListener将值发送到我的服务器,以便在我的应用程序上实现进一步的逻辑。该功能实际上是一个注释列表 <h:panelGroup rendered="#{(cc.attrs.requestCommentListComponentModel.requestCommentEditableMap[re

我在我的应用程序中有一个奇怪的行为,我已经没有办法解决它了,因为有时它能工作,有时它不能(取决于组件层次结构)。基本上,我使用的是InputExtArea,并通过setPropertyActionListener将值发送到我的服务器,以便在我的应用程序上实现进一步的逻辑。该功能实际上是一个注释列表

<h:panelGroup rendered="#{(cc.attrs.requestCommentListComponentModel.requestCommentEditableMap[requestCommentVar.id]) and (cc.attrs.isModificationAllowed)}">
                                <div>
                                    <p:inputTextarea id="modifyRequestCommentInputTextArea" maxlength="255" styleClass="modifyRequestCommentInputTextArea" value="#{requestCommentVar.comment}" />
                                </div>

                                <h:panelGroup id="modifyRequestCommentControlButtonsPanelGroup" styleClass="requestCommentControlButtonsPanelGroup">
                                    <p:commandButton
                                        id="cancelRequestCommentModificationCommandButton"
                                        action="requestCommentListComponent.cancelEditRequestComment"
                                        onclick="jQuery.simpleBlockUI();cleanWatermark();"
                                        onerror="jQuery.unblockUI();"
                                        oncomplete="showWatermark();jQuery.unblockUI();closeComponent('#entityTaskManagementDialog');closeComponent('#quickTaskDialog');"
                                        process="@none"
                                        styleClass="requestCommentListComponentCommandButton"
                                        value="#{omnimed['global.cancel']}">
                                        <f:setPropertyActionListener target="#{cc.attrs.requestCommentListComponentModel.currentRequestComment}" value="#{requestCommentVar}" />
                                        <f:setPropertyActionListener target="#{conversationScope.requestCommentListComponentModel}" value="#{cc.attrs.requestCommentListComponentModel}" />
                                    </p:commandButton>
                                    <p:commandButton
                                        id="saveRequestCommentModificationCommandButton"
                                        action="requestCommentListComponent.updateRequestComment"
                                        onclick="jQuery.simpleBlockUI();cleanWatermark();"
                                        onerror="jQuery.unblockUI();"
                                        oncomplete="showWatermark();jQuery.unblockUI();closeComponent('#entityTaskManagementDialog');closeComponent('#quickTaskDialog');"
                                        styleClass="postButton requestCommentListComponentCommandButton"
                                        value="#{omnimed['global.save']}">
                                        <f:setPropertyActionListener target="#{cc.attrs.requestCommentListComponentModel.currentRequestComment}" value="#{requestCommentVar}" />
                                        <f:setPropertyActionListener target="#{conversationScope.requestCommentListComponentModel}" value="#{cc.attrs.requestCommentListComponentModel}" />
                                    </p:commandButton>
                                </h:panelGroup>
                            </h:panelGroup>

因此,问题是当我使用setPropertyActionListener获取值(#{requestCommentVar.comment})时。有一个值,但它始终是旧值(即存储在模型中的值)。如果我输入一个新文本,它仍然会返回到没有错误的旧值。我以前做过这个实现,它成功了


另外,我应该说我在另一个组件中有一个组件。因此,我有一个类a的datatable(ui repeat),每个类在父级组件中还包含一个类B的datatable(ui repeat)。然后我有一个子组件,每个类a都有一个类C的datatable(ui repeat)。类C实际上是一个注释列表,我在试图修改注释时遇到了一个问题。

请将流程属性添加到您的commandButton中,如
process=“@this,modifyRequestCommentInputTextArea”

谢谢,
Pankaj

“自从我听说p:dataTable不稳定”你从哪里听说的?在论坛上看到,嵌套的p:dataTable出现了奇怪的行为。你能试试上面的process=“@this,modifyRequestCommentInputExtArea”吗commnadbutton@PankajKathiriya张贴答案,它的工作!好极了!你能更详细地解释一下为什么有时候它在没有过程的情况下可以工作,而在其他情况下却不行?当存在嵌套组件时似乎是相关的。。。