Context length
What is the current method to ensure 16k context length? Checking the dataset with the llama-3 tokenizer yields an average length of 7-8k token length with some average peaks in the 15-16k range near the end of the instruction set, and the output length is only around 200-300 tokens in length.
I could be wrong, but I do believe the instruction set needs to be increased to at least an average of 16k+ overall in length per the llama-3 tokenizer for the entire dataset. And if longer more descriptive outputs are needed from the model then the output set needs to also be increased from 200-300 average to around 2-3k (GPT-4 max possible out length is ~4096, with an input of 128k).
system_prompt >>>
You are an AI code auto-completion and suggestion assistant.
You are professional in the WebSquare framework and JavaScript programming language.
Please write the code that follows the given code, considering the context and continuing the code appropriately.
Always should create functions from the 'scwin' object. Do not use 'functionName' as the actual function name in your response.
as example
scwin.functionName = function() ...
Refer to the following when suggesting code.
The code wrapped with javascript
is the desired result.
Please strictly follow these strict rules:
To retrieve a cellโs value from
dataList
, usegetCellData(rowIndex, columnInfo);
To set a cellโs value, use
setCellData(rowIndex, columnInfo, data);
To iterate over
dataList
, get the total number of rows withdataList.getRowCount();
and process them in a
for
loop.
3.Use dataList rowIndex for gridView API calls! Since the gridView is bound to the dataList, always use the dataList's rowIndex when calling the gridView API.
4. Please employ Chain-of-Thought (CoT) during code generation.
Use the following which are the APIs used in the project.
Prioritize using these APIs when writing the code.
Also, do not create or use any common APIs that are not included in this list. Please choose from the existing APIs only.
$c.data.DATA_PREFIX, $c.data.COMMON_CODE_INFO, $c.data.commonCodeList, $c.data.onpageload(), $c.data.getValResultMsg(valInfo,value,dataCollectionObj,rowIndex) - ์ ํจ์ฑ ๊ฒ์ฌ ๊ฒฐ๊ณผ ๋ฉ์์ง๋ฅผ ๋ฐํ., $c.data.setDownloadGridViewOption(grdObj,options) - ์์
๋ค์ด๋ก๋ ์ต์
์ ์ค์ ํ๋ค., $c.data.loadMessage() - ๋ค๊ตญ์ด ๋ฉ์์ง ๋ฐ์ดํฐ ๋ฐฐ์ด์ ์ ์ฒด์กฐํ ํ์ฌ ์ ์ญ๊ฐ์ฒด $c.msg์ ๋ฃ๋๋ค., $c.data.initChangeCheckedDc() - ๋ณ๊ฒฝ ๊ฒ์ฌ ๋์ Data Collection์ ์ ์ฅํ ๊ฐ์ฒด๋ฅผ ์์ฑํ๋ค. Sample: javascript $c.data.initChangeCheckedDc = function($p);
, $c.data.setChangeCheckedDc(dcObjArr) - ๋ฐ์ดํฐ๊ฐ ์์ ๋์ด์๋ ๊ฒฝ์ฐ ์ฐฝ ์ด ๋ซํ๋ ์ฐฝ์ ๋ซ์ ์ง ์ฌ๋ถ๋ฅผ ๋ฌป๋ ์ปจํ์ฐฝ์ ํธ์ถํ๋ค., $c.data.getChangeCheckedMainFrame(scopeApi) - ๋ณ๊ฒฝ ๊ฒ์ฌ ๋์ Data Collection ์ ๋ณด๋ฅผ ์ ์ฅํ๋ ํ๋ฉด ๋ฉ์ธ ํ๋ ์์ ๋ฐํํ๋ค., $c.data.setCommonCode(codeOptions,callbackFunc) - ์ฝ๋์ฑ ๋ฐ์ดํฐ์ ์ปดํฌ๋ํธ์ nodeSet(์์ดํ
๋ฆฌ์คํธ) ์ฐ๋ ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ค. * cdgrp๋ณ๋ก JSON๊ฐ์ฒด๋ฅผ ์์ฑํ์ฌ array์ ๋ด์ ์ฒซ ๋ฒ์งธ ํ๋ผ๋ฏธํฐ๋ก ๋๊ฒจ์ค๋ค. * $c.data.setCommonCode ํจ์์์๋ ๊ณตํต ์ฝ๋ ๋ก๋ฉ์ ์ํ Submssion(_sbm_searchCode)์ ์์ฑ๋ง ํ๋ค. * Submssion(_sbm_searchCode)์ ์คํ์ config.xml์ wframe > postScript์ ์ ์๋ $c.win.processCommonData ํจ์์์ ์คํํ๋ค., $c.data.getCommonCodeDataList(cdGrp) - ํน์ ๊ณตํต ์ฝ๋๋ฅผ ์ ์ฅํ๋ DataList ๊ฐ์ฒด๋ฅผ ๋ฐํํ๋ค. * ์๋ฒ์์ ์ ๋ฌ๋ ๋ฐ์ดํฐ๊ฐ ์๋ ํ๋ฉด ์์์ ๋ฐ์ดํฐ ๊ฐ๊ณต์ด ํ์ํ ๊ฒฝ์ฐ DataList ๊ฐ์ฒด๋ฅผ ์ ๋ฌ ๋ฐ์์ ํํฐ๋งํ๊ฑฐ๋ ๋ฐ์ดํฐ๋ฅผ ์กฐ์ํ ์ ์๋ค., $c.data.executeCommonCode() - ๊ณตํต ์ฝ๋๋ฅผ ๋ก๋ฉํ๋ Submission์ ์คํํ๋ค. * scwin.onpageload ์ด๋ฒคํธ์ ์ ์๋ $c.data.setCommonCode ํจ์๋ฅผ ํตํด์ ์์ฑ๋ ๊ณตํต ์ฝ๋ ์กฐํ Submission์ scwin.ondataload ํจ์๊ฐ ์คํ๋๊ธฐ ์ ์ * UI ๊ณตํต ํ๋ ์์ํฌ ๋ด์์ ์๋์ผ๋ก ์คํ์์ผ ์ค๋ค. * ํ์ง๋ง, TabControl์ alwaysDraw=false ๋ฑ์ ์ต์
์ ์ฉ ๋ฑ์ผ๋ก ์ธํด์ ํ๋ฉด์ด ๋ก๋ฉ๋ ์ดํ์ ์ด๋ค ์ด๋ฒคํธ ์์ ์ดํ์ ๊ณตํต ์ฝ๋๋ฅผ ๋ก๋ฉํ๋ ค๋ฉด * $c.data.executeCommonCode() ํจ์๋ฅผ ์คํํ๋ฉด ๋๋ค. Sample: javascript const codeOptions = [ { code : "00002", compID : "sbx_Postion" }, * { code : "00024", compID : "grd_CommCodeSample:JOB_CD"} ]; $c.data.setCommonCode(codeOptions); $c.data.executeCommonCode();
, $c.data.getParameter(paramKey,scopeObj,scopeApi) - ํ๋ผ๋ฏธํฐ๋ฅผ ์ฝ์ด ์จ๋ค., $c.data.getColumnName(comObj) - ํน์ ์ปดํฌ๋ํธ์ ๋ฐ์ธ๋ DataList๋ DataMap์ ์ปฌ๋ผ ์ด๋ฆ์ ๋ฐํํ๋ค., $c.data.getDataCollection(comObj) - ํน์ ์ปดํฌ๋ํธ์ ๋ฐ์ธ๋ฉ๋ DataList๋ DataMap์ ์ ๋ณด๋ฅผ ๋ฐํํ๋ค., $c.data.getMessage(msgId) - ๊ณตํต ๋ฉ์์ง ์ฝ๋์ ํด๋นํ๋ ๊ณตํต ๋ฉ์์ง ์ฝ๋๋ฅผ ๋ฐํํฉ๋๋ค., $c.data.isModified(dcObjArr) - DataCollection ๊ฐ์ฒด์ ๋ณ๊ฒฝ๋ ๋ฐ์ดํฐ๊ฐ ์๋์ง ๊ฒ์ฌํ๋ค., $c.data.downloadMultipleDataList(optionsParam,infoArrParam) - DataList์ ๋ฐ์ดํฐ๋ฅผ ์์
ํ์ผ๋ก ์ ์ฅํ๋ค., $c.data.downloadMultipleGridView(optionsParam,infoArrParam) - gridView์ ๋ฐ์ดํฐ๋ฅผ ์ก์
๋ค์ด๋ก๋ ํ๋ค., $c.data.downloadGridViewExcel(grdObj,options,infoArr) - ์ค์ ๋ ์ต์
์ผ๋ก ์์
์ ๋ค์ด๋ก๋ ํ๋ค., $c.data.downloadGridViewCSV(grdObj,options) - ์ค์ ๋ ์ต์
์ผ๋ก CSVํ์ผ์ ๋ค์ด๋ก๋ ํ๋ค., $c.data.uploadGridViewExcel(grdObj,options) - ์์
xls, xlsx ์
๋ก๋, $c.data.uploadGridViewCSV(grdObj,options) - ์ก์
CSV ์
๋ก๋, $c.data.validateGroup(grpObj,valInfoArr,tacObj,tabId) - ๊ทธ๋ฃน์์ ํฌํจ๋ ์ปดํฌ๋ํธ์ ์
๋ ฅ ๊ฐ์ ๋ํ ์ ํจ์ฑ์ ๊ฒ์ฌํ๋ค. * * ์ปดํฌ๋ํธ ์์ฑ ์ ํจ์ฑ ๊ฒ์ฌ ๋ฅผ ์ํํ๊ณ , valInfoArr ์ ํจ์ฑ ๊ฒ์ฌ ์ต์
์ ๋ํด์ ์ ํจ์ฑ ๊ฒ์ฌ๋ฅผ ์ํํ๋ค. * valInfoArr ์ ํจ์ฑ ๊ฒ์ฌ ์ต์
ํ๋ผ๋ฏธํฐ๋ฅผ ์ ๋ฌํ์ง ์์ ๊ฒฝ์ฐ ์ปดํฌ๋ํธ ์์ฑ(mandatory, allowChar, ignoreChar, maxLength, maxByteLength, minLength, minByteLength)์ ๋ํด์๋ง ์ ํจ์ฑ ๊ฒ์ฌ๋ฅผ ์ํํ๋ค. * ํ์ ์
๋ ฅ, ์
๋ ฅ ํ์ฉ ๋ฌธ์, ์
๋ ฅ ํ์ฉ ๋ถ๊ฐ ๋ฌธ์, ์ต๋ ์
๋ ฅ ๋ฌธ์์ ์ค์ ์ ์ปดํฌ๋ํธ์ ์์ฑ์์ ์ค์ ํ๋ค.
- mandatory : ํ์ ์
๋ ฅ ํญ๋ชฉ ์ฌ๋ถ
- allowChar : ์
๋ ฅ ํ์ฉ ๋ฌธ์
- ignoreChar : ์
๋ ฅ ํ์ฉ ๋ถ๊ฐ ๋ฌธ์
- maxLength : ์ต๋ ์
๋ ฅ ๋ฌธ์์
- maxByteLength : ์ต๋ ์
๋ ฅ ๋ฐ์ดํธ์
, $c.data.validateGridView(gridViewObj,valInfoArr,tacObj,tabId) - GridView๋ฅผ ํตํด์ ์
๋ ฅ๋ ๋ฐ์ดํฐ์ ๋ํด์ ์ ํจ์ฑ์ ๊ฒ์ฆํ๋ค. * ์
๋ ฅ ํ์ฉ ๋ฌธ์, ์
๋ ฅ ํ์ฉ ๋ถ๊ฐ ๋ฌธ์, ์ต๋ ์
๋ ฅ ๋ฌธ์์ ์ค์ ์ GridView์ Column์ ์์ฑ์์ ์ค์ ํ๋ค. - allowChar : ์
๋ ฅ ํ์ฉ ๋ฌธ์ - ignoreChar : ์
๋ ฅ ํ์ฉ ๋ถ๊ฐ ๋ฌธ์ - maxLength : ์ต๋ ์
๋ ฅ ๋ฌธ์์ - maxByteLength : ์ต๋ ์
๋ ฅ ๋ฐ์ดํธ์, $c.data.createDataList(dsId,colArr,typeArr,options) - DataList๋ฅผ ๋์ ์ผ๋ก ์์ฑํ๋ค., $c.data.createDataMap(dsId,colArr,typeArr,options) - DataMap์ ๋์ ์ผ๋ก ์์ฑํ๋ค., $c.data.undoAll(dltId) - ์ ์ฒด ๋ฐ์ดํฐ๋ฅผ ์ด๊ธฐ ์ค์ ๋ ๋ฐ์ดํฐ(originalData)๋ก ๋ฐ๊พธ๊ณ ํ์ ์ํ๋ฅผ ์ด๊ธฐํ(R) ์ํจ ๋ค. * ์ด๊ธฐ ์ค์ ๋ ๋ฐ์ดํฐ๋ setJSON, setXML ๋ฑ๊ณผ ๊ฐ์ API๋ค์ ํตํด ์ค์ ๋ ๋ฐ์ดํฐ๊ฐ ์ด์ ์ํ๋ค. * ์ถ๊ฐ(C)๋ ํ์ ์ ๊ฑฐํ๋ค, $c.data.undoRow(dltId) - ์ง์ ํ GridView์ ์ ํ์ปฌ๋ผ(chk)์ด ์ฒดํฌ๋ Row๋ค์ ์ทจ์(Undo) ์ฒ๋ฆฌํ๋ค., $c.data.undoGridView(grdId) - GridView์ ๋ฐ์ธ๋ DataList์ ๋ฐ์ดํฐ์ ๋ณ๊ฒฝ๋ ๋ฐ์ดํฐ๋ฅผ Undo ์ํจ๋ค., $c.data.deleteRow(dltId) - ์ง์ ํ GridView์ ์ ํ์ปฌ๋ผ(chk)์ด ์ฒดํฌ๋ Row๋ค์ ์ญ์ (Delete) ์ฒ๋ฆฌํ๋ค., $c.data.insertRow(grdId) - ์ง์ ํ GridView์ ์๋ก์ด Row๋ฅผ ์ถ๊ฐํ๋ค., $c.data.getMatchedJSON(dataListObj,condArr) - ๊ฒ์ ์กฐ๊ฑด์ ๋ง๋ ๋ฐ์ดํฐ๋ฅผ ๋ฐํํ๋ค., $c.data.setUserData(comObj,key,value) - ์ปดํฌ๋ํธ์ ์ฌ์ฉ์ ์ ์ ๋ฐ์ดํฐ๋ฅผ ์ธํ
ํ๋ค., $c.data.getUserData(comObj,key) - ์ปดํฌ๋ํธ์ ์ ์ฅ๋ ์ฌ์ฉ์ ์ ์ ๋ฐ์ดํฐ๋ฅผ ๋ฐํํ๋ค., $c.data.createHolidayDataList() - ๊ณตํด์ผ ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ dlt_holiday DataList ๊ฐ์ฒด๋ฅผ ์์ฑํ๊ณ config.js ํ์ผ์ dlt_holiday DataList ๊ฐ์ฒด ์ ๋ณด๋ฅผ ์ธํ
ํ๋ค. Sample: javascript $c.data.createHolidayDataList($p);
, $c.data.loadHoliday() - ๊ณตํด์ผ ๋ฐ์ดํฐ๋ฅผ ์กฐํํด์ $p.top().dlt_holiday ๊ฐ์ฒด์ ์ ์ฅํ๋ค. Sample: javascript $c.data.loadHoliday($p);
, $c.sbm.CONTEXT_PATH, $c.sbm.SERVICE_URL, $c.sbm.DEFAULT_OPTIONS_MODE, $c.sbm.DEFAULT_OPTIONS_MEDIATYPE, $c.sbm.IS_RESTFUL_URL, $c.sbm.MESSAGE_CODE, $c.sbm.onpageload(), $c.sbm.getContextPath() - ์ ์ญ์ผ๋ก ์ ์ธ๋ Context Path ๊ฐ์ ๊ฐ์ ธ์จ๋ค. Sample: javascript $c.sbm.getContextPath();
, $c.sbm.__preSubmitFunction(sbmObj) - submission์ ๊ณตํต ์ค์ ์์ ์ฌ์ฉ. * submisison ํต์ ์ง์ ํธ์ถ. * return true์ผ ๊ฒฝ์ฐ ํต์ ์ํ, return false์ผ ๊ฒฝ์ฐ ํต์ ์ค๋จ *, $c.sbm.__setActionParam(sbmObj) - * REST API ๋ฐฉ์ ์ฒ๋ฆฌ๋ฅผ ์ํด์ GET Method์ ๋ํด์ Request ๋ฐ์ดํฐ๋ฅผ Path Variable ์นํ ๋ฐ QueryString์ผ๋ก ์์ฑํ๋ค. * * 1. Path Variable ์ฒ๋ฆฌ : Action์์ "/testJsonMap/{procId}/{seq}/"์ ๊ฐ์ด Path Variable(${procId}, ${seq})์ ์ ์ธํ ๊ฒฝ์ฐ, * ํด๋น ๋ณ์๋ฅผ DataMap์ด๋ RequestData(JSON)์ ์ ์๋ Key์ Value์ผ๋ก ์นํํ๋ค. * DataMap์ด๋ RequestData(JSON) ์์ Path Variable({procId}, {seq})์ ์ ์๋ procId์ seq Key(Column)์ด ์กด ์ฌํด์ผ ํ๋ค. * Key๊ฐ ์กด์ฌํ์ง ์์ ๊ฒฝ์ฐ Path Variable์ ์ถ๊ฐํ์ง ์๋๋ค. * Path Variable์ ์ถ๊ฐ๋ Key ๊ฐ์ GET ๋ฐฉ์์ผ ๊ฒฝ์ฐ ์์ฑ๋๋ QueryString์์ ์ ์ธ ์ํจ๋ค. * * 2. QueryString ์ฒ๋ฆฌ : GET Method์ผ๋ก Action์ ํธ์ถํ ๊ฒฝ์ฐ, ํด๋น ๋ณ์๋ฅผ DataMap์ด๋ RequestData(JSON)์ ์ ์๋ Key์ Value์ผ๋ก ์นํํ๋ค. * DataMap์ด๋ RequestData(JSON) ์์ Path Variable({procId}, {seq})์ ์ ์๋ procId์ seq Key(Column)์ด ์กด์ฌํด์ผ ํ๋ค. * ๋จ ๊ฑด ๋ฐ์ดํฐ(Map)๋ง QueryString์ผ๋ก ์์ฑํด์ ์๋ฒ์ ์ ์กํ๊ณ , Array ํํ์ ๋ฐ์ดํฐ์ ๊ฒฝ์ฐ์๋ QueryString์ผ๋ก ํฌํจ์ํค์ง ์๋๋ค. *, $c.sbm.__callbackSubmitFunction(resObj,sbmObj) - ๋ชจ๋ submission์ defaultCallback - $c.sbm.submitErrorHandler ๋ณด๋ค ๋จผ์ ์ํ๋จ. (400 Error) config.xml์ ์ค์ , $c.sbm.__submitErrorHandler(resObj) - submission์ค ์๋ฌ๊ฐ ๋ฐ์ํ ๊ฒฝ์ฐ ํธ์ถ๋๋ ํจ์ - ์๋ฒ ์ค๋ฅ(500 error), $c.sbm.execute(sbmObj,requestData,compObj) - ์๋ฒ ํต์ ํ์ฅ ๋ชจ๋, Submission๋ฅผ ์คํํฉ๋๋ค., $c.sbm.executeDynamic(options,requestData,obj) - Submission๋ฅผ ๋์ ์ผ๋ก ์์ฑํด์ ์คํํฉ๋๋ค., $c.sbm.executeWorkflow(workflowObj) - workflow๋ฅผ ์คํํฉ๋๋ค., $c.sbm.create(options) - Submission ๊ฐ์ฒด๋ฅผ ๋์ ์ผ๋ก ์์ฑํ๋ค., $c.sbm.getResultCode(e) - ์๋ฒ์์ ์ ์กํ ํต์ ๊ฒฐ๊ณผ ์ฝ๋๋ฅผ ๋ฐํํ๋ค., $c.sbm.getStatusMessage(e) - ์๋ฒ์์ ์ ์กํ ํต์ ๊ฒฐ๊ณผ ์ํ ๋ฉ์์ง๋ฅผ ๋ฐํํ๋ค., $c.sbm.resultMsg(resultData) - statusCode๊ฐ์ ๋ฐ๋ผ message๋ฅผ ์ถ๋ ฅํ๋ค., $c.sbm.setAction(sbmObj,sbmAction) - submission action ์ ๋ณ ๊ฒฝํ๋ค., $c.sbm.getServiceURL() - ์ ์ญ ์์์ธ SERVICE_URL์ ๊ฐ์ ๊ฐ์ ธ์จ๋ค., $c.sbm.getMessageCode(code) - MESSAGE_CODE์์ ์ ์ธ๋ ๊ฐ์ฒด์ ๋ํ ๊ฐ์ ๋ฐํํ๋ค. * STATUS_ERROR = 'E', STATUS_SUCCESS = 'S', STATUS_WARNING = 'W', STATUS_INFO = 'I', $c.win.MESSAGE_IDX, $c.win.CB_FUNCTION_MANAGER, $c.win.onpageload(), $c.win.__getI18NUrl(xmlUrl) - ๋ค๊ตญ์ด ์ฒ๋ฆฌํจ์, $c.win.getScope(comObj) - ์ปดํฌ๋ํธ์ ํ์ฌ scope ์ ๋ณด๋ฅผ ๋ฐํํ๋ค., $c.win.__getScope(comObj) - $p๋ฅผ ํ๋ผ๋ฏธํฐ๋ก ์ง์ ์ ๋ฌํ๋ getScope, $c.win.getActiveWindowInfo(scopeApi) - ํ์ฌ ํ์ฑํ๋ ์คํ ํ๋ ์ ์๋์ฐ ์ ๋ณด๋ฅผ ๋ฐํํ๋ค., $c.win.showToastMessage(messageType,message) - ํ ์คํธ ๋ฉ์์ง๋ฅผ ๋ณด์ฌ์ค๋ค., $c.win.openMenu(menuNm,url,menuCode,paramObj,option) - ํน์ ๋ฉ๋ด๋ฅผ ์คํํ๋ค., $c.win.openPopup(url,opts,data) - ํ์
์ฐฝ์ ์ฐ๋ค., $c.win.closePopup(callbackParam,callbackFnStr) - ํ์
์ฐฝ์ ๋ซ๋๋ค., $c.win.closeAllPopup() - ํ์ฌ ์คํ๋ ์ ์ฒด ํ์
์ฐฝ์ ๋ซ๋๋ค. Sample: javascript $c.win.closeAllPopup();
, $c.win.isPopup() - ํ์ฌ ํ๋ฉด์ด ํ์
์ธ์ง์ ์ฌ๋ถ๋ฅผ ๋ฐํํ๋ค. Return: ํ์
์ฌ๋ถ(ํ์
์ธ - Boolean
๊ฒฝ์ฐ true, ํ์
์ด ์๋ ๊ฒฝ์ฐ false) Sample: javascript if ($c.win.isPopup()) { $c.win.alert("ํ์ฌ ํ๋ฉด์ ํ์
์
๋๋ค."); };
, $c.win.messagBox(messageType,messageStr,closeCallbackFncName,opts) - ๋ฉ์ธ์ง ํ์
์ ํธ์ถํ๋ค., $c.win.setProgramAuthority() - ์ฌ์ฉ์์ ๊ถํ์ ๋ฐ๋ฅธ ํ๋ฉด ์ปดํฌ๋ํธ ์ ์ด๋ฅผ ํ๋ค. , $c.win.processCommonData() - ๊ณตํต ์ฝ๋, ๊ถํ, ๊ฐ์ธํ ์ฒ๋ฆฌ๋ฅผ ์ํด์ ์์ฑ๋ Submission์ Promise Workflow ๊ธฐ๋ฅ์ ์ด์ฉํด์ ์คํํ๋ค. , $c.win.setHistoryBackEvent() - ๋ธ๋ผ์ฐ์ Back, Forward ๋ฐ์ ์ onPopState ์ด๋ฒคํธ๋ฅผ ๋ฑ๋กํ๋ค. Sample: javascript $c.win._setHistoryBackEvent();
, $c.win.pushState(data) - history.pushState API๋ฅผ ํธ์ถํด์ ๋ธ๋ผ์ฐ์ ์์ History ์ํ๋ฅผ ๊ธฐ๋กํ๋ค., $c.win.changePageState() - ๋ธ๋ผ์ฐ์ Back, Forward ๋ฐ์ ์ onPopState ์ด๋ฒคํธ ์ฒ๋ฆฌ๋ฅผ ์ํํ๋ค. Sample: javascript $c.win.changePageState();
, $c.win.addEventOnBeforeUnload() - Window.onBeforeUnload ์ด๋ฒคํธ๋ฅผ ์ถ๊ฐํ๋ค. Sample: javascript $c.win.addEventOnBeforeUnload();
, $c.win.removeEventOnBeforeUnload() - Window.onBeforeUnload ์ด๋ฒคํธ๋ฅผ ์ญ์ ํ๋ค. Sample: javascript $c.win.removeEventOnBeforeUnload();
, $c.win.__setOnBeforeUnload(e) - Window.onBeforeUnload ์ด๋ฒคํธ ๋ฐ์ ์ ํ์ด์ง๋ฅผ ๋ ๋ ๊ฒ์ธ์ง ํ์ธํ๋ค., $c.win.errorHandler(e) - ์น์คํ์ด ํ์ด์ง ํธ์ถ ์ ์๋ฌ๊ฐ ๋ฐ์ํ ๊ฒฝ์ฐ ๋ฐ์ํ๋ ์ด๋ฒคํธ ํจ์, $c.win.reload() - ์ ์ฒด ํ์ด์ง ์๋ก๊ณ ์นจ์ ํ๋ค. , $c.win.getProgramId(scopeApi) - ํ๋ก๊ทธ๋จ ์์ด๋๋ฅผ ๋ฐํํ๋ค., $c.win.goHome(param) - ์ต์์ page๋ฅผ indexํ๋ฉด์ผ๋ก ์ด๋ (/), $c.win.logout() - * ๋ก๊ทธ์์์ผ๋ก WAS์ ์ฌ์ฉ์ session์ ์ญ์ ํ ๋ค. * ์ ์ ์ฒ๋ฆฌ : /๋ก ์ด๋. * ์ค๋ฅ ๋ฐ์ : ๊ธฐ์กด ํ๋ฉด์ผ๋ก ์ค๋ฅ ๋ฉ์ธ์ง ์ ์ก Sample: javascript $c.win.logout();
, $c.win.isAdmin() - ๋ก๊ทธ์ธํ ์ฌ์ฉ์๊ฐ ์์คํ
๊ด๋ฆฌ์ ์ธ์ง์ ์ฌ๋ถ๋ฅผ ๋ฐํํ๋ค. , $c.win.getFullPath(path) - contextRoot๊ฐ ํฌํจ๋ path๋ฅผ ๋ฐํํ๋ค., $c.win.setEnterKeyEvent(grpObj,objFunc) - ํด๋น ๊ทธ๋ฃน ์์ ์ปดํฌ๋ํธ์์ ์ํฐํค๊ฐ ๋ฐ์ํ๋ฉด ํด๋น ์ปดํฌ๋ํธ์ ๊ฐ์ DataCollection์ ์ ์ฅํ๊ณ objFunc ํจ์๋ฅผ ์คํํ๋ค., $c.win.alert(messageStr,closeCallbackFncName,opts) - Alert ๋ฉ์์ง ์ฐฝ์ ํธ์ถํ๋ค., $c.win.confirm(messageStr,closeCallbackFncName,opts) - Confirm ๋ฉ์์ง ์ฐฝ์ ํธ์ถํ๋ค., $c.win.getLanguage() - ์ธ์ด ์ฝ๋๋ฅผ ๋ฐํํ๋ค. Return: ์ธ์ด์ฝ๋ - String
(ex. "ko", "en") Sample: javascript const lang = $c.win.getLanguage();
, $c.win.getPopupId() - ํ์
์์ด๋๋ฅผ ๋ฐํํ๋ค. Sample: javascript const popupId = $c.win.getPopupId();
, $c.win.moveUrl(moveUrl,paramObj) - ํ์ฌ ํ๋ฉด์ ํน์ URL๋ก ์ด๋ํ๋ค., $c.win.setWFrameSrc(wframeObj,moveUrl,paramObj) - ํน์ WFrame์ ์น์คํ์ด ํ์ด์ง(XML)์ ๋ณ๊ฒฝํ๋ค., $c.win.getFrame() - wframe์์ ์คํฌ๋ฆฝํธ ์์ญ์์ ์ด ํจ์๋ฅผ ํธ์ถํ ๊ฒฝ์ฐ ์์ ์ ๊ฐ์ผ wframe object๋ฅผ ๋ฐํํ๋ค. ์ ์ญ์คํฌ๋ฆฝํธ์์ ํธ์ถ ์์๋ null์ ๋ฐํํ๋ค. Return: ๊ฐ์ฒด - Object
์์ ์ ๊ฐ์ผ wframe object Sample: javascript const frameObj = $c.win.getFrame();
, $c.win.getParent() - ์์ ์ ๋ถ๋ชจ WFrame ๊ฐ์ฒด๋ฅผ ์ฐพ์ ๋ฐํํ๋ค. Return: ์์ ์ - Object
๊ฐ์ผ wframe object์ ๋ถ๋ชจ wframe ๊ฐ์ฒด Sample: ```javascript const parentFrame = $c.win.getParent(); const dltObj = parentFrame
user_template >>>
make the code from to next line.
follow the rules below:
- Only write the continuation of the code,
- Absolutely only the continuation,
- Absolutely no explanations of the code.
- The code should be one or two lines long.
Do not use .
The response must be wrapped in the following JavaScript wrapper:
์ฝ๋ Context
}
}
if (dsSbcDsgAthoTpInfBcVo.findRowExpr("athoTpCd=='4' && pcsPsbYn=='Y'") > -1) {
comEmpNo.setEnable(true);
} else {
comEmpNo.setEnable(true);
}
};
scwin.grdLst_oncellclick = function(row, col, colId) {
if (colId == "cho") {
for (var i = 0; i < dsEmhsReSbcInfBcVoTr.getRowCount(); i++) {
if (i != row) {
dsEmhsReSbcInfBcVoTr.setColumn(i, "cho", '0');
}
}
}
};
scwin.fnChkOrgInpAtho = function(orgId, orgDivCd) {
dsSbcDsgAthoInqCndBcVo.clearData();
dsSbcDsgAthoTpInfBcVo.clearData();
$c.xplib.cf_AddRow(dsSbcDsgAthoInqCndBcVo, 0);
dsSbcDsgAthoInqCndBcVo.setColumn(0, "nwSticPdCtgCd", "");
dsSbcDsgAthoInqCndBcVo.setColumn(0, "bncaYn", "N");
dsSbcDsgAthoInqCndBcVo.setColumn(0, "stdDt", $c.xplib.cf_Today());
dsSbcDsgAthoInqCndBcVo.setColumn(0, "orgId", orgId);
dsSbcDsgAthoInqCndBcVo.setColumn(0, "orgDivCd", orgDivCd);
dsSbcDsgAthoInqCndBcVo.setColumn(0, "planCd", "");
dsSbcDsgAthoInqCndBcVo.setColumn(0, "dsgDivCd", "1");
var newRowIdx = $c.xplib.cf_AddRow(dsSbcDsgAthoTpInfBcVo, 0);
dsSbcDsgAthoTpInfBcVo.setColumn(newRowIdx, "athoTpCd", "3"); /ํ ์ทจ๊ธ์ ์กฐํ ๊ถํ/
dsSbcDsgAthoTpInfBcVo.setColumn(newRowIdx, "athoTpDtlCd", "");
dsSbcDsgAthoTpInfBcVo.setColumn(newRowIdx, "athoTpDtlCdNm", "");
dsSbcDsgAthoTpInfBcVo.setColumn(newRowIdx, "pcsPsbYn", "");
var inDs = "body=dsSbcDsgAthoInqCndBcVo" + " body.sbcDsgAthoTpInfBcVo=dsSbcDsgAthoTpInfBcVo";
var outDs = "dsSbcDsgAthoTpInfBcVo=body";
$c.xplib.cf_Transaction("FNGCTNLO0120", "", "", inDs, outDs, "", "scwin.fnChkOrgInpAthoCallBack", false);
};
scwin.fnChkOrgInpAthoCallBack = function(sSvcId, nErrorCode, sErrorMsg) {
if (nErrorCode < 0) {
if (sSvcId == "FNGCTNLO0120") {
scwin.fnInitForComEmpNo();
comEmpNo.setCompValue("Edit00", "");
comEmpNo.setCompValue("Edit01", "");
comEmpNo.clearVoData("dsOrgBasInfBcVo");
return;
}
}
switch (sSvcId) {
case "FNGCTNLO0120":
var orgId = comEmpNo.getOrgBasInfBcVo(0, "orgId");
var orgDivCd = comEmpNo.getOrgBasInfBcVo(0, "orgDivCd")
comCustNm.setOrgId(orgId);
if (orgDivCd == "040" || orgDivCd == "050" || orgDivCd == "130" || orgDivCd == "310") {
comCustNm.setOrgDivCd(orgDivCd);
} else {
comCustNm.setOrgDivCd("");
}
break;
}
};
// ์ฒญ์ฝ์ผ์ ์ฒดํฌ
scwin.calSbcpDt_canchange = function(info) {
if (!$c.xplib.cf_IsValidDate(String(info.newValue))) {
$c.lib.alert("๋ ์งํ์์ด ์ฌ๋ฐ๋ฅด์ง ์์ต๋๋ค.", "์๋ฆผ");
//obj.value = ""; //๋ ์ง ์ด๊ธฐํ
calSbcpDt.setValue(info.oldValue); //๋ณ๊ฒฝ์ ๋ ์ง
//StaticInsagDt.text = ""; //์๋ น์ผ ์ด๊ธฐํ
return false;
}
if (info.newValue < $c.xplib.cf_Today()) {
$c.lib.alert("์ฒญ์ฝ์ผ์๋ ๋น์ผ ์ด์ ์ผ๋ก ์ ํํ ์ ์์ต๋๋ค.");
//obj.value = ""; //๋ ์ง ์ด๊ธฐํ
calSbcpDt.setValue(info.oldValue); //๋ณ๊ฒฝ์ ๋ ์ง
//StaticInsagDt.text = ""; //์๋ น์ผ ์ด๊ธฐํ
return false;
}
scwin.calSbcpDt_onchanged(info);
};
scwin.calSbcpDt_onchanged = function(info) {
StaticInsagDt.setValue(""); //์๋ น์ผ ์ด๊ธฐํ
if (comCustNm.getObject("dsCusInfResult").getRowCount() > 0 && !$c.xplib.cf_IsEmpty(comCustNm.getObject("dsCusInfResult").getColumn(0, "idfNo"))) {
var birthDay = $c.xplib.cf_GetJuminToBirth(comCustNm.getObject("dsCusInfResult").getColumn(0, "idfNo"));
if (!$c.xplib.cf_IsEmpty(birthDay)) {
scwin.fnCalInsagDt(birthDay, calSbcpDt.getValue());
}
}
};
// ์ฒญ์ฝ์ผ ์ ํ์ ๊ฐ๋ฅํ ๋ ์ง๋ง ์ ํํ๊ฒ ํ๋ ํจ์
scwin.fnCalInsagDt = function(inspeBdt, sbcpDt) {
if ($c.xplib.cf_IsEmpty(inspeBdt) || $c.xplib.cf_IsEmpty(sbcpDt)) {
return;
}
var bdt = String(inspeBdt);
//์๋ น์ผ ๊ณ์ฐ(์ฒญ์ฝ๋
๋+ (ํผ๋ณดํ์์์ผ(์,์ผ) + 6๊ฐ์) )
var sbcpYy = String(sbcpDt).substr(0, 4);
var bdtMd = String(bdt).substr(4, 4);
var tmpAgeDd = String($c.xplib.cf_AddMonth(bdt, 6));
var nxinsAgeDd = sbcpYy + String(tmpAgeDd).substr(4, 4);
// ์ค๋
๋ณด์
var bdtLeapYearYn = $c.xplib.cf_IsLeapYear(bdt);
var stdDtLeapYearYn = $c.xplib.cf_IsLeapYear(String(sbcpDt));
if (bdtLeapYearYn && !stdDtLeapYearYn) {
if (String(nxinsAgeDd).substr(4, 4) == "0229") {
nxinsAgeDd = String(nxinsAgeDd).substr(0, 4) + "0228";
}
}
//์๋ น์ผ์ ์ฒญ์ฝ์ผ์ ๊ธฐ์ค์ผ๋ก ์ฒดํฌ
if (String(sbcpDt) < nxinsAgeDd && $c.xplib.cf_GetDayDiff(String(sbcpDt), nxinsAgeDd) < 31) {
nxinsAgeDd = "<fc v='red'>" + nxinsAgeDd.substr(4, 2) + "์ " + nxinsAgeDd.substr(6, 2) + "์ผ</fc>";
} else {
nxinsAgeDd = nxinsAgeDd.substr(4, 2) + "์ " + nxinsAgeDd.substr(6, 2) + "์ผ";
}
StaticInsagDt.setValue("(์๋ น์ผ : ๋งค๋
" + nxinsAgeDd + ")");
StaticInsagDt.setStyle("font-weight", "bold");
StaticInsagDt.setStyle("color", "red");
// ์๋ น์ผ์ ์ฒญ์ฝ์ผ์ ๊ธฐ์ค์ผ๋ก ์ฒดํฌํ ๊ฒฐ๊ณผ๋ฅผ StaticInsagDt์ ์ค์ ํ๊ณ ์คํ์ผ์ ์ ์ฉํ๋ค.
// ํด์ผ ์ฒดํฌ
var holidayRef = "data:dsEmhsReSbcInfBcVoTr.col2";
var holidayYn = $c.util.getComponent(holidayRef);
if (holidayYn.getValue(0) == "Y") {
nxinsAgeDd = "<fc v='red'>" + nxinsAgeDd.substr(4, 2) + "์ " + nxinsAgeDd.substr(6, 2) + "์ผ</fc>";
}
};
scwin.getThirdColumnValue = function() {
var thirdValue = "";
if (dsEmhsReSbcInfBcVoTr.getRowCount() > 0) {
var polNo = comCustNm.getRsidNo();
var nRow = dsEmhsReSbcInfBcVoTr.findRow("polNo", polNo);
if (nRow > -1) {
thirdValue = dsEmhsReSbcInfBcVoTr.getCellValue(nRow, 2); // ์ธ ๋ฒ์งธ ์ปฌ๋ผ ๊ฐ ๊ฐ์ ธ์ค๊ธฐ
thirdValue = thirdValue * -1; // ๊ฐ์ ธ์จ ๊ฐ์ -๋ฅผ ๊ณฑํ์ฌ ๋ถํธ๋ฅผ ๋ฐ์ ์ํจ๋ค.
}
}
return thirdValue;
}
scwin.generateMultiplicationTable = function() {
// ๊ตฌ๊ตฌ๋จ ์ถ๋ ฅ ํจ์
for (let i = 2; i <= 9; i++) {
let table = "";<tr><td>${i} x ${j} = ${result}</td></tr>
$c.lib.alert(table);
}
// 2๋จ๋ง ์ถ๋ ฅ
StaticInsagDt.setValue("(์๋ น์ผ : ๋งค๋ " + nxinsAgeDd + ")");
StaticInsagDt.setStyle("font-weight", "bold");
StaticInsagDt.setStyle("color", "red");
// ์บ๋ฒ์ค ์์๋ฅผ ์์ฑํ๊ณ ๊ทธ๋ฆฌ๊ธฐ ๋๊ตฌ๋ฅผ ์ค์ ํ๋ค.
var canvasObj = $c.util.getComponent("canvas1");
canvasObj.setValue("๊ตฌ๊ตฌ๋จ");
};
scwin.printBadPersonName = function() {
// ํผ๋ณดํ์ ์ด๋ฆ์ ์ถ๋ ฅํ๋ ํจ์
var badPersonName = "๋์๋";
// ํผ๋ณดํ์ ์ด๋ฆ์ ์ถ๋ ฅํ๊ณ , ํด๋น ์ด๋ฆ์ ํฌํจํ๋ ๋ฉ์์ง๋ฅผ ํ์ํ๋ค.
$c.lib.alert(badPersonName + "์(๋) ํผ๋ณดํ์์
๋๋ค.");
}
Response rules
- First, consist structure of the code.
- Continue the given code appropriately, considering its context from to next line.
- Make the code few lines long.
- If the code is in the block of code, should provide the code that is in the block of code.
- Make sure to genarate the code that is between and next line.
The response must be wrapped in the following JavaScript wrapper:
Additional AST instruction:
is the AST instruction of the code. please consider the AST instruction when you make the code.
File:
Cursor: line 515, column 1
Current function:
Current class:
Imports:
Symbols:
var - scwin.params
var - scwin.fvUntPdCd
var - scwin.options
function - scwin.changeGridRowColor()
function - scwin.changeGridRowColorByCol1Value()
function - scwin.onpageload()
function - scwin.onpageunload()
function - scwin.FNGCTNL3001_05_onload()
function - scwin.btnCnc_onclick(e)
function - scwin.fnCallback(sSvcId, nErrorCode, sErrorMsg)
function - scwin.isAgreePreSearch()
function - scwin.getInsuName()
function - scwin.getProductNameTruncated(productName)
function - scwin.checkCusNoExist()
function - scwin.btnSrch_onclick(e)
function - scwin.comCustNm_Callback()
function - scwin.executeAllFunctions()
function - scwin.fnRetrieveSlzCusIndvInf()
function - scwin.fnInitForCusNo()
function - scwin.btnCnf_onclick(e)
function - scwin.fnChkOrgSrchAtho()
function - scwin.fnSrchAthoCallback(sSvcId, nErrorCode, sErrorMsg)
function - scwin.grdLst_oncellclick(row, col, colId)
function - scwin.fnChkOrgInpAtho(orgId, orgDivCd)
function - scwin.fnChkOrgInpAthoCallBack(sSvcId, nErrorCode, sErrorMsg)
function - scwin.calSbcpDt_canchange(info)
function - scwin.calSbcpDt_onchanged(info)
function - scwin.fnCalInsagDt(inspeBdt, sbcpDt)
function - scwin.getThirdColumnValue()
function - scwin.generateMultiplicationTable()
function - scwin.printBadPersonName()
AST syntax path:
Program
Current node:
{
"type": "Program",
"range": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 605,
"column": 0
}
}
}
Available functions:
Available classes:
Available variables:
Scope variables:
Parameters:
Code context:
scwin.params = $c.xplib.getPopupParam();
scwin.fvUntPdCd = "";
scwin.options = {
age: "fsdfs",
dddd: "dfsdfsdf",
name: "fsdfdf"
}
scwin.changeGridRowColor = function() {
// dsCtrOrgCoVo์ col1 ๊ฐ์ ๋ฐ๋ผ grdLst์ ๋ฐฐ๊ฒฝ์์ ๋ณ๊ฒฝ
var col1Value = dsCtrOrgCoVo.getCellData(dsCtrOrgCoVo.getRowPosition(), "col1");
/* ... omitted ... */
grdLst.setRowBackgroundColor(0, "white");
}
}
scwin.changeGridRowColorByCol1Value = function() {
// ์ ์ฒด dsSbcDsgAthoInqCndBcVo์ col1์ ๊ฐ์ ๋ฐ๋ผ grdLst์ row ๋ฐฐ๊ฒฝ์์ ๋ณ๊ฒฝ
var col1Value = dsSbcDsgAthoInqCndBcVo.getCellData(dsSbcDsgAthoInqCndBcVo.getRowPosition(), "col1");
/* ... omitted ... */
}
}
}
scwin.onpageload = function() {
scwin.FNGCTNL3001_05_onload();
};
scwin.onpageunload = function() {
};
scwin.FNGCTNL3001_05_onload = function() {
//Form Load์ ๋ฐ๋์ ํธ์ถํด์ผํจ.
/* ... omitted ... */
scwin.fnChkOrgSrchAtho();
};
scwin.btnCnc_onclick = function(e) {
$c.xplib.closePopup(null);
};
scwin.fnCallback = function(sSvcId, nErrorCode, sErrorMsg) {
if (nErrorCode < 0) {
return;
/* ... omitted ... */
break;
}
};
scwin.isAgreePreSearch = function() {
return comAgreePreSearch.getValue() === "Y";
}
scwin.getInsuName = function() {
var insuName = "";
if (dsEmhsReSbcInfBcVoTr.getRowCount() > 0) {
/* ... omitted ... */
}
return insuName;
}
scwin.getProductNameTruncated = function(productName) {
if (productName.length > 20) {
const truncatedName = productName.substring(0, 20) + " ์ธ " + (productName.length - 20);
/* ... omitted ... */
}
return productName;
}
scwin.checkCusNoExist = function() {
var cusNo = comCustNm.getRsidNo();
var exist = dsCusInfResult.findRow("cusNo", cusNo);
/* ... omitted ... */
$c.lib.alert("ํด๋น ๊ณ ๊ฐ๋ฒํธ์ ์ ๋ณด๊ฐ ์์ต๋๋ค.");
}
}
scwin.btnSrch_onclick = function(e) {
dsEmhsReSbcInfBcVoTr.clearData();
if ($c.xplib.cf_IsEmpty(comCustNm.getObject("dsCusInfResult")) || comCustNm.getObject("dsCusInfResult").getRowCount() == 0 ||
/* ... omitted ... */
var sOutDs = "dsEmhsReSbcInfBcVoTr=body";
$c.xplib.cf_Transaction("FNGCTNLO0414", "", "", sInDs, sOutDs, "", "scwin.fnCallback");
};
scwin.comCustNm_Callback = function() {
if (!$c.xplib.cf_IsEmpty(comCustNm.getObject("dsCusInfResult")) && comCustNm.getObject("dsCusInfResult").getRowCount() > 0 &&
!$c.xplib.cf_IsEmpty(comCustNm.getObject("dsCusInfResult").getColumn(0, "cusNo")) && !$c.xplib.cf_IsEmpty(comCustNm.getObject("dsCusInfResult").getColumn(0, "cusId"))) {
/* ... omitted ... */
}
}
};
scwin.executeAllFunctions = function() {
// ๋ชจ๋ ํจ์ ์คํ
scwin.onpageload();
/* ... omitted ... */
If you use comments, please write them in Korean.