Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1028131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:20:26+00:00 2026-05-16T12:20:26+00:00

Click LINK1 –> modal popsup –> enter value in text-box –> click Submit/Process Click

  • 0
  1. Click “LINK1” –> modal popsup –> enter value in text-box –> click Submit/Process

  2. Click another link “update/cancel” –> same modal popsup –> I see the value in the text box (This is fine and if I reload the page and click the link again, the modal appears with values intact)

  3. Click “LINK1” –> same modal popsup –> I see the value in the text box cached(this time I want the values not to be cached in the text box) –> If I reload the page, the values go away though.

I have tried clearing the backing-bean when the links are clicked, but still the values appear. Please advise.


Update here is the code:

ReimbursementActionBean.java

@Name("reimbursementAction")

@Scope(ScopeType.CONVERSATION)

public class ReimbursementActionBean implements Serializable {

    public void initReimbursement(PaymentInfo payment) {
           // do something
    }

    public void initNewReimbursement(PaymentInfo payment) {
        initReimbursement(payment);
        // --> log.info("CLEARING INPUT ELEMENT CACHE");
        // -->this.getReimbursement().setAmount(null);
        hideModal = false;
    }

    public void initUpdateReimbursement(PaymentInfo payment) {
        initReimbursement(payment);
        hideModal = false;
    }

    public void initCancelReimbursement(PaymentInfo payment) {
        initReimbursement(payment);
        hideModal = true;
    }


   public void reimbursePayment() {
                 // do something
    }


    public void updateReimbursment() {
         // do something

    }

    public void cancelReimbursment() {
         // do something
    }


    public void cancelupdateReimbursment() {
        hideModal = true;
    }

    public Reimbursement getReimbursement() {
        return reimbursement;
    }

    public void setReimbursement(Reimbursement reimbursement) {
        this.reimbursement = reimbursement;
    }

}

reimbursePaymentModal.xhtml

< rich:modalPanel id="reimbursePaymentPanel"
                     width="430"
                     autosized="true"
                     showWhenRendered="#{!hideModal}">
        <f:facet name="header">
            <h:panelGroup>
                <h:outputText value="Reimburse Payment"/>
            </h:panelGroup>
        </f:facet>

        <h:form>
            <a4j:outputPanel id="reimbursePaymentDiv">
                <s:div styleClass="section" style="padding:5px;padding-left:0px;">

                    <s:decorate template="/layout/edit.xhtml">
                        <ui:define name="label">Reimbursement Amount(*)</ui:define>
                        <h:inputText id="reimbursementAmount"
                                     value="#{reimbursementAction.reimbursement.amount}">
                            <a4j:support event="onblur" rerender="reimbursementAmount" action="#{reimbursementAction.validateAmount}" limitToList="true" />
                        </h:inputText>
                    </s:decorate>

                    <div style="clear:both"></div>

                </s:div>

                <div class="button-holder" style="padding-top:10px">

                    <div style="float:right">
                        <a4j:commandLink oncomplete="Richfaces.hideModalPanel('reimbursePaymentPanel');"
                                         immediate="true"
                                         action="#{reimbursementAction.cancelupdateReimbursment()}"
                                         styleClass="button"
                                         reRender="reimbursePaymentPanel">
                            <!--todo add cancel command to reimbursementAction-->
                            <span class="inner-button">Cancel</span>
                        </a4j:commandLink>
                    </div>


                    <div style="float:right">
                        <a4j:commandLink id="reimbursePaymentId" styleClass="button"
                                         oncomplete="this.disabled=false;"
                                         action="#{reimbursementAction.reimbursePayment}"
                                         rendered="#{reimbursementAction.reimbursementConstraints.allowableReimbursementAction eq 'SUBMIT_NEW'}"
                                         reRender="paymentSearchResults,reimbursePaymentDiv,reimbursePaymentPanel,pnlInfoView" limitToList="true"
                                         bypassUpdates="true" onclick="this.disabled=true;">
                            <span class="inner-button">Process</span>
                        </a4j:commandLink>
                    </div>
                </div>
            </a4j:outputPanel>

        </h:form>

    </rich:modalPanel>

PaymentList.xhtml

