完成文本并将值存储在bean中后,如何清除文本?

时间:2018-09-27 17:37:41

标签: jsf trinidad

这时,当我调用我的方法时,bean将其存储,但文本不会被删除。

我的按钮看起来像这样-

                <tr:commandButton text="Record Feedback" id="Report" styleClass="Button"
                                halign="center" action= "#{fraudSearch.setFeedbackData}" inlineStyle="margin: 0 auto"
                                accessKey="13">
                            </tr:commandButton> 

我的文本输入看起来像这样-

    <tr:panelBox text="Feedback Comments" width="500px" >
                               <trh:tableLayout cellPadding="10" borderWidth="0" id="Table" valign="top"  halign="left"
                                 width="500px">
                               <tr:inputText label=" " id="generalFeedback" value="${fraudSearch.generalFeedback}" rows="3" columns="100" inlineStyle="max-width: 400px"   />

                          </trh:tableLayout>
                        </tr:panelBox>  

及其在后备bean中调用的方法如下所示

public String setFeedbackData() throws GcssBaseException {
    String retAction = null;
    String returnCode = null;

    try {

 **  populate bean**

    }catch (Exception ex) {
        System.out.println(ex);
        FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_ERROR, "Error - FeedBack Is not Stored !!!","Error - Feed Back Is not Stored !!!"));
    } finally {
        for(Iterator feedBackDataList = ibsNotesList.iterator(); feedBackDataList.hasNext(); )
        {
            fraudSetFeedBackModelBean.setGeneralFeedback(null);
        }
    }

    return "fraudSearch";

所以,从技术上讲,它是可行的,但问题是,当我阅读完该文本后,该文本不会消失。

0 个答案:

没有答案