Thursday, 10 August 2017

Select Multiple values from LOV component (Choice List) on UI

There are scenarios where user wants to select multiple values from Input List of Values (LOV) component and store in DB column as comma separated or  any other delimiter.
In ADF using Jdeveloper we can achieve this functionality but we need to customize standard things.

follow the below steps to do this:

1) Create an VO and attach LOV to an attribute. (for ex. i created a TempVo and having three attibutes: ID,Dept & Description and attached LOV to Dept which store ID and show department name on UI)

2) Now to convert LOV that supports multiple value selection, we need to modify Vo.xml for tht attribute on which LOV is applied. Select the attribute on which you defined the Lov and then change the CONTROLTYPE value to 'delimited_ids_choice'.




3) Go to List binding tag in the same Vo.xml file and change as below:



4) Next step is to build UI. Drag and drop the view from Data control on to page and modify the LOV attribute code in source file as below:



5) Now go to page definition and select List Binding and change as below (if there is no List Binding on page then create ot manually or add the code manually )


That's all run the page and select multiple value from LOV and store in DB.



Monday, 3 July 2017

Groovy script Issues while writing sequence expression in Jdev 12.2.1.2.0


In Jdeveloper 12.2.1.2 There are no inline Groovy expressions anymore. Expressions are saved in separate Groovy language file, external code source (All new expressions are created in separate *.bcs file). Each EO/VO will be assigned with separate file to keep Groovy expressions. This improves Groovy script maintenance (easier to check all Groovy expressions from EO/VO located in one file), also it improves runtime performance (as JDeveloper ADF code audit rule suggests). 

When you are writing sequence groovy for one of thre attribute in VO and while testing through AppModule If there is an error something like below:

Error(10,1): [Static type checking] - [ADF security error] Calling the constructor for class oracle.jbo.server.SequenceImpl is not permitted.

 One approach to fix this issue is :

-> Goto respective VO, open the Souce Code
-> check for TrustMode property
-> set this to "trusted" instead of "untrusted".


Change to trusted mode.



Wednesday, 5 April 2017

Deployment of ADF application to Weblogic server - Step by step

Steps for Deploying ADF Application to WebLogic Server12c:

1) First of all generate EAR file for ADF application from Jdeveloper as following:
           Go to  Application tab on Jdeveloper and select Deploy option then new dialog box will open, there we need to select "Deploy to EAR " option then click on next and finish.



2) Once EAR file is ready, then login into WebLogic console and follow the steps as below to deploy application on server.

click on "Deployments"

Click on "install" (if Install button is not Enable then click on Lock and Edit button on Top-left side of  WebLogic UI) an then click on upload file link and select the EAR file and follow the navigation as it is.







If you want to specify your Application name you can do on this step.then click on Finish button.


Click on Activate changes button then select "Control" tab on UI and select your application and click on"servicing all requests".





Once Start is done, Status of deployment will change to 'Active'. That's All about dpeloyment of ADF application to WebLogic server12c...!!! 

Tuesday, 4 April 2017

Calling AmImpl Method from Managed Bean in ADF

To Call AmImpl Method from Managed bean use the following steps;

1) Create the Method in AmImpl class and Expose created method to Client interface by selecting Java tab from AppModule and click on client interface edit icon and move the method into client interface.








2) Write below code in your managed bean class to invoke method from AmImpl.

        OperationBinding ob = getBindings().getOperationBinding("submitEmp");
       ob.getParamsMap().put("<ParameterName>", <Value>); //set the input parameter if there is any else skip this step
        ob.execute();

Note: Make sure you have added same method in binding section of Jsf page (Page where you are referring above method to invoke)

Monday, 27 March 2017

Jdev 12.1.3.0 Working with Export Collection Action Listener



Couple of days before i was working with Export Collection Action Listener component in Jdev 12.1.3 and face very weird issue which i am sharing with you as below, hope this may help you.


Problem :

One of the UI page in my application is having table under panel Collection layout and i added Export Collection Action Listener component on this table, Exporting data was working fine when i tested my application in integrated Weblogic server but when i deploy my application to stand alone WLS (Client server) Export button was throwing error says "Export is incomplete due to error". I tried all possible solution but only one worked successfully.

Solution:

for some of  the columns in table i set visible property to false and there was a field having LOV attached to it which was set visible to false, i changed this column's Visible property to true and tried to export and it worked fine. Its Strange but worked !!

Select Multiple values from LOV component (Choice List) on UI

There are scenarios where user wants to select multiple values from Input List of Values (LOV) component and store in DB column as comma se...