Importing java beans
i have just created a java bean item but i need to set the implementation class in the property palette.how can i do this?i have copied the colorpicker.jar file into the codebase and have set this value in my formsweb.cfg file : # Forms applet archive setting for JInitiator
archive_jini=frmall_jinit.jar,iconic.jar,colorpicker.jar
what should i enter into as the property palette value for implementation class,is it the just the name of the class?
i need help pls.
Thanks.
Hello,
This is not the easyest sample you could find, because the colorpicker does not extends VBean and have no get/set public classes, so you cannot use the Implementation Class property for this one.
You need to use the FBean package to handle it.
-- register the bean in a When-New-Form-Instance trigger:
FBean.Register_Bean('block.bean',1,'oracle.forms.demos.beans.ColorPicker'); Then call the function to get the color:
vcColor VARCHAR2(11);
vcColor := FBean.Invoke_char('block.bean',1,'showColorPicker','"Select a colour"');Francois
Similar Messages
-
Importing Java Bean Model in Webdynpro Development Component
Hi All,
Is there any simple tutorial, example to import java bean model in webdynpro development component.
I am using NWDS 7.0 SP14 and WAS 7.0.
it really helps if you can provide simple EJB as a development component with details how to create a public part and using this bean as java bean model in Webdynpro development component.
what are the steps to be followed with precautions
Thanks in Advance,
MuraliHi,
[Using the Java Bean Model in Web Dynpro|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4072c0d0-c21e-2b10-ab84-e2c183d355de]
[Using EJBs in Web Dynpro|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e93a5c]
you will get more if you search in the forum.
more help on EJB's
Re: Help needed in EJB
http://help.sap.com/saphelp_nw70/helpdata/EN/19/f9bc3d8af79633e10000000a11405a/frameset.htm
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70929198-0d36-2b10-04b8-84d90fa3df9c
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e93a5c
PradeeP -
Import Java Bean model in Web dynpro DC
Hi all,
I have created the following DC's on a track:
1. EMPDic (Type: Dictionary) - DC that contains the database table.
2. EMPEjb (Type J2EE) - DC that contains the EJBs that have business logic. Created a public part EMPpp that containd the bean classes.
3. EMPEar (Type J2EE) - DC that contains the EMPEjb module.In Used Dcs added EMPpp
4. EMPCmd (Type: Java) - DC that acts as the command bean.
Created 2 public parts 'compile'(Type:compilation) and 'deploy' (Type:assembly). In Used DCs added EMPpp.
5. EMPWd (Type: Webdynpro) - DC that will contain the Java Bean Model and the application. In Used DCs added 'compile' and 'deploy'.
Q1.) Now when i try to import the Java bean model by selecting the radio button "public parts of used DCs" and look at the dropdown, i am not able to see any of the jar's related to my command bean DC.
If i select the radio button "project(source folder)" and click Next it says 'No JavaBeans for import'. Am i missing something?
Q2) Could someone tell me the exact steps from pt. 4 onwards. ie. whether it is necessary to create the 2 public parts for EMPCmd DC and what should it contain.
Thanking you in advance.Hi Melwyn,
check the NWDI tutorial, it will help you:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0b53558-6df6-2910-cfbf-a63316bb0fad
kind regards
Stefanie -
hai ,
am new to webdynpro for java ... Am trying to import ejb bean jar to web dynpro ..
Steps as follows
i) copy the bean jar to wd project lib folder
ii) Set classpath
SampleWD - > Model
Model -> create model
Model name : Samplemodel
Model package : com.sample
Local jar file : C:\sap\workspace\SampleWD\lib\addbean.jar -- getting error in this step as Invalid Class - java bean not available for import
can anybody help me ..
Thanks in advance...
regards,
KrishHi Krish,
In addition to Madhu's suggestion,
As per the Java Bean Model creation steps, you will need to add the Commanad Bean JAR too in your Project, and while creation of Model, you need to select this Command Bean JAR and not the Bean Project JAR.
Regards,
Alka. -
Importing Java Bean Model (Command Bean) with Session Bean
Hello all,
I'm trying to import a CommandBean as a Java Bean Model in WebDynpro but I'm prompted with an error indicating that I cannot import the EJB (Session Bean) DC that is being accessed by my CommandBean - hence failing to import the CommandBean DC as well.
How do I import this?
Help please.
-Regards,
JanHI,
just add ejb20.jar as an external jar in your WD project. -
Need help for traping imported java bean exception
hi everyone
i have imported a java bean into my forms 9i using java importer utility which tries to rename a file on a give path(bean works fine when executed through sql client).
i have problem when called from when button pressed trigger, it throws me an ("FRM-40735 and ORA-105101 NON ORACLE EXCEPTION") error.
i have imported java.lang.exception class and constructed an exception handler to trap java exception in the trigger
as
EXCEPTION
WHEN ORA_JAVA.JAVA_ERROR then
message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
--check for ORA-105101
WHEN ORA_JAVA.EXCEPTION_THROWN THEN
ex:= ORA_JAVA.LAST_EXCEPTION;
message('Java Exception --: '||BIException.toString(ex));
ORA_JAVA.CLEAR_EXCEPTION;
WHEN OTHERS THEN
message('error :'||SQLERRM);
when i imported java.lang.exception i did not find any wrapper pl/sql function or procedure declared to read or get the error messages except for the functions named "new" ,my exception handler failed.
so i tried with BIException which also fails to trap the error i have no idea about BIException and its usage with in forms ,Please do help me out with this issue ASAP.
thanks in advance
Rgds
yashHi,
don't understand what the BIException is supposed to do in your code, can you try
WHEN ORA_JAVA.EXCEPTION_THROWN then
ex := ORA_JAVA.LAST_EXCEPTION;
message('Exception: '||Exception_.toString(ex));
where Exception_ is the imported java.lang.Exception package.
Frank -
Enterprise 8 and Importing Java Beans
Hi, I have obtained the class files from a book, and I would like to follow the book's examples. However, while I'm using Enterprise 8, I can't find anywhere in which I can import this bean.
Can someone help me by giving me a step by step instruction? I cannot find such instructions on the help. Thanks.
Thanks.
John.Is there any difference where the sources are kept? When exporting the project as a WAR file, will all the beans be included anyways?
Also, by creating a new Project with existing sources, that creates a new project. Unlike in JS Creator, you are allowed to add the beans to the Source Packages node.
Is it possible to do the same thing within Enterprise?
Thanks. -
Problem importing java bean model
I had importing a lot of classes from my bussiness model but I have some problem with some classes. Those classes uses others from external jars, like common collection.
I imported common-collection.jar to wd project, but I got the same error. Is posible use external classes in my model? How can I import it? (external jars)Hi,
You have to create a DC of type extyernal library.
And paste the external library in the libraries.
And craete public of both types SDA & API.
Right click on the pasted jars in the libraries folder.
Right click on the jar>Development Component->Add to public part(Create a one with API radio button selected).
Repeat the same step selecting SDAs radio button.
Now add the public part created by you in the Web dynpro DC ur working .
Thanks & Regards,
Lokesh -
Expose EJB through Java Bean model importer in Web Dynpro
Hi,
I am planning to expose EJB like following:
1. Create Stateless session bean as a façade for DAO access.
2. Create DAO to access database. In my case is Oracle DB
3. Create Java Bean to encapsulate session bean
4. Import java bean model to web dynpro
Few of my business method return the object array e.g. Customer[] which contains all properties of customer, and getter, setter.
Has anyone done this before? Is there any sample code?
Best Regards,
Zhang YanHi
I think u can refer to the following link
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/simple java bean generator for database.pdf
Thought this link is also Useful
Creating and Deploying Web Services for an EJB
Wishes
Krishna kanth -
Java.beans.Expression and inner classes
hello,
test.java
public class test
public class in
public in()
System.out.println("inner");
t.java
import java.beans.*;
class t
public static void main(String...args)
try {
new Expression(test.in.class,"new",null).getValue (); // prints nothing
new Expression(new test().new in().getClass(),"new",null).getValue (); // prints OK
catch ( Exception e )
System.out.println();
}Why "test.in.class" prints nothing ?
Thank youWhat do you want?? it should print if you have system out
System.out.println(new test().new in().getClass());
instead of new Expression(....)
o/p
inner
class package_name.Test$in -
How can I include Java Bean model into the model outside the component
Hi All,
I am new to SAP portal. I wanted to create a bean for storing the data and to include that into the application model.
Please help me with an example .
Regards,
SarojHi,
Check these blogs.
The specified item was not found.
Importing Complex JavaBean model into WebDynpro by creating relationships for the model classes
JavaBean Model Import: when it really works
Issue in Importing Java Bean Model
Regards,
Harini S
Consider rewarding points for helpful answers. Post this thread in WD forums for more results. -
Value cannot refresh using Java bean
When I use java bean to get a value. It suppose to refresh and show new value but it doesn't. So any code can help to resolve this issue.
here is my code
(Testing.jsp)
<html>
<head>
<title>Page 3</title>
<link rel=stylesheet type="text/css" href="auction.css">
</head>
<table class="mainBox" width="200">
<tr><td class="boxTitle" >
Testing number 3
</td></tr>
<tr><td>
<span class="headline">
<jsp:useBean id="testing2" class="com.jsp.newsys.testing.Testing2" scope="request">
<jsp:setProperty name="testing2" property="user" value="Hello World"/>
<jsp:getProperty name="testing2" property="user2"/>
</jsp:useBean>
</span>
</td></tr>
</table>
</html>
The bean file which is Testing2.java
package com.jsp.newsys.testing;
import java.beans.*;
import java.util.*;
public class Testing2 extends Object implements java.io.Serializable {
private String user;
private String test;
public Testing2() {
public void setUser(String user)
test="";
if (user.equals("Hello World"))
test="Hi dqwqwd";
public String getUser2()
return this.test;
I need to restart my tomcat everytime then only the value will refresh. Please help.
Message was edited by:
wesleygch
Message was edited by:
wesleygch
Message was edited by:
wesleygchYour bean maybe have misspelling error
look at test and test2 on the jsp file. But I couldn't find any bean property test2 in your bean. Maybe you should try
${testing2.test} instead of ${testing2.test2}
I am a new bie also....:-) -
Diffrence b/w Deploy Time & Design time in Java bean model
Hi all,
I have craeted a model using java bean.
create model->import java bean model->Add JAR->browse the jar.
There i have got two Radio Buttons
Design Time
Deploy Time
I have worked with this two i have not observed any difference.
Can anyone give me some idea about this.If possible with an example to?
Thanks & Regards,
Lokesh.HI Lokesh,
The basic difference between design time and deploy time is. design time jars are only used when building your aplication and considered to be present already on server. and at runtime application refer to it..
while if you keep deploy time, then the application itself keeps that jar file with him and at runtime it refers to it.
i.e. application deploy that jar file on server.
When you run an application, application need all its dependencied to be present in webdynpro container of server.
your javabean model needs those jar files at server. so when you chose deploy time. it personly deploy that file on server.
Iif you keep it as design time then. then you will be able to build it.
but if those jar files are not present at the server then your application will not get deployed.
e.g.
let A & B are your two applications and they need xx.jar file of a EJB which is created by you to create a javabean model.
now as this xx.jar file is not present at server.
1. when you create model for A. Keep it as deploy time.
as application A deploy that xx.jar file on server. B can refer it directly
2._when you create model for B keep it as design time._ -
Hi
I am trying to import a Java bean into webdynpro component. I have exposed the Java bean class as public part and I am using this as a used DC in webdynpro.
I am trying to create a model from Java bean importer and i select the Jar of the java bean I am getting the following error.
java.lang.Exception: Invalid Class - JavaBean not available for import
Class :javax/ejb/CreateException
Jar :C:\Documents and Settings\Administrator\.dtc\1\DCs\ibm.com\jdidemo\maint\java\_comp\gen\default\public\CommandBean\lib\java\comjdidemomaintjavaCommandBean.jar
at com.sap.ide.metamodel.importers.javabean.JavaBeanAnalyser.identifyClassesForJar(JavaBeanAnalyser.java:1187)
Any help is appreciated.
Regards
NagaKishore VHi,
please check the steps to be implemented to import the Jave Bean.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e93a5c
Please refer the blog as well.
/people/valery.silaev/blog/2005/08/30/javabean-model-import-when-it-really-works
hope that helps.
Regards,
S.Divakar
Message was edited by: Divakar Salla -
'invalid class-java beans not available for import
Hi Experts,
i am using java bean model in my Web Dynpro Application.
for that one i have created command bean(Customer) and in my command bean i am using some other class(CustomerInfo) as reference. this CustomerInfo class contains 4 attribtes(name ,id ,etc all are of type String)
when i try to import these 2 class into web dynpro (using java bean model),for the Customer class it
is giving an error message 'invalid class-java beans not
available for import'.but 2nd class(CustomerInfo) is imported successfully with out giving the error.what might be reason.
any help will be appriciated
Thanks in advance
With Regards
NaiduNaidu,
Please try to repeat JavaBean model import when running IDE in console mode (correspondign short-cut should be available in Windows Start menu, otherwise just copy original short-cut, edit it and change in command string "javaw" to java).
Post here what is shown on console during import.
VS
Maybe you are looking for
-
New version TB (31.5.0) keeps saying the group list can not be sent
After upgrading to this new version my group lists again started developing errors with a message that says something like An error occurred while sending mail. "The mail server responded: 5.5.0 <list name > invalid address. Please check the message
-
Making pdfs in CS3 from Microsoft Word X w/ Snow Leopard
I just installed Snow Leopard on my Mac Pro Dual-Core Intel Xeon computer. Before installing, I effortlessly printed pdfs from Word (Microsoft Office X), but now, although I get the correct dialog boxes, and can go through the process, an icon of the
-
My iphoto has been trying to update for 2 hours and it's been stuck on 28%. What's wrong with it? What should I do?
-
Scopes / Color-Correction Question
When I apply a color-correction effect - RGB Curves for instance - before I make a single adjustment the scopes jump to new values, as if I had made an adjustment. When I click the eyeball to turn the effect off the scopes all go back to their origin
-
HT1695 what do I do when my phone says no wi-fi but the wi-fi in my house is on?
Today when I got home my wi-fi didnt seem to connect like it always does so I tried to do it myself. When I did it took almost 15minutes to load and after that I gave up so I turned my whole iphone off. After that I tried to connect again but this ti