
Using java beans in your forms is very usefull action to increase your application performance , functionality , and interface attraction .
fore example
1- a java bean that restrict the input of text item to number will decrease network traffic if the user enter character.
2- a java bean that customize the shape of forms buttons will make your interface more attractive
3- a java bean that read client machine information , increase your forms functinality
in this post we will explain a java bean that can read client machine information ( webutil can do this also ) and pass it to the form
- consider that you want to know which Ip address currenty use this form
first step is to make the deployment steps of using java bean
1- pur the jar file in your java path
2- edit Archive_jinit parameter in your formsweb.cfg in your section to add this jar name
3- create a bean area in your forms
4- set the implementation class property of your bean item to
oracle.forms.fd.ClientInfos ( case sensitive)
5- write your code to get the information you want as follow :
- to get the Ip address and pass it to bind variable
:your bind variable:= Get_Custom_Property('your bean item', 1, 'IP' ) ;
- to get the operating system
:your bind variable : =get_custom_property('your bean item',1,'operating');
- to get the operating system user name
:your bind variable : =get_custome_property('your bean item',1,'username');
very important note :
-- if you want to get this information in "when new form instance "
you have to write your code in " when timer expired " to ensure that the form interface included the bean area is built
you can download the jar file from http://sheikyerbouti.developpez.com/forms-pjc-bean/menu/
No comments:
Post a Comment