참고
20211219 - Dynamic Action 버튼 보이기/감추기
20211219 - 캘린더 일정 관리, 완료 일정 취소선 Strike 처리
1. Page - CSS - Inline
2. Calendar 리전 - SQL Query
3. 구현된 화면
참고
20211209 - IG LOV 기본 값 셋팅하기 - 행 추가 후 기본 값
1. IG 컬럼 >> Advanced
JavaScript Initialization Code :
이렇게 하지 않고 보통 다른 컬럼들 하는 것처럼 default 값을 셋팅하게 되면 value 는 셋팅이 되지만 Display 값은 셋팅되지 않아서 위와 같이 json 형식으로 셋팅하면 됨
참고
https://hardlikesoftware.com/weblog/2017/03/31/how-to-hack-apex-interactive-grid-part-4/
https://www.jmjcloud.com/blog/workaround-for-issue-setting-a-default-value-for-the-apex-192-popup-lov
https://community.oracle.com/tech/developers/discussion/4335748/how-to-set-default-value-for-popup-lov
https://docs.oracle.com/en/database/oracle/application-express/21.2/aexjs/model.html#.FieldMeta
config.initActions = function(actions) {
var addRow = actions.lookup("selection-add-row");
var originalAction = addRow.action;
addRow.action = function(event,el) {
// do your own stuff before original action if needed
originalAction(event,el);
// do your own stuff after original action if needed. This is what page 17 does:
// after the grid has had a chance to change the selection
setTimeout(function() {
apex.item("P17_ENAME").setFocus();
}, 100);
return true; // because focus was set
}
}function( config ) {
config.defaultGridColumnOptions = {
defaultValue: function( model, record ) {
return ...;
}
}
return config;
}var val, model = this.data.model, rec = this.data.record, meta = model.getRecordMetadata(this.data.recordId); if ( meta.inserted ) { val = model.getValue(rec, "JOB") if ( val.v === val.d ) { model.setValue(rec,"JOB", {d:apex.item("C_JOB").displayValueFor("CLERK"), v: "CLERK"}); } val = model.getValue(rec, "ONLEAVE"); if ( val.v === val.d ) { model.setValue(rec,"ONLEAVE", {d:apex.item("C_ONLEAVE").displayValueFor("N"), v:"N"}); } }
function(config) {
config.defaultGridColumnOptions = {
defaultValue: function( model, srcRecord ) {
let m,
name = "";
if ( srcRecord ) {
name = model.getValue( srcRecord, "ENAME" ),
m = /(.*)(\d+)$/.exec( name );
if ( m ) {
name = m[1] + ( parseInt( m[2], 10 ) + 1 );
} else {
name += "_1";
}
}
return name;
}
}
return config;
}
20211204 - Interactive Grid 더블 클릭해서 새로운 윈도우 창 열기
1. Dynamic Action
Name : DoubleClick_POMSTIG
When - Event : Double Click
Selection Type : Region
2. Ajax Callback
Name : BTN-popup
Type : Execute Code
Source - Location : Local Database
Language : PL/SQL
PL/SQL Code
참고
https://docs.oracle.com/en/database/oracle/application-express/21.2/aexjs/apex.navigation.html#.openInNewWindow
20211120 - 로그인 인증 후 권한에 따른 메뉴 조회 Authorized Menu, Custom Navigation Menu
1. Shared Component >> Navigation Menu >> Create
Create List from Scratch
Name : Dynamic Navigation Menu
Type : Dynamic
2. User Interface Attribute
Navigation Menu >> Dynamic Navigation Menu 선택
3. 로그인 후 권한에 따른 메뉴 구성
4. 권한별 메뉴 리스트에 대한 ERD 참고
SQL 참고
참고.
20211120 - 커스텀 로그인 사용자 테이블 인증 Custom Authentication
1. 커스텀 인증 방식 생성
Name : CustomMyAuth
Scheme Type : Custom
Authentication Function Name : F_AUTHENTICATE_USER
2. 함수 생성
3. 커스텀 인증 방식을 현재 인증 방식으로 설정
* 주의 : 로그인 ID 가 로그인 테이블에 소문자로 저장되어 있어도 세션에 저장되는 :APP_USER 값은 대문자임.
참고.
https://blogs.oracle.com/apex/post/custom-authentication-and-authorization-using-built-in-apex-access-control-a-how-to
20211118 - Let's Encrypt SSL, certbot renewal
1. Let's Encrypt 무료 SSL을 사용하고 있고 조만간 만료가 예정되어 있음
아니면 certbot renew 로 하면 물어보는 창 없이 바로 실행됨
별개의 추가 설정 사항
Cron Job
vi /root/othermonthrenew.sh
systemctl stop nginx
crontab -e
1 0 1 2,4,6,8,10,12 * /root/othermonthrenew.sh >> /tmp/othermonthrenew.log 2>&1
chmod +x /root/othermonthrenew.sh
ex)
매월 첫째주 일요일 새벽 1시
0 1 * * 0 [ "$(date +\%d)" -le 07 ] && /path/to/your/script.sh
참고1
certbot certificates
certbot update_account --email yourname+1@example.com
https://eff-certbot.readthedocs.io/en/stable/using.html#automated-renewals
참고2
http://dgielis.blogspot.com/2019/12/free-oracle-cloud-16-renewing-lets.html
https://docs.oracle.com/en/learn/oracle-linux-crontab/index.html#check-your-cron-entry-output
https://jdm.kr/blog/2
https://velog.io/@jay2u8809/Crontab%ED%81%AC%EB%A1%A0%ED%83%AD-%EC%8B%9C%EA%B0%84-%EC%84%A4%EC%A0%95
20250315 - 글로벌 변수 Global Variables
G_USER Specifies the currently logged in user. G_FLOW_ID Specifies the ID of the currently running application. G_FLOW_STEP_ID Specifi...
-
권한 부여 grant connect,create view, create job, create table, create sequence, create trigger, create procedure, create any context to existing...
-
1. 커스텀 인증 방식 생성 Name : CustomMyAuth Scheme Type : Custom Authentication Function Name : F_AUTHENTICATE_USER 2. 함수 생성 create or replace ...
-
declare tune_mv varchar2(20) := 'mview_task'; begin dbms_advisor.tune_mview ( task_name=>tune_mv, mv_create_stmt=>'cre...