맨위로가기
 

SBUx

닫기

1.5 컴포넌트들 새로 고침하기

STEP 1. 개별 Component refresh

1. refresh Method를 사용하여 새로고침합니다.
<script>
    function refresh(name){
        SBUxMethod.refresh(name);
    };
</script>
<sbux-input id="sbIdx1" name="sbName1" uitype="text"></sbux-input>

STEP 2. 여러 Component 한번에 refresh

1. refreshAll Method를 사용하여 새로고침합니다.
<sbux-input id="sbIdx1" name="sbName1" uitype="text"></sbux-input>
<sbux-input id="sbIdx2" name="sbName2" uitype="text"></sbux-input>
<sbux-input id="sbIdx3" name="sbName3" uitype="text"></sbux-input>
<script>
    function refreshAll(){
        SBUxMethod.refreshAll();
    };
</script>

STEP 3. Component Group refresh

1. 아래와 같이 컴포넌트에 그룹핑을 위한 속성을 추가합니다.
<sbux-input id="sbIdx1" name="sbName1" uitype="text" group-id="sbGroup"></sbux-input>
<sbux-input id="sbIdx2" name="sbName2" uitype="text" group-id="sbGroup"></sbux-input>
<sbux-input id="sbIdx3" name="sbName3" uitype="text" ></sbux-input>
2. refreshAll Method로 컴포넌트 그룹 전체를 새로고침합니다.
<sbux-input id="sbIdx1" name="sbName1" uitype="text" group-id="sbGroup"></sbux-input>
<sbux-input id="sbIdx2" name="sbName2" uitype="text" group-id="sbGroup"></sbux-input>
<sbux-input id="sbIdx3" name="sbName3" uitype="text" ></sbux-input>
<script>
    function refreshGroup(name){
        SBUxMethod.refreshGroup(name);
    };
</script>

값을 입력하고 refresh 해보세요.