본문 바로가기
IT/nexacro

nexacro 다건 선택할 수 있는 콤보

by heavenLake 2021. 2. 4.
반응형

 

 

 

Source
<?xml version="1.0" encoding="utf-8"?>
<FDL version="2.0">
  <TypeDefinition url="..\default_typedef.xml"/>
  <Form id="form" classname="Multi_Combo" left="0" top="0" width="800" height="600" titletext="확장콤보" onload="form_onload">
    <Layouts>
      <Layout>
        <Button id="Button00" taborder="1" text="Value 가져오기" left="398" top="9" width="125" height="22" onclick="Button00_onclick"/>
        <Static id="Static33" taborder="2" text="code/data" left="10" top="8" width="141" height="24" background="#f8f8f8" font="bold 12px &quot;Gulim&quot;" textAlign="center" border="1px solid #787878" onclick="Static01_onclick"/>
        <Static id="Static01" taborder="3" text="다건 선택 " left="10" top="90" width="141" height="24" background="#f8f8f8" font="bold 12px &quot;Gulim&quot;" textAlign="center" border="1px solid #787878" onclick="Static01_onclick"/>
        <Button id="Button02" taborder="5" text="값가져오기" left="398" top="91" width="125" height="22" onclick="Button02_onclick"/>
        <Button id="Button01" taborder="6" text="Text 가져오기" left="528" top="9" width="125" height="22" onclick="Button01_onclick"/>
        <Static id="Static00" taborder="7" text="다건 선택 기본값 설정" left="10" top="170" width="141" height="24" background="#f8f8f8" font="bold 12px &quot;Gulim&quot;" textAlign="center" border="1px solid #787878" onclick="Static01_onclick"/>
        <Div id="divCombo01" taborder="0" left="151" top="8" height="23" url="com::comCombo01.xfdl" formscrolltype="none" width="240"/>
        <Div id="divCombo02" taborder="4" left="151" top="90" width="240" height="23" url="com::comCombo02.xfdl" formscrolltype="none"/>
        <Div id="divCombo03" taborder="8" left="151" top="170" width="240" height="23" url="com::comCombo02.xfdl" formscrolltype="none"/>
        <Static id="Static00_00" taborder="9" text="다건 선택 ALL 추가" left="10" top="250" width="141" height="24" background="#f8f8f8" font="bold 12px &quot;Gulim&quot;" textAlign="center" border="1px solid #787878" onclick="Static01_onclick"/>
        <Div id="divCombo04" taborder="10" left="151" top="250" width="240" height="23" url="com::comCombo02.xfdl" formscrolltype="none"/>
      </Layout>
    </Layouts>
    <Objects>
      <Dataset id="ds_addr">
        <ColumnInfo>
          <Column id="CODE" type="STRING" size="256"/>
          <Column id="ADDRESS" type="STRING" size="256"/>
        </ColumnInfo>
        <Rows>
          <Row>
            <Col id="CODE">11110104</Col>
            <Col id="ADDRESS">서울시 종로구 효자동</Col>
          </Row>
          <Row>
            <Col id="CODE">11110109</Col>
            <Col id="ADDRESS">서울시 종로구 누상동</Col>
          </Row>
          <Row>
            <Col id="CODE">11110110</Col>
            <Col id="ADDRESS">서울시 종로구 누하동</Col>
          </Row>
          <Row>
            <Col id="CODE">11110116</Col>
            <Col id="ADDRESS">서울시 종로구 도렴동</Col>
          </Row>
          <Row>
            <Col id="CODE">11110118</Col>
            <Col id="ADDRESS">서울시 종로구 내수동</Col>
          </Row>
          <Row>
            <Col id="CODE">11110124</Col>
            <Col id="ADDRESS">서울시 종로구 수송동</Col>
          </Row>
          <Row>
            <Col id="CODE">11110130</Col>
            <Col id="ADDRESS">서울시 종로구 와룡동</Col>
          </Row>
          <Row>
            <Col id="CODE">11110140</Col>
            <Col id="ADDRESS">서울시 종로구 삼청동</Col>
          </Row>
          <Row>
            <Col id="CODE">11110151</Col>
            <Col id="ADDRESS">서울시 종로구 묘동</Col>
          </Row>
          <Row>
            <Col id="CODE">11110153</Col>
            <Col id="ADDRESS">서울시 종로구 돈의동</Col>
          </Row>
          <Row>
            <Col id="CODE">11140112</Col>
            <Col id="ADDRESS">서울시 중구 남창동</Col>
          </Row>
          <Row>
            <Col id="CODE">11140123</Col>
            <Col id="ADDRESS">서울시 중구 회현동3가</Col>
          </Row>
          <Row>
            <Col id="CODE">11140128</Col>
            <Col id="ADDRESS">서울시 중구 남산동1가</Col>
          </Row>
          <Row>
            <Col id="CODE">11140139</Col>
            <Col id="ADDRESS">서울시 중구 필동3가</Col>
          </Row>
          <Row>
            <Col id="CODE">11140151</Col>
            <Col id="ADDRESS">서울시 중구 을지로5가</Col>
          </Row>
        </Rows>
      </Dataset>
    </Objects>
  </Form>
</FDL>

 

Script
include "lib::lib_Form.xjs"

this.form_onload = function(obj:nexacro.Form,e:nexacro.LoadEventInfo)
{
	//this.gfn_formOnLoad(obj); // 필수
	
	// code width(기본값:60)
	//var objArg = {ds:this.ds_addr, code:"CODE", data:"ADDRESS"};
	
	// size:100(code width 조정)
	var objArg = {ds:this.ds_addr, code:"CODE", data:"ADDRESS", size:60};
	this.divCombo01.form.fn_setData(objArg);
	
	var objArg = {ds:this.ds_addr, code:"CODE", data:"ADDRESS", size:80};
	this.divCombo02.form.fn_setData(objArg);		
	
	var objArg = {ds:this.ds_addr, code:"CODE", data:"ADDRESS", size:80, baseValueSet: new Array("11110109", "11110110")};
	this.divCombo03.form.fn_setData(objArg);			
	
	//var objArg = {ds:this.ds_addr, code:"CODE", data:"ADDRESS", size:80, all:true};
	//var objArg = {ds:this.ds_addr, code:"CODE", data:"ADDRESS", size:0, all:true};
	var objArg = {ds:this.ds_addr, code:"CODE", data:"ADDRESS", size:0, baseValueSet: new Array("ALL"), all:true};
	this.divCombo04.form.fn_setData(objArg);				
};

this.Button00_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo)
{
	this.alert(this.divCombo01.form.fn_getValue());
};

this.Button01_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo)
{
	this.alert(this.divCombo01.form.fn_getText());
};

this.Button02_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo)
{
	this.alert(this.divCombo02.form.fn_getValue());
};

 

반응형

댓글