2017-05-08 10 views
1

데이터베이스에 데이터를 삽입하는 명령 단추가 있습니다. 단추 레이블을 클릭 한 다음 단추 레이블을 변경하려고합니다. 그러면 단추 레이블이 비활성화됩니다.primfaces 명령 단추 레이블 클릭 후 변경

어떻게하면됩니까? 여러분의 빈에 베이킹 콩

에서 부울 값으로

답변

1

시도

boolean buttonDisabled = false; 

.xhtml

<p:commandButton "#{yourBean.buttonDisabled ? 'old label' : 'new label'}" disabled="#{yourBean.buttonDisabled}"> 
    <f:setPropertyActionListener value="true" 
     target="#{yourBean.buttonDisabled}" /> 
</p:commandButton>