Tuesday 22 November 2016

Method call on page Load in ADF -

Hi All ,Today i'll show how we can call a method before page load in adf.

I have an requirement After registration I have to send a Activation Url to User's Account.
Once User will click on url he will land into login page and init method will load before login Page.

Step1- Once user registered will get the url like below below screen shot.



Step2- once user will click on url he will land to login page,before landing to login page init() method will call below is the method in login bean class.

    @PostConstruct
       public void init() {
            AdfFacesContext adfCtx = AdfFacesContext.getCurrentInstance();
            Map vmap = adfCtx.getViewScope();
       
            loginId = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("loginId");
            if(loginId != null && vmap.get("loginId") == null ) {
                vmap.put("loginId", loginId);
                userAction = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("ulmsg");
             
                    DCBindingContainer dbc = (DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry();
                    OperationBinding op = dbc.getOperationBinding("userLoginMsg");
                    op.getParamsMap().put("loginId", loginId);
                    op.getParamsMap().put("type", userAction);
                    vmap.put("wmsg", op.execute());
            }
         
        }
this method gets the id and ulmsg from the request parameter.

  please make a note that java EE @PostConstruct bean is called once for each bean instantiation. In the managed bean case, the bean is instantiated once per application or session and so is the method executed once. 

Step3- After loading the method login page will appear like below screen shot.



Step4- Once User will success logged in he/she will redirect to payment page,below is the screen shot.



so if any body need to load method before loading the page he/she can use @PostConstruct or use the phase listener in the page like.


<f:view beforePhase="#{ManagedBean.onBeforePhase}">
implements PagePhaseListener and override two method.
public void beforePhase(PagePhaseEvent pagePhaseEvent) {
// write your code which needs to load before page load
}
public void afterPhase(PagePhaseEvent pagePhaseEvent) {
}
Thanks to here me :)

Sunday 16 October 2016

Git Installation Documents

Hi Guys today I'll provide you a document related to GIT installation and basics.
you can follow the documents and install the GIT in your system.

Git Installation


Thanks Guys enjoy :)

java.sql.SQLException, msg=ORA-01882: timezone region not found

Solution of msg=ORA-01882: timezone region not found Error in ADF -

Hi Guys, today I got a different error while running my application.
here I am sharing the fixes of that particular error.

Error -
WARNING: ADF: Adding the following JSF error message: ORA-01882: timezone region not found

java.sql.SQLDataException: ORA-01882: timezone region not found.

Solutions- you resolve the Error by setting the timezone vale in your project properties.
Solution1 - 1) on Windows you MUST change to timezone (control panel | time&date) to something. And the change it to your timezone.
2) removed the -Duser.timezone from setDomainEnv.bat
3) Restart all Server in the domain.

Solution2- 1). Open the ViewController package

2). Under this, open WEB-INF/web.xml

3). The web.xml file gets opened. Go to 'Overview' tab --> Application

4). Go to the section 'Locale Encoding Mapping'

5). Click the "+" symbol

6). For 'Locale', enter some value like 'en_US' and for encoding, enter 'Cp1252'

7). Save, stop the weblogic server instance and run the file. And Done.

Solution3- In my case i am able to solve the issue by changing the java option in project property.

1. Go To View controller > Project Properties then 

2. (Project Properties) open select Run/Debug/Profile > in right you will see Default > click on Edit icon
3. (Edit run configuration) select Launch Settings > in 'Java option' text item past this line -Duser.timezone="+06:00" 
4.close and re-open JDeveloper 
5. Run entire project

After changes down the server and run again.
you will not find this error again.

Thanks guys :)


Monday 11 July 2016


Assessment Report Overview

Hi Guys today I am sharing one of the Assessment report Video which will give you functional overview of EBS Upgrade Assessment Report idea, For technical and coding view I'll share second part of this video.




 


Thanks Guys :)

Monday 4 July 2016

GIT Basics and Documents

Hi Guys,
Today i am sharing some Git tortoise basics documents by following this documents you can install the GIT and connect with cloud.

Git Installation

Download the docs and enjoy :)


Progress Indicator bar on Button -

Guys Some time We are facing issues to run Progress Indicator.

when we are doing any action our response in displaying at the same time so we need to use Progress bar to show information to the user.

Today I'll explain how to user progress Indicator on Button.

Step1- I have a Page where I am running some program on basis of Procedure call.





Step2- Once you'll click on runProgram one procedure will call and Progress indicator will show.




Step3- once procedure will run successfully it'll give a success message.





So the code which we have to add is given below -

you need to create a page and on button you need to call a clientListener.

<af:clientListener type="action" method="longRunningTask"/>

After that we need to add Dialog Popup and JavaScript code like below -

<af:popup childCreation="deferred" autoCancel="disabled" id="longRunningPopup"                          contentDelivery="immediate">
                <af:dialog id="dialog1" closeIconVisible="false" type="none" title="Loading Please Wait..."
                           inlineStyle="width:200px; text-align:center;">
                    
                </af:dialog>
            </af:popup>

            <af:resource type="javascript">
            
                            function longRunningTask(evt) {
                            var popup = AdfPage.PAGE.findComponentByAbsoluteId('longRunningPopup');
                            if (popup != null) {
                                AdfPage.PAGE.addBusyStateListener(popup, busyStateListener);
                                evt.preventUserInput();
                            }
                        }

                    function busyStateListener(evt) {
                        var popup = AdfPage.PAGE.findComponentByAbsoluteId('longRunningPopup');
                        if (popup != null) {
                            if (evt.isBusy()) {
                                popup.show();
                            }
                            else if (popup.isPopupVisible()) {
                                popup.hide();
                                AdfPage.PAGE.removeBusyStateListener(popup, busyStateListener);
                            }
                        }
                    }

            </af:resource>

That's it.
After adding this code you can able to see the progress Indicator on particular page.




Thanks Guys :)


ADF 11g Patch for IE11

Solution for adf 11g application issues on IE11 -

Guys Some time We are facing issues to run the ADF 11g application on IE11.
Here I am sharing one solution for adf 11g application running on IE11.

We need to apply the 18277370 patch to jdev.
below are the steps -
S1). download the patch.
S1). unzip to C:\bp1_Patch folder.
S2). Open the cmd and run the below command for windows -
set MW_HOME=C:\Oracle\Middleware
set ORACLE_HOME=C:\Oracle\Middleware\Oracle_Home
set PATH=$PATH:%HOME%\bin;%ORACLE_HOME%\bin;%ORACLE_HOME%\OPatch



S3). Open opatch lsinventory and list all the opatches which are there on your jdev if it was old                 installation otherwise no need to do listing.
S4). Close all the server and jdev ide before applying the patch.
S5). Run opatch apply in cmd.



S6). Press y once cmd is looking for y/n

Wait and after some time OPatch succeeded message will appear in cmd.
Imp - remove weblogic server cache and IE 11 Cache.

After Apply Patch, Running ADF Application you'll not get any unsupported message.

Thanks guys :)

Eclipse With Python

Hi Guys, Today i'll share how to start python project in eclipse IDE. to start Py development in eclipse we need to add Py Dev plugi...