Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

hi i am using command button to set property Action lisnter but its not been called here Selected value bean is not been updated , please help me i want to show selected item in dialog box but it show empty ..is the code the below .

<p:commandButton icon="ui-icon-search" update=":form:appDetail" 
                oncomplete="appDialog.show()" title="View Detail">
                <f:setPropertyActionListener value="#{applicant}"
                    target="#{tableBean.selectedApplicant}" /></p:commandButton>

Class behind is :

package com.DTO;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.bean.ViewScoped;
import javax.faces.event.ActionEvent;

@ManagedBean
@SessionScoped
public class TableBean implements Serializable {

    private List<InterViewDto> applicantlist;
    private InterViewDto selectedApplicant;

    public List<InterViewDto> getApplicantlist() {
        return applicantlist;
    }

    public void setApplicantlist(List<InterViewDto> applicantlist) {
        this.applicantlist = applicantlist;
    }

    public InterViewDto getSelectedApplicant() {
        return selectedApplicant;
    }

    public void setSelectedApplicant(InterViewDto selectedApplicant) {

        this.selectedApplicant = selectedApplicant;

    }

    public TableBean() {

        applicantlist = new ArrayList<InterViewDto>();
        InterViewDto p1 = new InterViewDto();
        p1.setJobtitle("junaid");
        p1.setUseremail("[email protected]");
        applicantlist.add(p1);

    }

    public void check(){

        System.out.print("hi");
    }

}
share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.