Posts

Showing posts from 2015

DVT problems in Jdeveloper 12.1.3

Image
Hi, In 12.1.3 when you drag and drop a view object as a graph, the bindings created are not a type graph anymore, they are a normal tree, which raises the following question; how do you access again the wizard for the graph in case you want to change something on it or even further; how would you now implement a drill down graph? I wrote a post for the previous release which seems to be not applicable for this new realease. Am I missing something? Regards. The fact that the new Charts now use a standard tree binding instead of a custom Graph binding allows for more flexible tag structure and usage of stamping. For example, to achieve the feature where each bar is colored differently even though they all belong to the first series, we recommend to use attribute groups to specify that the bars should be colored by group. To to this, you would insert the following code into the <dvt:chartDataItem> tag, instead of swapping the series and group bindings: <dvt:a

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');})"                                                        type="focus"/>                                 </af:richTextEditor>                                 <af:resource type="javascript">                                   function submitTempChanges(event) {                    

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');";             service.addScript(FacesContext.getCurrentInstance(), script);

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

how to install ios sdk on windows

You cannot install ios sdk on windows,however, there is a work around.You have to install MAC OS on a virtual machine. I find this link very usefull http://maconwindows.blogspot.com/

How to evaluate EL in adf mobile

Getting or setting the value form inputtext AdfELContext adfELContext = AdfmfJavaUtilities.getAdfELContext(); ValueExpression ve =AdfmfJavaUtilities.getValueExpression("#{bindings.EmpName.inputValue}", String.class); ve.setValue(adfELContext, "Wim");

How to Create a Simple JMS Queue in Weblogic Server

Image
This example shows the steps to create a simple JMS queue in WebLogic Server 12c 1- Create a JMS Server Services > Messaging > JMS Servers Select  New Name:  TestJMSServer Persistent Store: (none) Target:  soa_server1   (or choose an available server) Finish The JMS server should now be visible in the list with Health OK. 2- Create a JMS Module Services > Messaging > JMS Modules Select  TestJMSModule Select the  Subdeployments   tab and  New Subdeployment Name:  TestSubdeployment Press  Next Here you can select the target(s) for the subdeployment. You can choose either Servers (i.e. WebLogic managed servers, such as the soa_server1) or JMS Servers such as the JMS Server created earlier. As the purpose of our subdeployment in this example is to target a specific JMS server, we will choose the JMS Server option. Select the  TestJMSServer  created earlier Press  Finish 3- Create a Connection Factory Services > Messaging > JMS Mod

jre java applet in not running on Chrome

Image
Due to an update of google chrome,my java applet which runs on jre 7,has beed stopped. Chrome requires you to upgrade to jre 8.But this is not  desirable . So to force chrome to run on jre 7,do the following 1- copy this url and paste it in the chrome address bar chrome://flags/#enable-npapi for more info  https://java.com/en/download/faq/chrome.xml

Configuring ADF Security-Creating Users and roles at runtime on Weblogic server

Image
Before beginning working on ADF Security, it is required to explicitly add these three libraries To add them Just Double click on the ViewController project,Libraries and classpath ,Add Jar /Directory The location of the first two libraries is C:\Oracle\Middleware\Oracle_Home\wlserver\modules The location of the last one"wls-api.jar" is C:\Oracle\Middleware\Oracle_Home\wlserver\server\lib First ,we will start implementing login method.Create a managed bean"loginBean" private void authenticateUser(String un, String pw) { byte[] password = pw.getBytes(); FacesContext fctx = FacesContext.getCurrentInstance(); HttpServletRequest request = null; request = (HttpServletRequest) fctx.getExternalContext().getRequest(); try { Subject subject = Authentication.login(new URLCallbackHandler(un, password)); weblogic.servlet.security.ServletAuthentication.runAs(subject, request); String log

Looping over iterator in backing bean

        DCIteratorBinding itr = ADFUtils.findIterator("InvestigationsRoIterator");         Row[] rows = itr.getAllRowsInRange();         for (Row row : rows){             if (row != null) {              --do the logic             }               }

كيفية التعرف عل حالة السجل Record Status

السلام عليكم كان موجود فى الفورم  system variable   اسمه  :system. record _status و كان ممكن تستخدمة للتعرف على حالة السجل   new – modified    و اكيد التعرف على حالة السجل هيفيدك كتير فى ال  adf   كمان ممكن تعمل حاجة ذى دى لكن مش بالبساطة الموجودة فى الفورمز و ذلك لان الدنيا فى ال  adf   مفصولة عن بعضها مش كلها فى  layer   واحد ذى الفورم فى المثال التالي هنعرف ازاى نعمل  method   ترجعلك حالة السجل و ازاى نستخدمها فى الصفحة 1-      In the model project , go to the view object and click on java tab and generate the following java classes ·          View object class “ViewImpl” ·          View Row class “View row impl” كما بالشكل بالشكل المرفق رقم 1 لاحظ انا عملت generate  لل view row class  لان الكلاس دى هى اللى بتمثلي السجل اللى انا هتعرف على حالته اما الview object class  فهى الكلاس اللى هكتب فيها الميثود كما بالشكل 2-      In the view object class write this methods public String getRow Status ( Row row ) { EduTranDetailsVORowImpl rwImpl = (

Debugging ADF Apllication

Image
How to Enable ADF Business Components Debug Diagnostics open the Run/Debug/Profile page in the Project Properties dialog for your data model project. Click  Edit  to edit the chosen run configuration, and add following string to the  Java Options  field in the page. -Djbo.debugoutput=console Example: Diagnostic Output of Business Component Browser : [355] Oracle SQLBuilder: Registered driver: oracle.jdbc.OracleDriver [356] Creating a new pool resource [357] **** DBTransactionImpl establishNewConnection [358] Successfully logged in [359] JDBCDriverVersion: 11.1.0.7.0-Production [360] DatabaseProductName: Oracle [361] DBTransactionImpl initTransaction [362] Replacing: null with: StoreServiceAM_AddressesPageDef [363] Replacing: null with: StoreServiceAM_MostPopularProductsByCategoriesPageDef ... [537] Orders ViewRowSetImpl.execute caused params to be "un"changed [538] Column count: 41 [539] ViewObject: Orders Created new QUERY statement [540] Orders>#q computed