2012-11-23 2 views
0

친구들! 나는 다음과 같은 방법으로 확인 대화 상자를 만들려고 오전 : 모달 패널 블록에서식 파일 확인 대화 상자

<h:form> 
    <a4j:commandButton id="declareNewStatusCbt" image="/img/buttons/save.png" 
    styleClass="hoverable rich-panel-button" 
    onclick="#{rich:component('confirmation')}.show();return false"> 
    </a4j:commandButton> 
    <a4j:jsFunction name="doSubmit" action="#{customerService.action}"/> 
</h:form> 

버튼 따르고 (부자 : modalPanel는 id="confirmation"있다) :

<h:commandButton image="img/buttons/proceed.png" styleClass="hoverable"  
onclick="#{rich:component('confirmation')}.hide();doSubmit();return false;"/> 

그래서, 기본적으로 난을 얻을 필요 a4j:commandButton action="#{customerService.action}"와 같은 효과가 있지만 모달 창에서 "진행"버튼을 누르면 FireFox 콘솔에서 TypeError: this._form is null을 수신하고 페이지가 간단히 다시로드됩니다. 어떤 아이디어?

감사합니다.

답변

0

나 혼자서 해결책을 찾았습니다.이 문제는 꽤 괜찮습니다. 문제는 <h:form>입니다. 분명히 a4j:jsFunction은 바람직하지 않은 제출 양식을 호출합니다.이 사실을 알지 못하는 것은 부끄러운 일입니다. 따라서 <h:form> :

을 간단히 삭제할 수 있습니다.