이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. ====== 필드 값 입력 유형 방식 가이드 ====== 필드성 컴포넌트 값 입력 유형 방식 대한 예시화면이다. 값 입력 유형 방식은 TranMap, AttributeMap, input_type 속성(그리드인 경우, data_inputtype 속성) 순서로 결정된다. 우선순위 1 - TranMap을 사용하고 USE_TRANMAP_ATTR 실행 파라미터(기본값: true)가 true인 경우, TranMap 속성에 의해서 결정된다. 우선순위 2 - "우선순위 1" 미적용시, AttributeMap을 사용하는 경우, AttributeMap 속성에 의해서 결정된다. 우선순위 3 - "우선순위 1" 및 "우선순위 2" 미적용시, input_type, inputtype_optionkind 속성에 의해서 결정된다. editable 속성은 input_type이 필수/선택인 경우, 키보드를 통한 값 변경 허용 여부를 설정한다. enable 속성은 input_type과 무관하게 컴포넌트 자체를 비활성화 처리를 수행한다. inputtype_optionkind이 true인 경우, 실행 파라미터에 정의된 색상이 적용된다. (테크넷 매뉴얼 "실행 파라미터" 참조) 관련 속성으로 input_type, inputtype_optionkind, apply_inputtypecolor, editable가 있다. 관련 API로 getinputtype, setinputtype, getapplyinputtypecolor, setapplyinputtypecolor가 있다. ===== 예시 ===== 템플릿 위치: /HTML5/COMPONENT/FIELD/field_inputtype 템플릿 파일 * [[xf5projecthome>template/screen/HTML5/COMPONENT/FIELD/field_inputtype.xml|field_inputtype.xml]] * [[xf5projecthome>template/screen/HTML5/COMPONENT/FIELD/field_inputtype.js|field_inputtype.js]] * [[xf5projecthome>template/template.html?xframe_screen_url=/HTML5/COMPONENT/FIELD/field_inputtype|새창으로 실행]] <php> echo '<html>'; echo '<iframe src="'; echo $conf['plugin']['xf5']['xf5projecthome'], 'template/template.html?'; echo 'xframe_screen_url=/HTML5/COMPONENT/FIELD/field_inputtype"'; echo ' class="_xf5_iframe"'; echo ' style="'; echo $conf['plugin']['xf5']['xf5iframestyle']; echo '">'; echo '</iframe>'; echo '</html>'; </php> ==== 화면 스크립트 ==== <sxh javascript> // "get/setinputtype" 버튼 이벤트 function btn_inputtype_on_click(objInst) { var ret, input_type; input_type = this.fld_inputtype.getinputtype(); factory.consoleprint("getinputtype return = " + input_type); switch(input_type) { case 0: factory.consoleprint("input_type = " + input_type + ", 선택"); break; case 1: factory.consoleprint("input_type = " + input_type + ", 필수"); break; case 2: factory.consoleprint("input_type = " + input_type + ", 잠금"); break; case 3: factory.consoleprint("input_type = " + input_type + ", 잠금+필수"); break; } // 입력 방식인 "선택"인 경우, "잠금"으로 변경 if (input_type == 0) { ret = this.fld_inputtype.setinputtype(2); } // 입력 방식인 "잠금"인 경우, "선택"으로 변경 else if (input_type == 2) { ret = this.fld_inputtype.setinputtype(0); } factory.consoleprint("setinputtype return = " + ret); } // "get/setapplyinputtypecolor" 버튼 이벤트 function btn_applyinputtypecolor_on_click(objInst) { var is_apply_color; is_apply_color = this.fld_inputtype.getapplyinputtypecolor(); factory.consoleprint("before getapplyinputtypecolor return = " + is_apply_color); // apply_inputtypecolor 속성값 토글 처리 this.fld_inputtype.setapplyinputtypecolor(!is_apply_color); is_apply_color = this.fld_inputtype.getapplyinputtypecolor(); factory.consoleprint("after getapplyinputtypecolor return = " + is_apply_color); } </sxh> guide/component/field/field_inputtype.txt 마지막으로 수정됨: 2023/10/25 16:57저자 127.0.0.1