반응형
기능 관련 스크립트 작업
1. 팝업 뜨게 하는 이벤트 스크립트
//Search Area Dept PopUp
this.div_search_btn_dept_onClick = function (obj:nexacro.Button,e:nexacro.ClickEventInfo)
{
var nLeft = system.clientToScreenX(this, 10);
var nTop = system.clientToScreenY(this, 10);
var objChild = new ChildFrame("popDept","absolute",nLeft,nTop,300,400);
objChild.set_formurl("Popup::Pop_DeptSearch.xfdl");
objChild.set_openalign("center middle");
objChild.set_dragmovetype("all");
this.div_search_btn_dept_onClick = function (obj:nexacro.Button,e:nexacro.ClickEventInfo)
{
var nLeft = system.clientToScreenX(this, 10);
var nTop = system.clientToScreenY(this, 10);
var objChild = new ChildFrame("popDept","absolute",nLeft,nTop,300,400);
objChild.set_formurl("Popup::Pop_DeptSearch.xfdl");
objChild.set_openalign("center middle");
objChild.set_dragmovetype("all");
objChild.showModal(this.getOwnerFrame()
,{}
, this
, "fn_callBack_pop");
};
,{}
, this
, "fn_callBack_pop");
};
2. 팝업 화면 결과 반환 이벤트 스크립트
// Dept Popup Callback
// Get Return Valuel
this.fn_callback_pop = function(sPupupId, sReturn)
{
if(sReturn == undefined){
sReturn = "";
}
if(sPopupId == "popDept"){
if(sReturn.length > 0){
var arrRtn = sReturn.split("|");
this.div_search.form.edt_dept_cd.set_value(arrRtn[0]);
this.div_search.form.edt_dept_nm.set_value(arrRtn[1]);
}
}
}
// Get Return Valuel
this.fn_callback_pop = function(sPupupId, sReturn)
{
if(sReturn == undefined){
sReturn = "";
}
if(sPopupId == "popDept"){
if(sReturn.length > 0){
var arrRtn = sReturn.split("|");
this.div_search.form.edt_dept_cd.set_value(arrRtn[0]);
this.div_search.form.edt_dept_nm.set_value(arrRtn[1]);
}
}
}
3. ok버튼 눌렀을 때 이벤트
// Turn Back Return Value (btn_ok)
this.fn_ok = function(){
var sRtn = this.ds_dept.getColumn(this.ds_dept.rowposition, "DEPT_CD") + "|";
sRtn += this.ds_dept.getColumn(this.ds_dept.rowposition, "DEPT_NAME");
this.close(sRtn);
}
this.fn_ok = function(){
var sRtn = this.ds_dept.getColumn(this.ds_dept.rowposition, "DEPT_CD") + "|";
sRtn += this.ds_dept.getColumn(this.ds_dept.rowposition, "DEPT_NAME");
this.close(sRtn);
}
4. cancel버튼 눌렀을 때 이벤트
// Turn Back Return Value (btn_cancel)
this.fn_cancel = function(obj:nexacro.Button, e:nexacro.ClickEventInfo){
this.close();
}
this.fn_cancel = function(obj:nexacro.Button, e:nexacro.ClickEventInfo){
this.close();
}
5. 필터링 이벤트
// filtering
this.div_search_rdo_gender_onitemchanged = function(obj:nexacro.Radio, e:nexacro.ItemChangeEventInfo){
if(e.postvalue == "A"){
this.ds_emp.filter("");
}else{
this.ds_emp.filter("GENDER == '" + e.postvalue + "'");
}
};
this.div_search_rdo_gender_onitemchanged = function(obj:nexacro.Radio, e:nexacro.ItemChangeEventInfo){
if(e.postvalue == "A"){
this.ds_emp.filter("");
}else{
this.ds_emp.filter("GENDER == '" + e.postvalue + "'");
}
};
6. 리셋 이벤트
// reset
this.div_cont_btn_reset_onclick = function(obj:nexacro.Button, e:nexacro.ClickEventInfo){
this.div_search.form.edt_dept_cd.set_value("");
this.div_search.form.edt_dept_nm.set_value("");
this.div_search.form.rdo_gender.set_value("A");
};
this.div_cont_btn_reset_onclick = function(obj:nexacro.Button, e:nexacro.ClickEventInfo){
this.div_search.form.edt_dept_cd.set_value("");
this.div_search.form.edt_dept_nm.set_value("");
this.div_search.form.rdo_gender.set_value("A");
};
반응형
'Frontend > Nexacro' 카테고리의 다른 글
[넥사크로] 데이터 통신(서버 설정) (0) | 2023.07.07 |
---|---|
[넥사크로] 그리드 셀 표현 (0) | 2023.07.07 |
[넥사크로] 그리드 (0) | 2023.07.06 |
[넥사크로] 데이터 바인드 (0) | 2023.07.06 |
[넥사크로] 컴포넌트 (0) | 2023.07.06 |