이 예제에서는 기본 설정을 지정한 다음 지정된 모달에서 해당 기본 설정을 검색하는 간단한 경우를 보여 줍니다.
var gm = new GlideModal('UI_dialog_name');
//Sets the dialog title
gm.setTitle('Show title');
//sets the value of the preference table
gm.setPreference('table', 'incident');
//gets the value of the preference table
var title = gm.getPreference('table');
GlideModal - render()
모달에서 UI 페이지를 렌더링합니다.
표 6. 매개변수
이름
유형
설명
없음
표 7. 반환
유형
설명
void
var gm = new GlideModal("UI_dialog_name");
//Sets the dialog title
gm.setTitle('Show title');
gm.setWidth(550);
//Opens the dialog
gm.render();
GlideModal - renderWithContent(html 객체)
지정된 HTML 컨텐츠가 포함된 모달을 표시합니다.
renderWithContent() 메서드는 render() 메서드를 대체하며 렌더링할 UI 페이지를 요청하지 않습니다.
표 8. 매개변수
이름
유형
설명
html
객체
모달에 표시할 HTML 컨텐츠입니다.
표 9. 반환
유형
설명
void
GlideModal - renderWithContent(html 문자열)
지정된 HTML 컨텐츠가 포함된 모달을 표시합니다.
renderWithContent() 메서드는 render() 메서드를 대체하며 렌더링할 UI 페이지를 요청하지 않습니다.
표 10. 매개변수
이름
유형
설명
html
문자열
모달에 표시할 HTML 컨텐츠입니다.
표 11. 반환
유형
설명
void
GlideModal - setPreference(문자열 이름, 문자열 값)
현재 양식의 지정된 필드를 지정된 값으로 설정합니다.
표 12. 매개변수
이름
유형
설명
name
문자열
업데이트할 양식 필드의 이름입니다.
이 필드가 현재 양식에 없으면 요청이 무시됩니다.
값
문자열
지정된 양식 필드에 저장할 값입니다.
표 13. 반환
유형
설명
void
var gm = new GlideModal('UI_dialog_name');
//Sets the dialog title
gm.setTitle('Show title');
gm.setPreference('table', 'task');
gm.setPreference('name', 'value');
//Opens the dialog
gm.render();
GlideModal - setPreferenceAndReload(배열 속성)
속성을 설정하고 모달을 다시 로드합니다.
표 14. 매개변수
이름
유형
설명
속성
배열
설정할 이름-값 쌍의 배열입니다.
표 15. 반환
유형
설명
void
GlideModal - setTitle(title 문자열)
모달의 제목을 설정합니다.
표 16. 매개변수
이름
유형
설명
제목
문자열
표시할 제목
표 17. 반환
유형
설명
void
var gm = new GlideModal('UI_dialog_name');
//Sets the dialog title
gm.setTitle('Show title');
gm.setPreference('name', 'value');
//Opens the dialog
gm.render();
GlideModal - setWidth(width 숫자)
너비를 픽셀 단위로 설정합니다.
모달은 미리 정의된 시스템 크기로 박스형입니다.
표 18. 매개변수
이름
유형
설명
width
번호
픽셀 수입니다.
표 19. 반환
유형
설명
void
var gm = new GlideModal('UI_dialog_name');
//Sets the dialog title
gm.setTitle('Show title');
gm.setPreference('name', 'value');
gm.setWidth(550);
//Opens the dialog
gm.render();