Posts

adf logging

https://www.youtube.com/watch?v=0ghJ3CUjI_Y

how to set upload size in you application

in the web.xml add /or modify UPLOAD_MAX_MEMORY and UPLOAD_MAX_DISK_SPACE  <context-param>         <!-- Maximum memory per request (in bytes) -->         <param-name>org.apache.myfaces.trinidad.UPLOAD_MAX_MEMORY</param-name>         <!-- Use 500K -->         <param-value>512000</param-value>     </context-param>     <context-param>         <!-- Maximum disk space per request (in bytes) -->         <param-name>org.apache.myfaces.trinidad.UPLOAD_MAX_DISK_SPACE</param-name>         <!-- Use 5,000K -->         <param-value>10240000</param-value>     </context-param>

Using JUnit testing with Jdeveloper 12.1.3

First You need to download the extension   http://download.oracle.com/otn-pub/jdeveloper/12.1.3.0.0/extensions/junit.zip

oracle.jbo.ExprSecurityException JBO-25150

Image
oracle.jbo.ExprSecurityException JDeveloper 12.1.3 and ADF has introduced a tightening security model for ADF BC Groovy expressions as a stepping stone for upcoming Oracle products. Oracle is progressively introducing this feature to reduce the burden on customers. For any new ADF application, customers must set via the property inspector trustMode="true" for any ADF BC attributes or similar using a Groovy expression. Otherwise at runtime JBO-25152 will be raised. For customers porting applications from previous releases of JDeveloper the trustMode will be set to true for existing Groovy expressions, though any new expressions still require developers explicitly set the trustMode.  follow these steps 1- Select the attribute of Entity or view object 2- click on Source tab to navigate to the XML source 3- change trustMode to be trusted

Using Enter key and space to commit data

 <af:clientListener type="keyUp" method="submitTempChanges"/>                                     <af:serverListener type="AddTempLine" method="#{investBean.addTempLineAction}"/>                                     <af:clientListener type="keyUp" method="sendByEnter"/>                                     <af:serverListener type="AddLineByKey" method="#{investBean.addLineByEnterKey}"/>                                     <af:clientListener method="(function(evt){evt.getSource().getPeer().getDomElement().setAttribute('spellcheck','true');})"                 ...

To Display a page or servlet output in a popup window

Suppose that the page name is view.jsp      import org.apache.myfaces.trinidad.render.ExtendedRenderKitService; import org.apache.myfaces.trinidad.util.Service;      FacesContext context = FacesContext.getCurrentInstance();             HttpServletRequest request = (HttpServletRequest) context.getExternalContext().getRequest();             String targetURL = request.getRequestURL().toString();             targetURL = targetURL.substring(0, targetURL.lastIndexOf("/") + 1) + "view.jsp";             System.out.println(targetURL);             ExtendedRenderKitService service = Service.getRenderKitService(context, ExtendedRenderKitService.class);             String script = "window.open('" + targetURL + "', '', 'location=0, status=0, resizable=1, scrollbars=0');";   ...

helpful code snippet for ADF mObile Application developer

1- To programmatically invoke/call a Taskflow A. Javascript : In JavaScript file, you can directly call this method to navigate. Below "Outcome" is control flow case name.    adf.mf.api.amx.doNavigation("outcome"); B. Java: AdfmfContainerUtilities.invokeContainerJavaScriptFunction(AdfmfJavaUtilities.getFeatureName(), "adf.mf.api.amx.doNavigation", new Object[] { "outcome" }); more details: http://deepakcs.blogspot.sg/2013/04/sync-device-back-button-with-adf-mobile.html https://community.oracle.com/thread/2496197