WebSquare.net Package
Type
- engine
Property Summary
Event Summary
Method Summary
- ajax( options )
- ajax통신용 함수
- download( actionUrl , XML , sendMethod )
- 서버에서 파일을 다운로드 받는 함수
- getAllBASE64Parameter( )
- get방식으로 넘어온 전체 parameter를 Base64 Encoding방식으로 변환하여 JSON 형태로 반환합니다
- getAllParameter( )
- 전체 parameter를 JSON 형태로 반환합니다
- getBASE64Parameter( param )
- get방식으로 넘어온 parameter(param)를 Base64 Encoding방식으로 변환하여 반환합니다
- getParameter( param )
- get방식으로 넘어온 parameter를 String으로 반환합니다
Property Detail
Event Detail
Method Detail
- ajax( options )
-
ajax 통신용 함수
Parameter name type required description options Object Y JSON 형태 객체
options.action : ajax 요청 주소 options.mode : asynchronous(default)/synchronous options.mediatype : application/x-www-form-urlencoded, application/json, application/xml, text/xml options.method : get/post/put/delete options.requestData : 요청 본문 options.requestHeader : 요청 헤더에 임의로 추가할 내용. (필요한 경우에만 사용.) options.timeout : ajax 요청 후 timeout 시간. 이 시간 내에 응답이 없을 경우 error callback 함수를 실행. options.type : xml/json. xml인 경우 success callback 함수의 인자 객체의 responseBody 속성에 xml 객체가 설정된고, json인 경우 자바스크립트 객체가 설정된다. 나머지 경우는 text 형식이 설정. options.beforeAjax : 요청 전에 실행되는 함수. 이 함수가 false를 return하면 ajax 요청을 하지 않는다 options.success : 요청이 성공한 경우 실행되는 callback 함수 options.error : 요청이 실패한 경우 실행되는 callback 함수 options.externalHandler : 암복호화 연계와 같이 외부 데이터 연계시 데이터 변환 처리 사용자 함수. 인자로 option 객체를 전달 하며, option.requestData로 데이터에 접근 할수 있다. 사용자 함수는 데이터 변환 후 String을 반환해야 한다. Samplevar options = {}; options.action = "http://localhost:8080/test.jsp"; options.mode = "asynchronous"; options.mediatype = "text/xml"; options.method = "post"; options.requestData = " "; options.requestHeader = {"temp1":"hello", "temp2":"world"}; // temp1 및 temp2 헤더를 요청 헤더에 추가 options.success = doSucess; options.error = doError; WebSquare.net.ajax( options ); - download( actionUrl , XML , sendMethod )
-
서버에서 파일을 다운로드 받는 함수.
Parameter name type required description actionUrl String Y 파일을 다운 받기 위해서 접속해야 하는 주소 XML String Y 문자열은 xmlValue라는 이름으로 서버로 올라간다. 값을 지정하지 않은 경우(undefined인 경우) xmlValue라는 값은 제외하고 서버로 전송한다. sendMethod String Y get, post와 같은 전송 방식, 기본값은 post이다. SampleWebSquare.net.download( url, "", "post" ); - getAllBASE64Parameter( )
-
get방식으로 넘어온 전체 parameter를 Base64 Encoding방식으로 변환하여 JSON 형태로 반환합니다.SampleWebSquare.net.getAllBASE64Parameter();
- getAllParameter( )
-
전체 parameter를 JSON 형태로 반환합니다.SampleWebSquare.net.getAllParameter();
- getBASE64Parameter( param )
-
get방식으로 넘어온 parameter(param)를 Base64 Encoding방식으로 변환하여 반환합니다.
Parameter name type required description param String N 값을 가져올 uri에서 지정된 param Return type description String param 문자열 반환 SampleWebSquare.net.getBASE64Parameter("name"); - getParameter( param )
-
get방식으로 넘어온 parameter를 String으로 반환합니다.
Parameter name type required description param String N 값을 가져올 uri에서 지정된 param Return type description String param 문자열 SampleWebSquare.net.getParameter("name");