코드는 다음과 같이 작성하였습니다.
module.xml에서 컨트롤 클래스에 정의 되어 있는 메소드를 지정하였고,
폼에서 필터를 지정하였습니다.
폼에서 Submit버튼을 누르면 Success라는 메시지 박스가 표시됩니다.
그러나 debugPrint()함수의 내용이 표시가 안되는 것으로 보아..
액션이 실행이 안되는 거 같은데 이유를 모르겠습니다.
고수님들의 도움을 바랍니다..
잃어주셔서 감사합니다.
module.xml --------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<module>
<grants />
<actions>
<action name="dispMember_confirmList" type="view" standalone="true" index="true" />
<action name="procAtest" type="controller" standalone="true" />
</actions>
</module>
disptestmodule.hltml --------------------------------------------------------------------------------------------------------------------------
<form action="./" method="POST">
<table align="center" border ="0">
update_module.xml -------------------------------------------------------------------------------------------------------------------------
<filter name="update_Group" module="member_confirm" act="procAtest" confirm_msg_code="confirm_submit">
<form />
<parameter />
testmodule.controller.php --------------------------------------------------------------------------------------------------------------------------
class member_controller extends member_confirm
{
fucntion procAtest()
{
$obj = Context::getRequestVars();
$testVars = Context::get( 'check' );
debugPrint( "$testVars" );
}
}
test.js --------------------------------------------------------------------------------------------------------------------------
function completeChangeGroup(ret_obj)
{
var error = ret_obj['error'];
var message = ret_obj['message'];
var page = ret_obj['page'];
alert(message);
var url = current_url;
location.href = url;
}
아... 그리고 필터명도 일치해야 합니다.
필터명이 update_Group 이라 가정 할 때
위 댓글과 같이 모듈명, 필터명을 파일명과 같게하고
필요한 폼 속성(onsubmit) 추가와 필터를 로드 해주시면 됩니다.
디버깅 출력 사용은 수정하여서 출력이 되고 있습니다.
위 말씀 대로 수정을 하였으나,
updagte_Group.xml의 내용입니다.
<filter name="update_Group" module="member_confirm" act="procMember_confirmUpdateGroup" confirm_msg_code="confirm_submit">
<form />
<parameter />
<response callback_func="completeChangeGroup">
<tag name="error" />
<tag name="message" />
</response>
</filter>
하지만, procMember_confirmUpdateGroup()이 실행이 되지 않는 것 같습니다. 디버그 출력해 본결과 아무 내용도 출력이 되지 않음을 확인 하였습니다.
위 답변을 통해 여러 가지 확인을 해보았으나.. 호출 되지 않는 이유를 알 수가 없네요.ㅠ_ㅠ
도움 말 좀 부탁드리겠습니다.ㅠ_ㅠ
감사합니다.
모듈이름을 일관성있게 해주셔야 합니다.
모듈명이 member_confirm이라면
위처럼 모두 동일하게 유지해야 합니다.
혹 디버깅 환경을 조정하셨는지 모르겠습니다.
기본 값으로 debugPrint() 함수를 호출하여 디버그 메시지를 출력하지 않게 되어 있습니다.
팁 게시판에서 '디버그, 디버깅'으로 검색하면 설명이 나와있습니다.