Tuesday 10 May 2016

Handy code snippets - ADF

Here I am putting some handy backing bean code snippets which i got from other's blog(thank you for all of them) for my reference.

1. To remove selected row(highlighted row) in a table

        RowKeySet ps = <tableBinding>.getSelectedRowKeys();
        ps.clear();
        AdfFacesContext.getCurrentInstance().addPartialTarget(<tableBinding>);


Friday 6 May 2016

LOV selection issue in ADF - Key Attribute

I have faced small issue in LOV selection today.

Whenever you select value in LOV, always first value was selected. Even If you input valid value and tab out , first value was getting selected.

Solution: In my case reason is straightforward.

 I have created view accessors to have LOV for a attribute.

The source VO has only one attribute and I have not marked it as "Key Attribute" check box.

So, always make sure VO has primary key or mark the attribute to avoid issues like above.

Hope it helps!

Sunday 1 May 2016

Unauthorized access to server localhost 8080

Hi,

I have installed Tomcat 7 and when I try to connect to server using default port
http://localhost:8080
it was asking for user name and password.
Below is the screen shot

Then I realized is that issue is because of default port 8080. I have installed Oracle in the same machine and it was using 8080 port.

To overcome this issue, I changed default port for tomcat by following below steps

In the tomcat installed directory

navigate to "conf" folder -> Open "server.xml" file

Inside server.xml file try to find below statements

<Connector port="8080 protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />


change the default port to different no other than 8080

for Ex: here i have changed to 8181
<Connector port="8181" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />


and it works fine for me.