Skip to main content

Posts

Showing posts with the label adf

JMeter : Jdeveloper 11.1.1.9 sample

So I am playing with jmeter again and I found it a little tricky to setup in my environment so I attached my simple setup sample in hopes it may help someone. My ADF JMeter sample Note: The recording of test traffic in jmeter helped me a LOT. (Test script recorder https://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf )   Thanks to my References:  https://blogs.oracle.com/onesizedoesntfitall/entry/new_recording_on_using_jmeter http://soadev.blogspot.com/2014/04/jmeter-load-test-oracle-adf-applications.html https://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf

ADF : getSelectedRowKeys only returning one row

Remove the attribute selectedRowKeys off the af:table selectedRowKeys="#{bindings.AccountList.collectionModel.selectedRow}"  <af:table value="#{bindings.AccountList.collectionModel}" var="row"                   rowBandingInterval="1" contentDelivery="immediate"                   filterVisible="true" varStatus="vs"                   selectedRowKeys="#{bindings.AccountList.collectionModel.selectedRow}"                   selectionListener="#{bindings.AccountList.collectionModel.makeCurrent}"                   rowSelection="multiple" id="t1" columnSelection="single"                   queryListener="#{bindings.AccountListQuery.processQuery}"                   .....

ADF: postChanges delete parent and children in the same transaction programmatically

I was doing a simple mater details delete with some code and no matter what I did the parent delete got called before the child, then I remembered post changes (this.getDBTransaction().postChanges();) and called it after deleting the children. And that is how postChanges saved my life. Code for fun...         Key key = new Key(new Object[] { objectId });         Row[] rows = getParentVO().findByKey(key, 1);         if (rows != null && rows.length > 0) {             ParentVORowImpl parent = (ParentVORowImpl) rows[0];             RowIterator rowIterator = parent.getChildVO();             removeRows(rowIterator);             this.getDBTransaction().postChanges();             parent.remove();             this.getDBTransaction...

ADF: PS5 to PS6 upgrade which turned into a PS7 11.1.1.8 webcenter and 11.1.1.7 adf upgrade

First thing I noticed is that clicking a link on a tab or menu disabled the link, had to style my tabs for this as the tab would vanish while loading - af|panelTabbed::header af|panelTabbed::tab:disabled af|panelTabbed::tab-start { background-image: url("/skins/images/my_tab_start_d.png"); } af|panelTabbed::header af|panelTabbed::tab:disabled af|panelTabbed::tab-content { background-image: url("/skins/images/my_tab_mid_d.png"); } af|panelTabbed::header af|panelTabbed::tab:disabled af|panelTabbed::tab-end { background-image: url("/skins/images/my_tab_end_d.png"); } The other problem was with some really old code that had only transient attributes in a vo - after 5 minutes on a screen and reclicking we would get a null pointer exception. Fixed this by marking passivate transient objects on the vo and cleaning up some old code. Also had a few navigation with web center menu errors. Skyros upgrade will take a lot of work to integrate with our s...

Web Center: using a custom security provider other than LDAP [custom identity store]

So far everything looks like it will work I am just using the default auth provider and UCM is picking up my groups on login so now to integrate with Web center and use my custom auth provider. Custom authentication provider is done and I can log in to my content server and application and everything is working. The snag is not of the webcenter custom profile pictures and webcenter goodies are working (it uses the JpsContextFactory etc and that ignores my provider and looks up the default weblogic provider and tries to use that). I have replaced the identity store with a custom database implementation and everything seems to work [after a LOT of debugging]. Ok so step 1) The custom authentication provider - tons od documentation on how to do this eg:  http://docs.oracle.com/cd/E12890_01/ales/docs32/dvspisec/progrmng.html ,  http://docs.oracle.com/cd/E13222_01/wls/docs81/dvspisec/atn.html  so I am not going to rehash this if you want I can post some code but it shoul...

Automated remote deployment of Webcenter ear to our development enviroment

All the usual undeploy / stop start code worked remotely but unfortunately the deploy was not going as planned - I wanted to set the MDS info on deployment so it was time for a new plan. So this time on our build server would call WLST to deploy our web center app on the development weblogic enviroment. Wlst commands I used: Connect   connect('weblogic','bobsentme', ''t3://remote.wl:7001') Stop   shutdown('ManagedServer1', force='true') Start   start(start('WC_Cluster', 'Cluster', 't3://remote.wl:7001')); Deploy archive = getMDSArchiveConfig(fromLocation='/tmp/pathto.ear') archive.setAppMetadataRepository(repository='mds-CustomDS', partition='dev_partition', type='DB', jndi='jdbc/mds/CustomDS')"); archive.save() deploy(appName='OurAppName', path='/tmp/pathto.ear', targets='WC_Cluster', stageMode='stage',   upload=...

ADF: Upgrade issues from 11.1.1.4 to 11.1.1.6

Firs thing I encountered was that our menu was not refreshing as it had been : as soon as we clicked on the custom menu the normal menu would no longer refresh. This is the code that was causing the problem:   So once we had done a code RichTreeTable.setValue on the tree the EL item would no longer be executed after this point. Makes sense so I just removed the setValue and perform everything through EL.

Jdeveloper 11.1.1.6 upgrade integrated server to 10.3.6

NOTE: This may break some stuff so backup before you proceed so you have been warned Prerequisites: Install JDev 11.1.1.6 Run integrated weblogic. Now install just weblogic 10.3.6 I used the generic installer. java  -jar -D64 -Xmx1024M wls1036_generic.jar Next > Select Create new MiddlewareHome and enter a value > Next > Typical > Next Now select your JDK and click Next * 3 Run QuickStart Click Next Select 9.0 or Higher Click Next Find your integrated domain  [usually under C:\Users\[username]\AppData\Roaming\JDeveloper\system11.1.1.6.38.62.29\DefaultDomain] NOTE: On windows I had to make this folder ! read only but this is not recommended. If you don't want to do this Install your integrated server in a different location Click Next. Once the Installer has finished backup setDomainEnv.cmd then copy setDomainEnv.cmd.back to setDomainEnv.cmd and edit the line: set WL_HOME=... and make it set WL_HOME=C:\Dev\Oracle\Weblogic_10.3....

ADF : Some solution to various UI related problems

11.1.1.5 So here is my handy list to myself of things to check if you are getting weird problems with things that should work (buttons not work, or drop downs misbehaving): Mark you table as contentDelivery="immediate" Remove partialSubmit="true" from some buttons Remove immediate="true" from buttons Use af:forEach instead of af:iterator.

ADF: SelectOneChoice ForEach, Filter - Drop down list keeping the first size selected

Ok so I had a bunch of filters all rendered from a backing bean using the forEach tag to render the select items. On updating the table the filters would always have the size of the initially selected item - not good. So if you fist selection had one item in the filter the filter would always be one item big. SOLUTION: Changed from a forEach to a f:SelectItems creating the Select items in my backing bean - everything worked. Nice and simple.     public List<SelectItem> listUniqueSelectItemList(List<String> items) {         List<SelectItem> itemList = new ArrayList<SelectItem>();         if (items != null) {             for (String item : items) {                 itemList.add(createSelectItem(item));             }         }         return itemL...

ADF : task flow replace whole page not current region

Ok so this is one way to break out of the region you are in and replace a parent or root region. So in your child task flow instead of calling a task flow directly using a control flow case just point your control flow case to a Parent Action (get it from the component panel). There you can specify an outcome in a parent task flow. Job done.

Web Center ADF : What a dirty little problem MDS override customizations

I have a customizable table where you can save sort orders to the database (custom not mds driven - don't ask why - you don't want to know). So everything works for me locally but upon deployment to Web Center once you have moved one column everything has that column order in the table no matter what until you close the browser and re login. Not I have no MDS configured on my local box. Turns out someone turned mds config on in my project properties thus rendering my custom ordering view useless because MDS would override my changes - so I turned MDS off in this project because I dont need it. I am not sure what you would do if you needed it on would need to customize it a bit I guess - not easy. PAIN in the arse to figure this one out. O yhea and dont think just clicking the MDS to off will remove your problem check the adf-config.xml to check if any elements have been hard set to persist.

ADF: Testing iterator settings Pojo Data Controls

Jdev 11.1.1.5 I was doing some investigation into the inner workings and some of the more useful properties on the iterator bindings in the page definition xml files to to satisfy my curiosity. So here are some findings I have to go into much more details than this but this should help someone. I had a basic page with one iterator (driving a select one choice) two buttons one with an action one with an action listener and a child iterator driving a table. I use any number of Refresh parameters on my page (always, deferred, ifNeeded) etc and the method bound was only called once on pressing any button or autoSubmit - all good. I the set the CacheResults parameter to false this lead to my method being called a number of times and some weird but expected behaviour still good. Now I changed to a methodIterator from a accessorIterator with one parameter and returned null  from the data control. The method was now called a number of times with a null parameter not g...

ADF Table dependant list select one choice : Thing I learned being stupid final

It ended up the source of all my problems was an invalid long to string conversion while rendering my select items. So if you are having endless hassles with a dependent select box in a table try this when you are rendering the lists to make sure you are not rendering a string and matching on long or int:     public List convertItem(List dataItems) {         ArrayList covertedList = new ArrayList ();         if (dataItems != null) {             for (Site dataItem : dataItems) {                 SelectItem item = new SelectItem(new String(dataItem.getId()), dataItem.getDescription());                 covertedList.add(item);             }  ...

ADF Dependant select items in a table: Things I learned being stupid

Hard hard thing to do - table of dependant select items that you can add new rows to. (backing bean driven) (When you add a new row it keeps values from the previous row) In my search for the answer I made an forEach act like a table - by using the f:attribute to pass through the current row - crazy but I hopw this helps someone sometime. Stuff I learned             <af:selectOneChoice label="#{labelBundle['choice_lbl']}"                                 id="soc1" value="#{row.choiceId}"                                 valueChangeListener="#{pageFlowScope.testBean.choiceValueChange}"                                 required="true"                     ...

ADF Defaulting a backing bean driven select: Thing I learned being stupid 1

Jdeveloper 11.1.1.5 Ok, I had a selectonechoice that was driven by a pojo data control and I just couldn't get its value defaulted. The following is what I learned along the way and my unique solution: Drag and drop the item onto the page as a single choice selectonechoice: Add a variable to your page binding (open your page and click on the bindings tab - right click on variables under Executables - insert inside variables - select variable - Name:selectedItemValue Type: java.lang.Object Then click on Page definition file and update the variable you just added and add these attributes DefaultValue=" #{pageFlowScope.TestBean.id} " IsUpdateable="2". NOTE: the bold bit  pageFlowScope.TestBean.id must be the value you want to default to. Or you can just paste the xml like such: <variable Type="java.lang.Integer" Name="selectedItemValue" DefaultValue="#{pageFlowScope.TestBean.id}" IsUpdateable="2" /> ...

Using Soap UI to test services

I needed to test a screen that was backed by services and it was suggested that I use soapUI. I haven't used soapUI for a while now and was surprised to see mock service functionality. Mock Service ( http://www.soapui.org/Service-Mocking/concept.html ) So first take the wsdl you have and generate a mock service using soap ui. Create a new project: File Menu > Create new soapUI project. Select the wsdl you will be working with. Right click on the new Binding and select Generate MockService Press ok twice. Right click on the new Mock and select Start minimized. Ok I like using the Query Match functionality it just works for my brain: You can create as many mock responses as you like and edit the xml response as you wish. You the add Query matches for each of your responses based on data passed in. The xpath bit is the matching rules The expected value is the value to match on in the incoming message Last dropdown is the response you choose to retur...

ADF : Pojo Data Control : structure definition does not have a primary key attribute

I had a minor difficulty with creating a POJO data control today. The create data control failed with the following error: structure definition does not have a primary key attribute Fixed the package problem (DC java file resided in a package different from what was specified in the package section inside the java class) Not a very clear error indeed, note to self don't make stupid errors.

ADF: debugging taskflows

I was having huge hassles with my task flow rerouting to themselves. I am using routers and pageflow scope varibles across bounded task flows. Mainly failed on task flow return items that went by default to a router. This post saved my bacon : http://biemond.blogspot.com/2008/10/debugging-task-flow-in-jdeveloper-11g.html Before and after listeners in your task-flow-call are also helpful for debugging: <before-listener>#{viewScope.chargeOutsEditBean.afterListener}</before-listener> <after-listener>#{viewScope.chargeOutsEditBean.afterListener}</after-listener>   public String beforeListener() {     System.out.println("beforeListener() {");     System.out.println("--------------------------->route Before:" + ADFContext.getCurrent().getPageFlowScope().get("route"));     return "blist";   }   public String afterListener() {     System.out.println("afterListener() {");   ...