Wednesday, May 19, 2010
Integrated Weblogic Server Domain
I was developing an application on JDeveloper 11g and deploying it on intergrated weblogic server. In my application i was authenticating using my own authentication provider but when i configured it on weblogic, weblogic failed to start. I was not finding any configuration file where i can revert security settings of weblogic but after some try i found it and thought to share it with others. When you install JDeveloper on windows, it places configuration files under "C:\Documents and Settings\user_name\Application Data\JDeveloper". Here you can find all settings for jdeveloper and integrated weblogic. Under this directory there is a folder with something "system11.....". Now to change weblogic related settings, open "defaultDomain/config.xml" and change it accordingly.
Tuesday, December 29, 2009
Programmatically Navigating to another page in adf / jsf
Here is the sample code which can be used to programmatically navigating to another page in jsf or adf
FacesContext fctx = FacesContext.getCurrentInstance();
Application application = fctx.getApplication();
NavigationHandler navHandler = application.getNavigationHandler();
navHandler.handleNavigation(fctx,null, "name of navigation case");
FacesContext fctx = FacesContext.getCurrentInstance();
Application application = fctx.getApplication();
NavigationHandler navHandler = application.getNavigationHandler();
navHandler.handleNavigation(fctx,null, "name of navigation case");
Doing some work before showing Popup in ADF
Here is the way to do any processing before calling popup. First of all create a method in backing bean and assign this to action of "commandButton" or "commandLink". Sample signature for you method is as follows:
public void myMethod()
{
/**
* Place your processing logic here and then call showPoup method
**/
showPopup(popupId);
}
Signature of showPopup is:
public static void showPopup(String popupId)
{
FacesContext context = FacesContext.getCurrentInstance();
ExtendedRenderKitService extRenderKitSrvc =
Service.getRenderKitService(context, ExtendedRenderKitService.class);
extRenderKitSrvc.addScript(context,
"AdfPage.PAGE.findComponent('" + popupId + "').show();");
}
public void myMethod()
{
/**
* Place your processing logic here and then call showPoup method
**/
showPopup(popupId);
}
Signature of showPopup is:
public static void showPopup(String popupId)
{
FacesContext context = FacesContext.getCurrentInstance();
ExtendedRenderKitService extRenderKitSrvc =
Service.getRenderKitService(context, ExtendedRenderKitService.class);
extRenderKitSrvc.addScript(context,
"AdfPage.PAGE.findComponent('" + popupId + "').show();");
}
Friday, December 25, 2009
JSF Life cycle Tip # 1
Usually people think that by setting the attribute "immediate" true, bypasses the validation life cycle but this is not true in every case. If you talk about CommandButton and CommandLink, then its true and after "Apply Request Values" phase, request processing cycle shifts to "Render Response" phase thus skipping "Process Validation","Update Model Values", and "Invoke Application". ActionListener and action method associcated with CommandButton / CommandLink is executed in "Apply Request Values".
When we talk about editableValueHolder like InputText, and other controls, setting immediate "true" does not bypass the validation or other phases. Infact it just prioritize the control for validation e.g. if you want to validate one input control first than others, then you can set "immediate" for that control to "true".
When we talk about editableValueHolder like InputText, and other controls, setting immediate "true" does not bypass the validation or other phases. Infact it just prioritize the control for validation e.g. if you want to validate one input control first than others, then you can set "immediate" for that control to "true".
Labels:
commandbutton,
immediate,
inputtext,
jsf,
lifecycle
Wednesday, October 28, 2009
Pros and Cons of JDeveloper 11g and ADF from begginers Point of View
I have started to use JDeveloper 11g and ADF for one of my enterprise level project. I didn't use any part of ADF before. Its now one month and i want to share with world what i found in ADF with JDeveloper 11g.
Pros:
- It is based on MVC pattern and cleanly separates your business logic from presentation layer.
- It has built in support for AJAX
- Very rapid development because most of the development one can do declaratively by just drag and drop components on pages and like that
- Most important and exciting feature from me was very good support of LOV. LOV is required in almost every business application and with ADF i don't have to do any code for LOV just a query and some very small configurations and that's it.
- Rich Tables supporting LOV, combo box and others.
- It provides good hooks to develop own framework or utility classes to suit development e.g. I want to extend all entities from my own class and i can do it very easily.
- One of the unique feature of ADF 11g is ADF Task flow which faciliates developer to define reusable navigation and avoid cluttering of all navigation rules in one file which happens in JSF
Cons
Now we discuss cons of ADF and JDeveloper 11g
- JDeveloper is buggy and crashes many times espeically when one does refactoring or deleting some resources
- You will have to spend good time to learn ADF if you didn't have prior experience with Oracle technologies
- Query component in ADF Faces which is used to build criteria does not have option to change the layout of fields like grouping etc.
- LOV which are generated are also buggy. I am still facing one problem and no one still gave me solution for that.
- You will have to do lot of hit and trials to understand the behaviour of layout components
Pros:
- It is based on MVC pattern and cleanly separates your business logic from presentation layer.
- It has built in support for AJAX
- Very rapid development because most of the development one can do declaratively by just drag and drop components on pages and like that
- Most important and exciting feature from me was very good support of LOV. LOV is required in almost every business application and with ADF i don't have to do any code for LOV just a query and some very small configurations and that's it.
- Rich Tables supporting LOV, combo box and others.
- It provides good hooks to develop own framework or utility classes to suit development e.g. I want to extend all entities from my own class and i can do it very easily.
- One of the unique feature of ADF 11g is ADF Task flow which faciliates developer to define reusable navigation and avoid cluttering of all navigation rules in one file which happens in JSF
Cons
Now we discuss cons of ADF and JDeveloper 11g
- JDeveloper is buggy and crashes many times espeically when one does refactoring or deleting some resources
- You will have to spend good time to learn ADF if you didn't have prior experience with Oracle technologies
- Query component in ADF Faces which is used to build criteria does not have option to change the layout of fields like grouping etc.
- LOV which are generated are also buggy. I am still facing one problem and no one still gave me solution for that.
- You will have to do lot of hit and trials to understand the behaviour of layout components
Thursday, October 8, 2009
ADF Error timezone region not found
When i deploy/run adf applications, i receive error:
In order to solve this, right click on Model project and select Project properties. In "Run/Debug/Profile" select "Edit" in "Run Configurations" and add "-Duser.timezone=UTC" in JavaOptions. Repeat same steps for ViewController Project.
timezone region not found
In order to solve this, right click on Model project and select Project properties. In "Run/Debug/Profile" select "Edit" in "Run Configurations" and add "-Duser.timezone=UTC" in JavaOptions. Repeat same steps for ViewController Project.
Tuesday, October 6, 2009
JDeveloper11g Startup error
I installed JDeveloper11g Studio Edition with no JDK bundle but when i tried to start JDeveloper, it gave me error
In order to fix this type of error, go to installation_directoy\Middleware\JDeveloper\jdev\bin folder
and edit file jdev.conf.
Locate line "AddVMOption -XX:MaxPermSize=256M".
Now add another line just below this line:
Unable to start Java Virtual Machine located at ....
In order to fix this type of error, go to installation_directoy\Middleware\JDeveloper\jdev\bin folder
and edit file jdev.conf.
Locate line "AddVMOption -XX:MaxPermSize=256M".
Now add another line just below this line:
AddVMOption -Xmx256M
Subscribe to:
Posts (Atom)