Don’t use managed bean , when you really don’t need it- Use Page Definition Variables in ADF

Requirement – to understand the concept of page variable for storing temporary page value.

Use Case- We have a check box and a table.on checking of checkbox we should show table otherwise we should not show the table.
Normally most of ADF developer will say– oh , its easy, they bind checkbox with managed bean and select the value of it and make visible true and false to table. But , in actual it impacts performance.You really don’t need a managed bean,Why you need to interact with model layer.You don’t need it.
You can create a page variable and store temporary page value.Most people don’t know about it or don’t know how to create it.Today we will discuss this.

i am assuming you have a HR schema and create a table and a checkbox.On checking of checkbox table should be visible.

Go to page definition file of page.Inside executable ,select variable and click insert inside variable like below

Now we will be creating binding for this variable.Click + on binding

Select attributValue and select variable as data source and attribute as Show Table, which we have created earlier.

Now our page defition file will look like this-

Select checkbox and bind value as #{bindings.ShowTable1.inputValue} and make autosubmit to true.
Go to table and put id of selectCheckbox to partial trigger of table.
Thats it .You have’nt used managed bean here. I think its more easy than this.Now run your page first it will look like this

Now Checked the checkbox

You are done.Now you know how to create page defition variable in page.Managed bean will not have less code.. šŸ˜€

Happy coding with Vinay Kumar in Techartifact ….

java.lang.OutOfMemory Java Heap Space error in JDeveloper

Quite annoying error and you don’t know what went wrong.

Well you can resolve by yourself.

First step – Search for ide.conf and jdev.conf in you JDeveloper installation folder like …/jdeveloper/ide/bin/ide.conf

Second step-In ide.conf file, copy extactly these properties into that.
AddVMOption -Xmx940M
AddVMOption -Xms128M

Third Step – In jdev.conf file, make sure the following properties are set exactly the same
AddVMOption -XX:MaxPermSize=356M

Fourth Step – Disable the SVN versioning system that is built into JDeveloper.Uncheck the checkbox for Subversion for example support for GIT

In JDeveloper -> Choose Versioning menu -> Choose Configure -> Uncheck ā€œVersioning support for Subversionā€

Happy learning with Vinay in Techartifact…..

ADF Popup ContentDelivery attribute – ADF Tips

In Adf application we normally used popup.We have one of the property and attribute of popup is contentDelivery .
ContentDelivery attribute of an af:popup component controls the popup initialization time and how does the data get refreshed within the popup. The default content delivery is lazy. This means the content of the popup is not delivered to the client until shown the first time

Good ADF developer should know , when to use what-

immediate — The popup component is added inline within the page when the page is loaded. It does not matter if you do or do not display it, the popup component will always be loaded.

ContentDelivery should be set to immediate if and only if you are absolutely sure that the popup will be invoked at least once. Otherwise you should use the other two values.

Example: If you use a logout logic that needs confirmation than the confirmation popup should be set to immediate.

lazy — The popup component will be loaded (and cached) only when is called for the first time. If you do not explicitly set the ContentDelivery attribute when creating the popup it will implicitly be set to lazy.

This value should be used when dealing with static information(that does not change): warning messages, information messages and so on.

lazyUncached — The popup component will be loaded(but not cached) only when is invoked for the first time; and every time the popup is called it will be reloaded.

This value should be used when dealing with dynamic data.