This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Apply view criteria named MyViewCriteria to it's ViewObject | |
* by getting it through the binding iterator MyViewObjectIterator | |
* Full library : https://github.com/CedricL46/Oracle-ADF-and-JSF-Utils-libraries | |
*/ | |
public void applyViewCriteriaOnViewObjectByIteratorName(String MyViewCriteriaName, String MyViewObjectIteratorName) { | |
try { | |
//Get The viewObject from the iterator define in the current binding context | |
ViewObject vo = this.getViewObjectFromIteratorName(MyViewObjectIteratorName) | |
//Get all it's ViewCriteria using the ViewCriteriaManager of the ViewObject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String defaultNextStatus() { | |
String value = (String) getAttributeInternal(AttributesEnum.NextStatus.index()); | |
if (value == null) { | |
XxcrWorkflowUvVORowImpl nextStatut = (XxcrWorkflowUvVORowImpl) getWfkVA().first(); | |
//Wkfva is the VO of the LOV | |
if (nextStatut != null) { | |
return nextStatut.getTxtValeur(); | |
} | |
} | |
return value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ADF : jsf : | |
<h:commandButton id="myBtnId" | |
action="#{myBean.doLogic}" | |
value="click me" | |
type="submit" | |
actionListener="#{myBean.forwardAfterLogic}"/> | |
//ADF : myBean : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install git and upgrade all packages | |
sudo yum update -y | |
sudo yum install git | |
#Get last available version of let's encrypt | |
git clone https://github.com/letsencrypt/letsencrypt.git | |
#result : | |
Cloning into 'letsencrypt'... | |
remote: Counting objects: 55232, done. | |
remote: Compressing objects: 100% (55/55), done. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Initialize your project folder using npm | |
ubuntu@YourComputer:~/FbJokeBot$ npm init | |
This utility will walk you through creating a package.json file. | |
It only covers the most common items, and tries to guess sensible defaults. | |
See `npm help json` for definitive documentation on these fields | |
and exactly what they do. | |
Use `npm install <pkg>` afterwards to install a package and | |
save it as a dependency in the package.json file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Unapply a view criteria named MyViewCriteria to it's ViewObject | |
* by getting it through the binding iterator MyViewObjectIterator | |
* Full library: https://github.com/CedricL46/Oracle-ADF-and-JSF-Utils-libraries | |
*/ | |
public void UnApplyViewCriteriaOnViewObjectByIteratorName(String MyViewCriteriaName, String MyViewObjectIteratorName) { | |
try { | |
//Get The viewObject from the iterator define in the current binding context | |
ViewObject vo = this.getViewObjectFromIteratorName(MyViewObjectIteratorName) | |
//Get all it's ViewCriteria using the ViewCriteriaManager of the ViewObject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<af:group id="pt_g3"> | |
<div id="loaderId"></div> | |
<af:popup id="processingP" contentDelivery="immediate" clientComponent="true"> | |
<af:dialog id="d2" title="Processing..." type="none" closeIconVisible="false" inlineStyle="text-align:center;" clientComponent="true" | |
modal="true"> | |
<f:facet name="buttonBar"/> | |
<af:panelGroupLayout id="pgl2" layout="vertical" halign="center"> | |
<af:spacer width="10" height="10" id="s11"/> | |
<af:outputText value="Please wait..." id="ot2669"/> | |
</af:panelGroupLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var popup = null; | |
var clickedElem = null; | |
function triggerOnLoad(event) { | |
//You can either set the popup using the pure html div id (recommended) | |
popup = AdfPage.PAGE.findComponentByAbsoluteId(document.getElementById('loaderId').nextSibling.id); | |
//or set the popup knowing the full id of your popup for example : | |
//popup = AdfPage.PAGE.findComponentByAbsoluteId('p1:processingP'); | |
//popup = AdfPage.PAGE.findComponent('processingP'); | |
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ubuntu@ip-YourComputer:~/FbJokeBot$ claudia update --configure-fb-bot | |
updating REST API apigateway.createResource parentId=parentId pathPart=facebook restApiId=0s7tsgupdating REST API apigateway.createResource parentId=parentId pathPart=telegram restApiId=0s7tsgupdating REST API apigateway.createResource parentId=parentId pathPart=groupme restApiId=0s7tsgrate-limited by AWS, waiting before retry apigateway.setAcceptHeader | |
Facebook Messenger setup | |
Following info is required for the setup, for more info check the documentation. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const botBuilder = require("claudia-bot-builder"); | |
const fbTemplate = botBuilder.fbTemplate; | |
//to install run 'npm i sync-request' in the project folder terminal | |
var request = require("sync-request"); | |
//to install run 'npm i keyword-extractor' in the project folder terminal | |
var keywordExtractor = require("keyword-extractor"); | |
//function to query the really nice icanhazdadjoke API for a joke | |
function getJoke(keyword) { |
OlderNewer