1

Help! inputtext value from beans not showing! I have an webapps (Using primefaces 10.0.0) and i want to set value of inputtext from beans (for edit feature) but i don't know why the data from Beans not Showing on inputtext but if I do : System.out.println("Sender : " + tempModel.getSenderName()); the terminal showing the sender name like this :

12:58:15,009 INFO  [stdout] (default task-21) Sender : Alexandria Del Aurellia

here is my xhtml code

<p:inputText id="srcAccountName" value="#{transactionBean.tempModel.senderName}" type="text" />

and here is my TransactionBean

@Named
@ViewScoped
public class TransactionBean implements Serializable {

    private TransferTempModel tempModel = new TransferTempModel();
    
    public void transferParam(AccountModel accountModel){
        tempModel.setSenderName(accountModel.getName());
        System.out.println("Sender : " + tempModel.getSenderName());
    }

    public TransferTempModel getTempModel() {
        return tempModel;
    }

    public void setTempModel(TransferTempModel tempModel) {
        this.tempModel = tempModel;
    }

}

and here is my TransferTempModel

public class TransferTempModel {
    
    private String senderName;
    private String recipentName;

    public String getSenderName() {
        return senderName;
    }

    public void setSenderName(String senderName) {
        this.senderName = senderName;
    }

    public String getRecipentName() {
        return recipentName;
    }

    public void setRecipentName(String recipentName) {
        this.recipentName = recipentName;
    }
}

Help me please, Thank you

Edited : The edit feature it's on a dialog and the dialog will show if I clik the edit button. Here is the edit button code

<p:column exportable="false">
    <p:commandButton value="Transfer To" oncomplete="PF('transferTo').show()"
    action="#{transactionBean.transferParam(accountModel)}"/>
</p:column>
  • 1
    You need to update the contents of your dialog first. See https://stackoverflow.com/questions/25339056/understanding-primefaces-process-update-and-jsf-fajax-execute-render-attributes – Jasper de Vries Apr 19 '21 at 07:12

0 Answers0