Java, SpringBoot, React, Angular, Oracle, PL/SQL, Ellucian Banner, Puppet, Docker, Terraform technical notes
Friday, July 27, 2018
Banner 9: Validate NULL for textbox
Banner 9: Validate NULL for textbox
In Form controller
@ActionTrigger(action="VALIDATE_NULL")
public void Ftmvend_ValidateNull()
{
FtvvendAdapter ftvvendElement = (FtvvendAdapter)this.getFormModel().getFtvvend().getRowAdapter(true);
if (ftvvendElement==null)
return;
if ( !ftvvendElement.getFtvvendTaxFormStatus().isNull() && ftvvendElement.getFtvvendTaxFormDate().isNull() )
{
errorMessage(GNls.Fget(toStr("DDD-0037"), toStr("FORM"), toStr("A status date must be entered for the related Tax Form Status.")));
goItem(toStr("FTVVEND_TAX_FORM_DATE"));
throw new ApplicationException();
}
}
In Block controller
@ActionTrigger(action="KEY-COMMIT", function=KeyFunction.SAVE)
public void ftvvend_Save()
{
FtvvendAdapter ftvvendElement = (FtvvendAdapter)this.getFormModel().getFtvvend().getRowAdapter(true);
if (ftvvendElement==null)
return;
executeAction("VALIDATE_NULL");
getTask().getGoqrpls().gCheckFailure();
commitTask();
getTask().getGoqrpls().gCheckFailure();
getTask().getGoqrpls().gCheckStatusQuery();
}
Banner 9: textbox live hint, validation
Ellucian Banner 9: textbox live hint, validation
set hint in task start of Form controller
getTask().getGoqrpls().gSsnSetItemHint(toStr("FTVVEND.PERS_SSN"));
GoqrplsServices in Common
public void gSsnSetItemHint(NString pItem)
{
// -- Implemented in version 8.0
// -- To be used in WHEN-NEW-ITEM-INSTANCE of data enterable SSN items
// -- SSN may be a length of 9, 10, 11, 12, 13, 14 or 15 basedup the GUBINST_SSN_MAX_LENGTH value.
// -- This routine will append to the SSN items autohint display
// --
NString lvHint= NString.getNull();
NString lvAppendHint = GNls.Fget(toStr("GOQRPLS-0150"), toStr("LIB"), toStr("Maximum field length %01% characters."), getNameIn("GLOBAL.GUBINST_SSN_MAX_LENGTH"));
lvHint = getItemHint(pItem);
if ( inStr(lvHint, lvAppendHint).equals(0) )
{
if ( !lvHint.isNull() )
{
lvHint = lvHint.append(" ").append(lvAppendHint);
}
else {
lvHint = lvAppendHint;
}
setItemHint(pItem, lvHint);
}
}
Tuesday, July 17, 2018
Banner 9: Info message, error message, alert message boxes
Banner 9: Info message, error message, alert message boxes
MessageServices.message("This is info");
MessageServices.setAlertMessageText("aa", "This is xxx.");
MessageServices.showAlert("aa");
/MessageServices.message("sss", userResponse);
//OutputMessageUserResponse
getTask().getGoqrpls().gDisplayAlert(toStr("G$_WARNING_ALERT"), GNls.Fget(toStr("GUAGMNU-0007"), toStr("FORM"), toStr("aaaaaaaaaaaaaaaaaaaaa.")) );
getTask().getGoqrpls().gDisplayAlert(toStr("G$_WARNING_ALERT"), new NString("This is aalert.") );
MessageServices.message("This is info");
MessageServices.setAlertMessageText("aa", "This is xxx.");
MessageServices.showAlert("aa");
/MessageServices.message("sss", userResponse);
//OutputMessageUserResponse
getTask().getGoqrpls().gDisplayAlert(toStr("G$_WARNING_ALERT"), GNls.Fget(toStr("GUAGMNU-0007"), toStr("FORM"), toStr("aaaaaaaaaaaaaaaaaaaaa.")) );
getTask().getGoqrpls().gDisplayAlert(toStr("G$_WARNING_ALERT"), new NString("This is aalert.") );
Monday, July 16, 2018
Banner 9 List show At last record fix for "you can not create record here"
Banner 9 List show At last record fix for "you can not create record here"
@ActionTrigger(action="KEY-NXTREC", function=KeyFunction.NEXT_RECORD)
public void glbslct_NextRecord()
{
GAdapter gElement = (GAdapter)this.getFormModel().getGT().getRowAdapter(true);
if (gElement !=null){
nextRecord();
getTask().getGoqrpls().gCheckFailure();
if ( gElement .getCode().isNull() )
{
previousRecord();
getTask().getGoqrpls().gCheckFailure();
infoMessage(GNls.Fget(toStr("G-0008"), toStr("FORM"), toStr("At last record.")));
}
}
}
/* @ActionTrigger(action="WHEN-NEW-RECORD-INSTANCE", function=KeyFunction.RECORD_CHANGE)
@After
public void xx_recordChange()
{
Adapter element = (FtvacctAdapter)this.getFormModel().getxxx().getRowAdapter(true);
if (element == null) return;
if (BlockServices.isInLastRecord())
{
/
if ( getBlockCurrentRecord(getCursorBlock()).notEquals(1) )
{
infoMessage(GNls.Fget(toStr("-0010"), toStr("FORM"), toStr("At last record.")));
previousRecord();
BlockServices.lastRecord();
}
}
//errorMessage(GNls.Fget(toStr("-0011"), toStr("FORM"), toStr("Unable to retrieve Commit Type.")));
}
*/
@ActionTrigger(action="KEY-NXTREC", function=KeyFunction.NEXT_RECORD)
public void glbslct_NextRecord()
{
GAdapter gElement = (GAdapter)this.getFormModel().getGT().getRowAdapter(true);
if (gElement !=null){
nextRecord();
getTask().getGoqrpls().gCheckFailure();
if ( gElement .getCode().isNull() )
{
previousRecord();
getTask().getGoqrpls().gCheckFailure();
infoMessage(GNls.Fget(toStr("G-0008"), toStr("FORM"), toStr("At last record.")));
}
}
}
/* @ActionTrigger(action="WHEN-NEW-RECORD-INSTANCE", function=KeyFunction.RECORD_CHANGE)
@After
public void xx_recordChange()
{
Adapter element = (FtvacctAdapter)this.getFormModel().getxxx().getRowAdapter(true);
if (element == null) return;
if (BlockServices.isInLastRecord())
{
/
if ( getBlockCurrentRecord(getCursorBlock()).notEquals(1) )
{
infoMessage(GNls.Fget(toStr("-0010"), toStr("FORM"), toStr("At last record.")));
previousRecord();
BlockServices.lastRecord();
}
}
//errorMessage(GNls.Fget(toStr("-0011"), toStr("FORM"), toStr("Unable to retrieve Commit Type.")));
}
*/
Thursday, July 12, 2018
Banner 9 Insert data to table and Select multiple row
Banner 9 Insert data to table and Select multiple row
String sqlc1 = "SELECT * " +
" FROM FFRMASF " +
" WHERE FFRMASF_OTAG_CODE = :FFBMAST_OTAG_CODE ";
DataCursor c1 = new DataCursor(sqlc1);
TableRow recType3= null;
try{
//Setting query parameters
c1.addParameter("FFBMAST_OTAG_CODE", ffbmastElement.getFfbmastOtagCode());
c1.open();
while (true) {
recType3 = c1.fetchRow();
//recType3.getNumber("FFRMASF_AMT") = 0;
if ( c1.notFound() )
break;
parCoasCode=recType3.getStr("ffrmasf_coas_code");
FFRMASF_FUND_CODE=recType3.getStr("ffrmasf_fund_Code");
try{
//Setting query parameters
findEquity.addParameter("P_PAR_COAS_CODE", parCoasCode);
findEquity.open();
ResultSet findEquityResults = findEquity.fetchInto();
if ( findEquityResults != null ) {
holdPlant = findEquityResults.getStr(0);
}
if ( findEquity.notFound() || holdPlant.isNull() ){
try{
parCoasCode=recType3.getStr("ffrmasf_coas_Code");
//Setting query parameters
findEquityTwo.addParameter("P_PAR_COAS_CODE", parCoasCode);
findEquityTwo.open();
ResultSet findEquityTwoResults = findEquityTwo.fetchInto();
if ( findEquityTwoResults != null ) {
holdPlant = findEquityTwoResults.getStr(0);
}
}finally{
findEquityTwo.close();
}
}
}finally{
findEquity.close();
}
parCoasCode=recType3.getStr("ffrmasf_coas_Code");
try{
//Setting query parameters
fundFund.addParameter("P_PAR_FUND_CODE", parFundCode);
fundFund.open();
ResultSet fundFundResults = fundFund.fetchInto();
if ( fundFundResults != null ) {
holdFundFtyp = fundFundResults.getStr(0);
}
}finally{
fundFund.close();
}
parCoasCode=recType3.getStr("ffrmasf_coas_Code");
parFtypCode=holdFundFtyp;
try{
//Setting query parameters
fundInternal.addParameter("EFFDATE_EFF_DATE_TIME", getFormModel().getFormHeader().getEffdateEffDateTime());
fundInternal.open();
ResultSet fundInternalResults = fundInternal.fetchInto();
if ( fundInternalResults != null ) {
holdInternal = fundInternalResults.getStr(0);
}
}else {
if ( holdPlantFund.isNull() ){
parCoasCode=recType3.getStr("ffrmasf_coas_Code");
try{
//Setting query parameters
fundInternalTwo.addParameter("P_PAR_COAS_CODE", parCoasCode);
fundInternalTwo.open();
ResultSet fundInternalTwoResults = fundInternalTwo.fetchInto();
if ( fundInternalTwoResults != null ) {
holdPlantFund = fundInternalTwoResults.getStr(0);
}
FFRMASF_FUND_CODE = holdPlantFund;
}finally{
fundInternalTwo.close();
}
}
FFRMASF_FUND_CODE = holdPlantFund;
}
}finally{
fundInternal.close();
}
parCoasCode=recType3.getStr("ffrmasf_coas_code");
FFRMASF_ACCT_CODE = recType3.getStr("ffrmasf_Acct_Code");
parAcctCode= FFRMASF_ACCT_CODE;
try{
//Setting query parameters
fundAcct.addParameter("EFFDATE_EFF_DATE_TIME", getFormModel().getFormHeader().getEffdateEffDateTime());
fundAcct.open();
ResultSet fundAcctResults = fundAcct.fetchInto();
if ( fundAcctResults != null ) {
holdAcct = fundAcctResults.getStr(0);
}
}finally{
fundAcct.close();
}
}
String sql1 = "INSERT INTO FFRMASA " +
"(FFRMASA_OTAG_CODE, FFRMASA_CHANGE_SEQ_NUM, FFRMASA_SEQ_NUM, FFRMASA_ACTIVITY_DATE, FFRMASA_USER_ID, FFRMASA_COAS_CODE, FFRMASA_BANK_CODE, FFRMASA_AMT, FFRMASA_ADJ_AMT, FFRMASA_AMT_PCT, FFRMASA_FUND_CODE_CAP, FFRMASA_ACCT_CODE_ASSET, )" +
"VALUES (:P_REC_TYPE3_FFRMASF_OTAG_CODE, 0, :P_REC_TYPE3_FFRMASF_SEQ_NUM, :P_REC_TYPE3_FFRMASF_ACTIVITY_DATE, :P_REC_TYPE3_FFRMASF_USER_ID, :P_REC_TYPE3_FFRMASF_COAS_CODE, '', )";
DataCommand command1 = new DataCommand(sql1);
//Setting query parameters
command1.addParameter("P_REC_TYPE3_FFRMASF_OTAG_CODE", recType3.getStr("FFRMASF_OTAG_CODE"));
command1.addParameter("P_REC_TYPE3_FFRMASF_SEQ_NUM", recType3.getNumber("FFRMASF_SEQ_NUM"));
command1.addParameter("P_REC_TYPE3_FFRMASF_ACTIVITY_DATE", recType3.getDate("FFRMASF_ACTIVITY_DATE"));
command1.addParameter("P_REC_TYPE3_FFRMASF_USER_ID", recType3.getStr("FFRMASF_USER_ID"));
command1.addParameter("P_REC_TYPE3_FFRMASF_COAS_CODE", recType3.getStr("FFRMASF_COAS_CODE"));
rowCount = command1.execute();
}
}finally{
c1.close();
}
try{
MessageServices.setMessageLevel(FormsMessageLevel.decodeMessageLevel("5"));
commitTask();
}finally{
MessageServices.setMessageLevel(FormsMessageLevel.decodeMessageLevel("0"));
}
Banner : Select query using DataCusor example
Banner : Select query using DataCusor example
String sqlAcctTitle = "SELECT FTVACCT_TITLE " +
" FROM FTVACCT " +
" WHERE FTVACCT_COAS_CODE = :KEYBLOC_COAS_CODE1 ";
DataCursor acctCursor = new DataCursor(sqlAcctTitle);
try {
// Setting query parameters and passing the values into query above
//---------------------------------------------------------------------------
ptiCursor.addParameter("KEYBLOC_COAS_CODE", getFormModel().getKeyBlock().getKeyblocCoasCode());
// Open cursor and fetch result into Resultset
//--------------------------------------------------
ptiCursor.open();
ResultSet ptiCursorResults = ptiCursor.fetchInto();
if ( ptiCursorResults != null )
{
// Set the value from ResultSet into each column in each row
ftvacctElement.setDisplayAvailBud(ptiCursorResults.getNumber(0));
}
} catch (Exception e) {
throw new ApplicationException(e);
} finally{
ptiCursor.close();
}
}
String sqlAcctTitle = "SELECT FTVACCT_TITLE " +
" FROM FTVACCT " +
" WHERE FTVACCT_COAS_CODE = :KEYBLOC_COAS_CODE1 ";
DataCursor acctCursor = new DataCursor(sqlAcctTitle);
try {
// Setting query parameters and passing the values into query above
//---------------------------------------------------------------------------
ptiCursor.addParameter("KEYBLOC_COAS_CODE", getFormModel().getKeyBlock().getKeyblocCoasCode());
// Open cursor and fetch result into Resultset
//--------------------------------------------------
ptiCursor.open();
ResultSet ptiCursorResults = ptiCursor.fetchInto();
if ( ptiCursorResults != null )
{
// Set the value from ResultSet into each column in each row
ftvacctElement.setDisplayAvailBud(ptiCursorResults.getNumber(0));
}
} catch (Exception e) {
throw new ApplicationException(e);
} finally{
ptiCursor.close();
}
}
Thursday, June 28, 2018
Banner 9: able run form in local but not in server. On server error is Not not authorized access Form
Banner 9: able run form in local but not in server. On server error is Not not authorized access Form
Check all security and GUAPAGE too
Check all security and GUAPAGE too
*ERROR* User HRBATUSR not authorized access form in Banner 9
Subscribe to:
Posts (Atom)
AWS how to delete VPC when it has error with Network interface , Gateway decencies
how to delete VPC when it has error with Network interface , Gateway decencies in AWS 1. Check if it is running on EC2 instance then Sto...
-
ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP", line 1525 ORA-29261: bad argument ORA-29273: HTTP request failed ...
-
Banner 9 Admin: Invalid Object Name fix do steps: A record in GUBOBJS with a UI Version of D. • Records in GURAOBJ to define the defau...
-
chown root $ORACLE_HOME/bin/extjob chmod 4750 $ORACLE_HOME/bin/extjob chown root $ORACLE_HOME/rdbms/admin/externaljob.ora chmod 640 $ORA...