Create a ADF component by Class.forName (11g)
Hello,
I'm loading a list of components by an XML, and I'd like to create an istance by Class.forName, for example:
UIComponent componet = (UIComponent)Class.forName("oracle.adf.view.rich.component.rich.input.RichInputText").newInstance();
but the system give me this error:
java.lang.ClassNotFoundException: oracle.adf.view.rich.component.rich.input.RichInputText
In the class there is the import RichInputText of and in the same class this works:
oracle.adf.view.rich.component.rich.input.RichInputText title = new RichInputText();
Any idea?
Thank you,
Cristian
Hi,
If I create my component extending Container, clients could think it's a Container (but in fact, I only used the Container feature to layout the component).
For instance, if a API client call myCustom.add(aWidget), it will break the layout of my custom component.
I can tell in the javadoc that this component must not be used as a container.
But there are other situations when a client can inadvertantly think it's a container.
Imagine that you write a method addTreeListener() that recursively register a listener to all components of a container. I don't want the Canvas and Scrollbar of my custom component to call back the listeners, but I want to hide my custom component to hide its internal and call back the listeners.
As I said, it's mainly a design question, but I wanted to improve my custom component...
Pierre M�tras
Similar Messages
-
How can create the object ? Via class.forName
Hi,
i want to create the object via class.forname?........
i have tryed like this Class obj=Class.forName("sample.Employee");
but it gives error like this......
java.lang.InstantiationException: sample.Employee
at java.lang.Class.newInstance0(Class.java:291)
at java.lang.Class.newInstance(Class.java:259)
at sample.ArrayListTest.main(ArrayListTest.java:22)The line
Class obj=Class.forName("sample.Employee");does NOT create a new object of class
sample.Employee. It only loads the class and creates
the Class object. You have to call newInstance() to
create a new instance of the class:
Object obj =
Class.forName("sample.Employee").newInstance();I guess you already did something like that, because
forName() itself doesn't throw an
InstantiationException.
For this to work, class sample.Employee must be in
the classpath and it must have a public constructor
that takes no arguments.this is my full code it dosn't work i don,t know
public class ArrayListTest {
public ArrayListTest() { }
public static void main(String[] args) {
ArrayList employees = new ArrayList();
// create some employees
/* Employee employee_1 = new Employee("John", 2000);
Employee employee_2 = new Employee("Carl", 3000);
Employee employee_3 = new Employee("Ron", 4000);*/
/*instead of this Employee employee_1 i want to create the new obeject by using*/
try{
Object obj = Class.forName("sample.Employee").newInstance();
catch(Exception e)
e.printStackTrace();
// add them to your list
//employees.add(employee_1);
//employees.add(employee_2);
//employees.add(employee_3);
// display only the names your list
for(int j = 0; j < employees.size(); j++) {
Employee temp = (Employee)employees.get(j);
System.out.println("nr. "+(j+1)+": "+temp.getName()+"\nnr. "+(j+1)+": "+temp.getSalary());
// invoke the toString()-method from Employee
for(int j = 0; j < employees.size(); j++) {
Employee temp = (Employee)employees.get(j);
System.out.println(temp.toString());
} // class ArrayListTest
again the same error occur................ -
How to add adf faces in component pallete of jdeveloper 11g?
how to add adf faces in component pallete of jdeveloper 11g?
Hi,
the replacement of ADF Faces HTML components in JDeveloper 11 is Trinidad. For existing applications, a migration path will be provided in JDeveloper 11 production. I wouldn't recommend configuring ADF Faces in JDeveloper 11.
You an configure ADF Faces Components in JDeveloper 11 by :
- Tools --> Manage Libraries
- Create a User Library
- select ADF Faces adf-faces-impl.jar
- Enure the namespace is not af or afh but something different to not cnflic with teh ADF Faces RC components
Note that adding the ADF Faces components to the component palette will not make them show in the ADF binding context menu nor will it automaticaly set up the web.xml file. The components are available as any other JSF library set
Again, I wouldn't go this way ;-)
Frank -
Create data control from java class, not see "ADF Parameter Forms" option
Hi,
I have created a Fusion Web Application (ADF) in jdev 11g. In the application model project, I created a java class. Inside the java class, I have a public method as below
public Asset [] searchAsset3(SearchTerm s) // SearchTerm is a java bean. It implements java.io.Serializable.
I created data control from my java class. After that, I see an xml file generated under the same folder of my java class. Here is the xml content.
<?xml version="1.0" encoding="UTF-8" ?>
<JavaBean xmlns="http://xmlns.oracle.com/adfm/beanmodel" version="11.1.1.53.62"
id="AIAAsset" Package="oracle.apps.aia.oer.model"
BeanClass="oracle.apps.aia.oer.model.AIAAsset" isJavaBased="true">
<MethodAccessor IsCollection="true"
Type="com.flashline.registry.openapi.entity.Asset"
BeanClass="com.flashline.registry.openapi.entity.Asset"
id="searchAsset" ReturnNodeName="Asset"
CollectionBeanClass="UpdateableCollection">
<ParameterInfo id="name" Type="java.lang.String" isStructured="false"/>
<ParameterInfo id="version" Type="java.lang.String" isStructured="false"/>
<ParameterInfo id="description" Type="java.lang.String"
isStructured="false"/>
</MethodAccessor>
<MethodAccessor IsCollection="true"
Type="com.flashline.registry.openapi.entity.AssetSummary"
BeanClass="com.flashline.registry.openapi.entity.AssetSummary"
id="searchAssetSummary" ReturnNodeName="AssetSummary"
CollectionBeanClass="UpdateableCollection">
<ParameterInfo id="name" Type="java.lang.String" isStructured="false"/>
<ParameterInfo id="version" Type="java.lang.String" isStructured="false"/>
<ParameterInfo id="description" Type="java.lang.String"
isStructured="false"/>
<ParameterInfo id="type" Type="java.lang.String" isStructured="false"/>
</MethodAccessor>
<MethodAccessor IsCollection="true"
Type="com.flashline.registry.openapi.entity.Asset"
BeanClass="com.flashline.registry.openapi.entity.Asset"
id="searchAsset3" ReturnNodeName="Asset"
CollectionBeanClass="UpdateableCollection">
<ParameterInfo id="s" Type="com.flashline.registry.openapi.query.SearchTerm"
isStructured="true"/>
</MethodAccessor>
<ConstructorMethod IsCollection="true"
Type="oracle.apps.aia.oer.model.AIAAsset"
BeanClass="oracle.apps.aia.oer.model.AIAAsset"
id="AIAAsset"/>
</JavaBean>
Then, in application user interface project, I created a JSPX page. From the data controls palette, I want to drag and drop the searchAsset3 onto my page. However, I don't see an option for me to choose "Create -> Parameters -> ADF Parameter Form". I only see "Create -> Methods". Unlike other public methods (e.g.searchAssetSummary and searchAsset) which have simple data type as input, I can see the "Create -> Parameters -> ADF Parameter Form" option when I drag and drop to my jspx page. Is that something I missed while creating data controls?
Thanks.
Arnold.Then, my other question is how do you do the bindings? I drag and drop the attributes from SearchTerm bean. Now the pagedef file has the AttributeValues added but my method is actually expecting one input parameter of type SearchTerm. How do you bind the attributes to the input of the method? Thanks.
See below of my pagedef xml file.
<?xml version="1.0" encoding="UTF-8" ?>
<pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
version="11.1.1.53.62" id="SearchAssetBySearchTerm1PageDef"
Package="oracle.apps.aia.oer.view.pageDefs">
<parameters/>
<executables>
<variableIterator id="variables"/>
<methodIterator Binds="SearchTerm.result" DataControl="AIAAsset"
RangeSize="25"
BeanClass="com.flashline.registry.openapi.query.SearchTerm"
id="SearchTermIterator"/>
</executables>
<bindings>
<methodAction id="SearchTerm" RequiresUpdateModel="true"
Action="invokeMethod" MethodName="SearchTerm"
IsViewObjectMethod="false" DataControl="AIAAsset"
ClassName="com.flashline.registry.openapi.query.SearchTerm"
ReturnName="AIAAsset.methodResults.SearchTerm_AIAAsset_SearchTerm_result"/>
<attributeValues IterBinding="SearchTermIterator" id="key">
<AttrNames>
<Item Value="key"/>
</AttrNames>
</attributeValues>
<attributeValues IterBinding="SearchTermIterator" id="operator">
<AttrNames>
<Item Value="operator"/>
</AttrNames>
</attributeValues>
<attributeValues IterBinding="SearchTermIterator" id="value">
<AttrNames>
<Item Value="value"/>
</AttrNames>
</attributeValues>
<methodAction id="searchAsset3" RequiresUpdateModel="true"
Action="invokeMethod" MethodName="searchAsset3"
IsViewObjectMethod="false" DataControl="AIAAsset"
InstanceName="AIAAsset.dataProvider"
ReturnName="AIAAsset.methodResults.searchAsset3_AIAAsset_dataProvider_searchAsset3_result">
*<NamedData NDName="s"*
NDType="com.flashline.registry.openapi.query.SearchTerm"/>+
</methodAction>
</bindings>
</pageDefinition> -
How To create ADF Search form in JDeveloper 11g 11.1.1.0.1
Hi,
I am using JDeveloper 11g 11.1.1.0.1 , in which i tried creating an ADF search form that has Find and Execute Buttons.
I created the same ADF search form using JDeveloper 11g TP3 and TP4 wherein it works fine but not in JDeveloper 11g 11.1.1.0.1.
Scenario....
I dragged a read only view object on to the jspx page as ADF Search Form and dragged the same as Read only table.
After doing this if i run the application the search functionality does not happen .
( I click on the find button and enter the condition and then click on the execute button. records does not get filtered based on that condition specified.)
But when the same steps is done in 11g TP3 and TP4 the search functionalty works fine.
Can someone suggest me what is the issue.
Is this a bug in the new release.
regards
vinithareply is in this id
ADF Searchform with find and execute buttons in JDev 11.1.1.0.1 studio edi. -
How to create an object of our own class by using Class.forName()??
how to create an object of our own class by using Class.forName()??
plzz anser my qustion soon..Class.forName does not create an object. It returns a reference to the Class object that describes the metadata for the class in question--what methods and fields it has, etc.
To create an object--regardless of whether it's your class or some other class--you could call newInstance on the Class object returned from Class.forName, BUT only if that class has a no-arg constructor that you want to call.
Class<MyClass> clazz = Class.forName("com.mycompany.MyClass");
MyClass mine = clazz.newInstance();If you want to use a constructor that takes parameters, you'll have to use java.lang.reflect.Constructor.
Google for java reflection tutorial for more details.
BUT reflection is often abused, and often employe when not needed. Why is it that you think you need this? -
How to create Auto suggestion component by using of ADF tag
Hi ,
In my project, I am using the ADF frame work and I need to use the auto suggestion component.
Can any body suggest me how to create Auto suggestion component by using of ADF tag.
Waiting for your valuable suggestions...Try this forum:
JDeveloper and ADF
You might get a lot more response.
Jan Kettenis -
Creating a customized copy of an ADF component
Hi,
Is it possible to create a copy of a standard ADF component, and then customize the copy without changing the original?
Using a skin, it is possible to change the look and feel etc. of standard ADF components. But I have a case where I need a customized version of a panel splitter AND an un-customized version, at the same time (on the same page). Any suggestions?
Regards,
AndreasHi Arun,
Sorry about the delay.
I'm having some trouble making the style take effect.
I have this in my skin css:
af|panelSplitter.splitterHelp af|panelSplitter::horizontal-collapse-icon {content: url('/faces/images/Help-icon32x32.png');width:25px;height:25px;}
af|panelSplitter.splitterHelp af|panelSplitter::horizontal-restore-icon {content: url('/faces/images/Help-book32x32.png');width:25px;height:25px;}
and, on my page I have:
<af:panelSplitter id="ps2" styleClass="splitterHelp">
<f:facet name="first">
<af:outputText value="Content" id="ot6"/>
</f:facet>
<f:facet name="second">
<af:outputText value="Helptext" id="ot7"/>
</f:facet>
</af:panelSplitter>
But this doesn't work (the splitter is displayed, but unstyled).
I've tried using this syntax in the css file instead:
.splitterHelp af|panelSplitter::horizontal-collapse-icon {content: url('/faces/images/Help-icon32x32.png');width:25px;height:25px;}
.splitterHelp af|panelSplitter::horizontal-restore-icon {content: url('/faces/images/Help-book32x32.png');width:25px;height:25px;}
But this does not work, either.
Lastly, I've tried doing something simpler but similar:
.styleTest af|inputText::content
background-color: InfoBackground;
(just to see if I could get ANY style from my skin to take effect). And this works fine.
The definition of .styleTest seems to me to be very similar to the definition of .splitterHelp. Yet, .styleTest works, and .splitterHelp does not.
Thinking that the problem might be the icon files, I've tried using some of my own icons instead (placed in an image folder in the skin workspace), but this does not seem to make any difference.
Can you (or anyone else) please tell me what I'm doing wrong?
Regards,
Andreas -
Creating Object using Class.forName vs new
Hello,
Is there any difference between:
Class c = Class.forName("Foo");
Foo foo = (Foo) c.newInstance();
and
Foo foo = new Foo();
Thanks.Simple search brings this:
http://forum.java.sun.com/thread.jspa?forumID=31&threadID=614699 -
Error getting while creating the custom pof serializer class
the error which i am getting is
2011-07-19 15:16:38.767/4.840 Oracle Coherence GE 3.7.0.0 <Error> (thread=main, member=1): Error while starting se
vice "AspNetSessionCache": (Wrapped) (Wrapped: error creating class "com.tangosol.io.pof.ConfigurablePofContext")
Wrapped: Unable to load class for user type (Config=pof-config.xml, Type-Id=1001, Class-Name=examples.testJavaClas
)) (Wrapped) java.lang.ClassNotFoundException: examples.testJavaClass
at com.tangosol.coherence.component.util.Daemon.start(Daemon.CDB:52)
at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.start(Service.CDB:7)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.start(Grid.CDB:6)
at com.tangosol.coherence.component.util.SafeService.startService(SafeService.CDB:39)
at com.tangosol.coherence.component.util.safeService.SafeCacheService.startService(SafeCacheService.CDB:5)
at com.tangosol.coherence.component.util.SafeService.ensureRunningService(SafeService.CDB:27)
at com.tangosol.coherence.component.util.SafeService.start(SafeService.CDB:14)
at com.tangosol.net.DefaultConfigurableCacheFactory.ensureServiceInternal(DefaultConfigurableCacheFactory.
ava:1102)
at com.tangosol.net.DefaultConfigurableCacheFactory.ensureService(DefaultConfigurableCacheFactory.java:934
at com.tangosol.net.DefaultCacheServer.startServices(DefaultCacheServer.java:81)
at com.tangosol.net.DefaultCacheServer.intialStartServices(DefaultCacheServer.java:250)
at com.tangosol.net.DefaultCacheServer.startAndMonitor(DefaultCacheServer.java:55)
at com.tangosol.net.DefaultCacheServer.main(DefaultCacheServer.java:197)
Caused by: (Wrapped: error creating class "com.tangosol.io.pof.ConfigurablePofContext") (Wrapped: Unable to load c
ass for user type (Config=pof-config.xml, Type-Id=1001, Class-Name=examples.testJavaClass)) (Wrapped) java.lang.Cl
ssNotFoundException: examples.testJavaClass
at com.tangosol.io.ConfigurableSerializerFactory.createSerializer(ConfigurableSerializerFactory.java:46)
at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.instantiateSerializer(Service.CDB:1
at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.ensureSerializer(Service.CDB:32)
at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.ensureSerializer(Service.CDB:4)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onEnter(Grid.CDB:26)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onEnter(Par
itionedService.CDB:19)
at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:14)
at java.lang.Thread.run(Thread.java:619)
Caused by: (Wrapped: Unable to load class for user type (Config=pof-config.xml, Type-Id=1001, Class-Name=examples.
estJavaClass)) (Wrapped) java.lang.ClassNotFoundException: examples.testJavaClass
at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
at com.tangosol.io.pof.ConfigurablePofContext.report(ConfigurablePofContext.java:1254)
at com.tangosol.io.pof.ConfigurablePofContext.createPofConfig(ConfigurablePofContext.java:956)
at com.tangosol.io.pof.ConfigurablePofContext.initialize(ConfigurablePofContext.java:775)
at com.tangosol.io.pof.ConfigurablePofContext.setContextClassLoader(ConfigurablePofContext.java:319)
at com.tangosol.io.ConfigurableSerializerFactory.createSerializer(ConfigurableSerializerFactory.java:42)
... 7 more
Caused by: (Wrapped) java.lang.ClassNotFoundException: examples.testJavaClass
at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
at com.tangosol.io.pof.ConfigurablePofContext.loadClass(ConfigurablePofContext.java:1198)
at com.tangosol.io.pof.ConfigurablePofContext.createPofConfig(ConfigurablePofContext.java:952)
... 10 more
Caused by: java.lang.ClassNotFoundException: examples.testJavaClass
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.tangosol.util.ExternalizableHelper.loadClass(ExternalizableHelper.java:3056)
at com.tangosol.io.pof.ConfigurablePofContext.loadClass(ConfigurablePofContext.java:1194)
... 11 more
Exception in thread "main" (Wrapped) (Wrapped: error creating class "com.tangosol.io.pof.ConfigurablePofContext")
Wrapped: Unable to load class for user type (Config=pof-config.xml, Type-Id=1001, Class-Name=examples.testJavaClas
)) (Wrapped) java.lang.ClassNotFoundException: examples.testJavaClass
at com.tangosol.coherence.component.util.Daemon.start(Daemon.CDB:52)
at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.start(Service.CDB:7)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.start(Grid.CDB:6)
at com.tangosol.coherence.component.util.SafeService.startService(SafeService.CDB:39)
at com.tangosol.coherence.component.util.safeService.SafeCacheService.startService(SafeCacheService.CDB:5)
at com.tangosol.coherence.component.util.SafeService.ensureRunningService(SafeService.CDB:27)
at com.tangosol.coherence.component.util.SafeService.start(SafeService.CDB:14)
at com.tangosol.net.DefaultConfigurableCacheFactory.ensureServiceInternal(DefaultConfigurableCacheFactory.
ava:1102)
at com.tangosol.net.DefaultConfigurableCacheFactory.ensureService(DefaultConfigurableCacheFactory.java:934
at com.tangosol.net.DefaultCacheServer.startServices(DefaultCacheServer.java:81)
at com.tangosol.net.DefaultCacheServer.intialStartServices(DefaultCacheServer.java:250)
at com.tangosol.net.DefaultCacheServer.startAndMonitor(DefaultCacheServer.java:55)
at com.tangosol.net.DefaultCacheServer.main(DefaultCacheServer.java:197)
Caused by: (Wrapped: error creating class "com.tangosol.io.pof.ConfigurablePofContext") (Wrapped: Unable to load c
ass for user type (Config=pof-config.xml, Type-Id=1001, Class-Name=examples.testJavaClass)) (Wrapped) java.lang.Cl
ssNotFoundException: examples.testJavaClass
at com.tangosol.io.ConfigurableSerializerFactory.createSerializer(ConfigurableSerializerFactory.java:46)
at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.instantiateSerializer(Service.CDB:1
at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.ensureSerializer(Service.CDB:32)
at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.ensureSerializer(Service.CDB:4)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onEnter(Grid.CDB:26)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onEnter(Par
itionedService.CDB:19)
at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:14)
at java.lang.Thread.run(Thread.java:619)
Caused by: (Wrapped: Unable to load class for user type (Config=pof-config.xml, Type-Id=1001, Class-Name=examples.
estJavaClass)) (Wrapped) java.lang.ClassNotFoundException: examples.testJavaClass
at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
at com.tangosol.io.pof.ConfigurablePofContext.report(ConfigurablePofContext.java:1254)
at com.tangosol.io.pof.ConfigurablePofContext.createPofConfig(ConfigurablePofContext.java:956)
at com.tangosol.io.pof.ConfigurablePofContext.initialize(ConfigurablePofContext.java:775)
at com.tangosol.io.pof.ConfigurablePofContext.setContextClassLoader(ConfigurablePofContext.java:319)
at com.tangosol.io.ConfigurableSerializerFactory.createSerializer(ConfigurableSerializerFactory.java:42)
... 7 more
Caused by: (Wrapped) java.lang.ClassNotFoundException: examples.testJavaClass
at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
at com.tangosol.io.pof.ConfigurablePofContext.loadClass(ConfigurablePofContext.java:1198)
at com.tangosol.io.pof.ConfigurablePofContext.createPofConfig(ConfigurablePofContext.java:952)
... 10 more
Caused by: java.lang.ClassNotFoundException: examples.testJavaClass
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.tangosol.util.ExternalizableHelper.loadClass(ExternalizableHelper.java:3056)
at com.tangosol.io.pof.ConfigurablePofContext.loadClass(ConfigurablePofContext.java:1194)
... 11 more
2011-07-19 15:16:38.825/4.898 Oracle Coherence GE 3.7.0.0 <D4> (thread=ShutdownHook, member=1): ShutdownHook: stop
ing cluster node
2011-07-19 15:16:38.826/4.899 Oracle Coherence GE 3.7.0.0 <D5> (thread=Cluster, member=1): Service Cluster left th
cluster
Press any key to continue . . .
coherence-pof-config.xml is
<?xml version="1.0"?>
<!DOCTYPE pof-config SYSTEM "pof-config.dtd">
<pof-config>
<user-type-list>
<user-type>
<type-id>1001</type-id>
<class-name>examples.testJavaClass</class-name>
<serializer>
<class-name>com.tangosol.io.pof.PortableObjectSerializer</class-name>
<init-params>
<init-param>
<param-type>string</param-type>
<param-value>1</param-value>
</init-param>
</init-params>
</serializer>
</user-type>
</user-type-list>
</pof-config>
testJavaClass.CLASS file is
package examples;
import com.tangosol.io.pof.PofReader;
import com.tangosol.io.pof.PofWriter;
import com.tangosol.io.pof.PortableObject;
import com.tangosol.util.Base;
import java.io.IOException;
public class testJavaClass implements PortableObject
private String MembershipId;
private String m_sStreet;
private String m_sCity;
public testJavaClass()
public testJavaClass(String sName, String sStreet, String sCity)
setName(sName);
setStreet(sStreet);
setCity(sCity);
public void readExternal(PofReader reader)
throws IOException
setName(reader.readString(0));
setStreet(reader.readString(1));
setCity(reader.readString(2));
public void writeExternal(PofWriter writer)
throws IOException
writer.writeString(0, getName());
writer.writeString(1, getStreet());
writer.writeString(2, getCity());
// accessor methods omitted for brevity
Thanks.Hi Wijk,
I have created java class with using NetBeans IDE .
and running with .NET client and i kept it in the folder (C:\Program Files\Oracle\Coherence for .NET\examples\ContactCache.Java\src\examples).
Thanks.... -
Do some processing before loading jsf fragment created using adf task flow
Hi,
I am working on JDev11g.
I want to create SelectItems of SelectOneChoice dynamically before loading jsf fragment created using adf task flow
I tried by implementing RegionController class's method RefreshRegion in my backing bean of jsf page fragement to do some processing before loading region
But it seems to be not feasible approach because it is getting called every time any component on fragement gets partially submitted.
Is there any method which is called only first time when region is loaded ?
Or any other solution to achieve this.
Regards,
DevangHi,
don't think so. You would need a phase listener, but I don't see how you get it in. Wha about using a dynamic region and then use the method that is called from the dynamic region first time it is rendered?
Frank -
How to create the Declarative Component?
Hi,
I am using jdev 11g Release 2.
I want to create reusable component. So I want to create a declarative component.
Please let me know some sample and study materials.
Regards,
Raguanother examples can be found in these links:
Missing In or Out Parameter at Index 1
http://andrejusb.blogspot.com/2009/10/custom-declarative-components-in-adf.html
http://download.oracle.com/docs/cd/E17904_01/web.1111/b31973/af_reuse.htm#CACBFGFC -
'loading' component by 'class name' to jSplitPane ?
ok lets make it simple..
im developing a project using netbean 6, and instead of standard menu, i try to develop menu using jtree
this how i try to achieve:
i have a jtree, i use it as a menu tree that will execute (when ValueChanged event trigered) an setRightComponent with panels..
i create a panels inside a 'hidden' container..
and somehow i found a piece of code on the internet..
that will enumerate and find any components inside a container..
when user click the tree node, my code read which node has been clicked and return a string..
the returned string then used to get the container by those 'piece of code' and returned a component
that component then used by setRightComponent to set the panels
its work..
its fine if i only had less than 50 panels..
now, my question:
what happen if i had 1000 or more panels?
i dont want that panels loaded to memory at first time, is there any method to do this?
ive already figure out the alternative way and reach the dead end (for me)..
this my alternative:
i put my panels(class) inside a package (not container)
then i use class.forName(String className) function to get them
i can create the instance/object using newInstance()
but i can only get an instance of object from that function not a component/jpanel instance
and setRightComponent only accept a component (not an object)
so the second question is..
can i some how 'parse' object to 'component'?
thanks, i realy need an enlightment..
Edited by: causa.vitae on Jan 1, 2008 10:08 AM
Edited by: causa.vitae on Jan 1, 2008 10:12 AMcausa.vitae wrote:
im developing a project using netbean 6, and instead of standard menu, i try to develop menu using jtree
i have a jtree, i use it as a menu tree that will execute (when ValueChanged event trigered) an setRightComponent with panels..
i create a panels inside a 'hidden' container..
and somehow i found a piece of code on the internet..
that will enumerate and find any components inside a container..
when user click the tree node, my code read which node has been clicked and return a string..
the returned string then used to get the container by those 'piece of code' and returned a component
that component then used by setRightComponent to set the panels
its work..
its fine if i only had less than 50 panels..I'm not 100% sure I understand this. You may want to show what you are trying to do by showing us a small example of your code that compiles and demonstrates on a small scale what you are trying, an SSCCE. For more info on SSCCEs please look here:
http://homepage1.nifty.com/algafield/sscce.html
now, my question:
what happen if i had 1000 or more panels?Why would you have 1000+ panels? What is the rationale for this design?
i dont want that panels loaded to memory at first time, is there any method to do this?good question. I suppose you could create JPanels on the fly.
ive already figure out the alternative way and reach the dead end (for me)..
this my alternative:
i put my panels(class) inside a package (not container)
then i use class.forName(String className) function to get them
i can create the instance/object using newInstance()
but i can only get an instance of object from that function not a component/jpanel instance
and setRightComponent only accept a component (not an object)
so the second question is..
can i some how 'parse' object to 'component'?Have you tried casting? I don't know if this would work (without an SSCCE as described above), but if the Object received is truly a JPanel then casting it to a JPanel should work. If it's not a JPanel, then you have to rethink your design a bit (perhaps not a bad idea anyway).
Finally, since this is a Swing-related question, I suggest that if you post a similar question in the future, you post it in the Swing forum.
Good luck. -
Failed to create delegate for component (Model Error)
Dear All,
I am getting exception while running one webdynpro application. Details of error is attached below.
I am getting this error just after binding the Component controller node to Model Node, without writing any code for model execution. My model is created from one webservice, and that web service is perfectly fine.
My server and IDE both running on same service pack SP12.
I have tried with re-creating model and rebuild the project but still getting the same error.
Kindly suggest.
Thanks & Regards
Manoj Sahoo
<i><u><b>Root Cause
The initial exception that caused the request to fail, was:</b></u></i>
<b>
java.lang.NoClassDefFoundError: com/sap/tc/webdynpro/model/webservice/gci/WSTypedModelClass -
Loader Info -
ClassLoader name: [chep.com/exchangeexchange_dynpro] Parent loader name: [Frame ClassLoader] References: common:service:http;service:servlet_jsp service:ejb common:service:iiop;service:naming;service:p4;service:ts service:jmsconnector library:jsse library:servlet common:library:IAIKSecurity;library:activation;library:mail;library:tcsecssl library:ejb20 library:j2eeca library:jms library:opensql common:library:com.sap.security.api.sda;library:com.sap.security.core.sda;library:security.class;library:webservices_lib;service:adminadapter;service:basicadmin;service:com.sap.security.core.ume.service;service:configuration;service:connector;service:dbpool;service:deploy;service:jmx;service:jmx_notification;service:keystore;service:security;service:userstore interface:resourcecontext_api interface:webservices interface:cross interface:ejbserialization sap.com/tcwddispwda sap.com/tcwdcorecomp chep.com/portglobalportfolio_common_dynpro service:webdynpro service:sld library:tcddicddicservices library:com.sap.aii.proxy.framework library:tcgraphicsigs library:com.sap.mw.jco library:com.sap.lcr.api.cimclient library:sapxmltoolkit library:com.sap.aii.util.rb library:com.sap.util.monitor.jarm library:tcddicddicruntime library:com.sap.aii.util.xml library:com.sap.aii.util.misc library:tccmi Resources: /usr/sap/MTD/JC00/j2ee/cluster/server0/apps/chep.com/exchangeexchange_dynpro/src.zip /usr/sap/MTD/JC00/j2ee/cluster/server0/apps/chep.com/exchangeexchange_dynpro/webdynpro/public/lib/chep.comportglobalportfolio_commonscommonsJAR.jar /usr/sap/MTD/JC00/j2ee/cluster/server0/apps/chep.com/exchangeexchange_dynpro/webdynpro/public/lib/chep.comexchange~exchange_dynpro.jar Loading model: {parent,references,local} -
The error occurred while trying to load "com.chep.portfolio.exchange.dynpro.model.EMSSummaryTO".
at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:401)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at com.chep.portfolio.exchange.dynpro.summary.wdp.InternalExchangeManagementSummaryComp.class$(InternalExchangeManagementSummaryComp.java:25)
... 33 more</b>
<u><b>Detailed Exception Chain</b></u>
<b>
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to create delegate for component com.chep.portfolio.exchange.dynpro.summary.ExchangeManagementSummaryComp. (Hint: Is the corresponding DC deployed correctly? Does the DC contain the component?)
at com.sap.tc.webdynpro.progmodel.generation.ControllerHelper.createDelegate(ControllerHelper.java:110)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.<init>(DelegatingComponent.java:51)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:382)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:362)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:748)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:283)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:759)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:712)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:261)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at com.sap.tc.webdynpro.progmodel.generation.ControllerHelper.createDelegate(ControllerHelper.java:74)
... 27 more
Caused by: java.lang.NoClassDefFoundError: com/sap/tc/webdynpro/model/webservice/gci/WSTypedModelClass</b>hi,
the problem is that you are missing a jar file called: webdynpromodel_webservice_default.jar
which should be present inside:
C:\Documents and Settings\<User Name>\.dtc\3\DCs\sap.com\tc\wd\wslib\_comp\gen\default\public\default\lib\java
For this you need to add tc/wd/wslib(default) DC as used DC. Go to DC Metadata -> DC Definition and expand used DCs. check whether it is present or not. If not then add it.
Just check this. Hope this will solve your problem
thanks & regards,
Manoj
Message was edited by:
Manoj Kumar -
Problem with links in deployed ADF application to Weblogic Server 11g
Hi everyone !
I have a query here, firstly, I have created an ADF application using Jdeveloper 11g and have successfully deployed (EAR file) onto the weblogic server.
However, after testing out the application, the linking within the application does not seem to work. Whenever I click on a link or button, the page refreshes but the result is not displayed.
What could have cause the problem?
Thanks
GavinAre the ADF runtime libraries installed into the WebLogic server?
Maybe you are looking for
-
How do you install desktop 2 and desktop 3 using Mavericks
There is no plus sign to install desktop 2 and 3. Does anyone know how to do this?
-
Confuse to develope web application.
Hello Team, I am developing web application in ADF tehcnology...... I want to know that M I going on right direction? plese help me.... I have one form registration & on that I have 3 screen for this form.... My first Apprach:- I develope One Jspx Pa
-
I have created two groups for my Anyconnect clients. I am using NT Domain authentication, but I want to know if it is possible to force an Anyconnect group to a user thats part of a certain OU in AD? For instance the IT group would get a group called
-
Do I need 1 or 2 licenses?
I have a Mac Pro 8 core, 2GB RAM, Mac OS X 10.5.6 on which I use Adobe CS Premium 1.0. I will upgrade in the near future to CS 4 Design Premium. I'm also thinking about purchasing a MacBook Pro primarily for use as I travel. On the MacBook Pro, I int
-
Importing eps files into keynote (or pages)
hi, i'm running keynote 3 and used to have no trouble at all simply dragging (or importing) eps graphic files into keynote presentations. then for no apparent reason i lost the ability to do this and now when i try to import any eps files, keynote ju