< a4j:outputPanel id="paymentSearchResults" ajaxRendered="true">

        <s:div styleClass="section" style="overflow-y:scroll; overflow-x:hidden;max-height:420px;margin:10px "
               rendered="#{not empty paymentList}">
            <rich:dataTable id="paymentListId"
                            var="payment"
                            value="#{paymentList}"
                            styleClass="data-table"
                            rowClasses="odd,even"
                            width="100%">
                              <!-- Reimburse -->
                        <s:div rendered="#{payment.reimbursementSummary.allowableReimbursementActionType eq 'SUBMIT_NEW'}">
                            <a4j:commandLink action="#{reimbursementAction.initNewReimbursement(payment)}"
                                             reRender="reimbursePaymentPanel,reimbursePaymentDiv"
                                             limitToList="true">
                                <span> Reimburse</span>
                            </a4j:commandLink>
                        </s:div>
                        <!-- Update Reimburse and Cancel Reimbursement-->
                        <s:div rendered="#{payment.reimbursementSummary.allowableReimbursementActionType eq 'MODIFY_EXISTING'}">
                            <a4j:commandLink action="#{reimbursementAction.initUpdateReimbursement(payment)}"
                                             reRender="reimbursePaymentPanel,reimbursePaymentDiv"
                                             limitToList="true"
                                             bypassUpdates="true">
                                <span>Update Reimbursement</span>
                            </a4j:commandLink>

                            <h:outputText value=" | "/>

                            <a4j:commandLink oncomplete="Richfaces.showModalPanel('cancelReimbursementPanel');"
                                             action="#{reimbursementAction.initCancelReimbursement(payment)}"
                                             reRender="cancelReimbursementDiv"
                                             limitToList="true">
                                <span>Cancel Reimbursement</span>
                            </a4j:commandLink>
                        </s:div>

                    </div>
                </rich:column>

            </rich:dataTable>
        </s:div>
    </a4j:outputPanel>

The links I am talking about are: Reimburse and Update Reimbursement. Clicking on the links rerender reimbursePaymentPanel which open up the modal with id=reimbursePaymentPanel having textbox with id="reimbursementAmount".

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T12:20:26+00:00Added an answer on May 16, 2026 at 12:20 pm

    Here is what I tried that worked.

    reimbursePaymentModal.xhtml

                    <s:decorate template="/layout/edit.xhtml">
                        <ui:define name="label">Reimbursement Amount(*)</ui:define>
                        <h:inputText id="reimbursementAmount"
                                     binding="#{reimburseEvent.amountText}"
                                     value="#{reimbursementAction.reimbursement.amount}">
                            <a4j:support event="onblur" action="#{reimbursementAction.validateAmount}"
                                         limitToList="true"/>
                        </h:inputText>
                    </s:decorate>
    

    PaymentList.xhtml

                        <s:div rendered="#{payment.reimbursementSummary.allowableReimbursementActionType eq 'SUBMIT_NEW'}">
                            <a4j:commandLink action="#{reimbursementAction.initNewReimbursement(payment)}"
                                             reRender="reimbursePaymentPanel,reimbursePaymentDiv, reimbursementAmount"
                                             actionListener="#{reimbursementAction.clearForm}" immediate="true" limitToList="true"
                                             >
                                <span> Reimburse</span>
                            </a4j:commandLink>
                        </s:div>
    

    ReimbursementActionBean.java

    @In(required=false)
    private ReimburseEvent reimburseEvent;
    
    //Added 
    public void clearForm(ActionEvent event){
       if(reimbursement!=null){
           reimbursement.setAmount(null);
           getReimbursement().setAmount(null);
       }
        reimburseEvent.getAmountText().setSubmittedValue("");
    }
    

    ReimburseEvent.java

    @Name("reimburseEvent")
    
    @Scope(ScopeType.EVENT)
    
    @AutoCreate
    
    
    public class ReimburseEvent {
    
        // amountText is binding attribute in the reimbursementPaymentModal. Binding attributes cannot be used in ReimbursementActionBean (Since it is Conversation Scope).
        // So creating ReimburseEvent (Event scope) to support the binding attribute and injecting it to ReimbursementActionBean.
    
        private UIInput amountText;
    
        public void setAmountText(UIInput amountText) {
            this.amountText = amountText;
        }
    
        public UIInput getAmountText() {
            return amountText;
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.