2010-08-02 1 views
0

을 클릭 버튼에 리치 모달 패널 열기클릭 나는 버튼에 인구 데이터를 풍부한 모달 패널을 엽니 다 노력하고

이 코드가 열립니다

<h:commandButton id="btn_search" value="#{text['button.add']}" 
        action="#{cartBean.search}" 
        oncomplete="#{rich:component('dlg_results')}.show()">        
        </h:commandButton> 

<h:commandButton id="btn_search" value="#{text['button.add']}" 
        action="#{cartBean.search}" immediate="true"> 
         <rich:componentControl for="dlg_results" attachTo="btn_search" operation="show" event="onclick"/> 
        </h:commandButton> 

시도 버튼 클릭시 모델 패널이 표시되지만 서버에서 응답이 반환되면 전체 페이지가 새로 고침됩니다.

어떤 사람이 이것을 처리 할 수있는 방법을 제안 할 수 있습니까 ???

답변

2

h:commandButton 대신 <a4j:commandButton>을 사용하십시오.

+1

+1. 'h : commandButton'도 완성되지 않았습니다. – Bozho

1

감사합니다. 유용한 정보입니다.

내 문제를 해결하기 위해 rich:modalpanelshowWhenRendered 태그를 사용했습니다. 빈에 변수를 추가하고 레코드가 발견되면 버튼 클릭시 해당 값을 true로 설정합니다.

관련 문제