How to deprecate my own method in java
How to deprecate my own method in java, so that my compiler gives a warning when i use a deprecated method?
Mark it as deprecated as specified in the javadoc guide, (available on this site). You deserve an RTFM but I'm feeling nice today ;->
Similar Messages
-
How to call backing bean method from java script
Hi,
I would like to know how to call backing bean method from java script.
I am aware of serverListener and [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
but i am running in to some issues with [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
regarding which i asked for help in other thread with subject ....Question on AjaxAutoSuggest article (Ajax Transactions Using ADF and J...)
The reason why i posted is ( though i realise both are duplicates) .. that threads looks as a specific question to that article hence i would like to ask the quantified problem is asked in this thread.
So could any please letme know how to call backing bean method from java script
Thanks
Murali
Edited by: mchepuri on Oct 24, 2009 6:17 PM
Edited by: mchepuri on Oct 24, 2009 6:20 PMHello,
May know how to submit a button autoamtically on onload of page with clicking a welcome alert box. the submit button has managed button too to show a message on console using SOP.
the problem is.
1. before loading the page a javascript comes on which i clicked ok
2. the page gets loaded and the button is there which gets automatically clicked and the managed bean associated with prints a message on console using SOP.
I m trying to do this through server listener and click listener. the code is(adf jspx page)
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1" binding="#{backingBeanScope.backing_check4.d1}">
<af:form id="f1" binding="#{backingBeanScope.backing_check4.f1}">
<af:commandButton text="commandButton 1"
binding="#{backingBeanScope.backing_check4.cb1}"
id="cb1" action="#{beanCheck4.submit1}"/>
<af:clientListener type="click" method="delRow"/>
<af:serverListener type= "jsServerListener"
method="#{backingBeanScope.backing_check4.submit1}"/>
<f:facet name="metaContainer">
<af:resource type ="javascript">
x=confirm("hi");
// if(x){
delRow = function(event){
AdfCustomEvent.queue(event.getSource(), "jsServerListener", {}, false);
return true;
</af:resource>
</f:facet>
</af:form>
</af:document>
</f:view>
<!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_check4-->
</jsp:root>
the backing bean code is -----
public class classCheck4 {
public classCheck4() {
public String submit1() {
System.out.println("hello");
return null;
} -
How to call a C method with Java
Hi all,
is it possible calling a C method with Java?? And how to...?
thx for helping
Cobol1is it possible calling a C method with Java?? And how to...?Not in general no.
You can use JNI which will call another C function (which you write) and which then calls your C method.
If the method is of a specific type (like OLE, Corba) then there are packages available which can allow you to access it. They still use JNI underneath, but hide that functionality from you. -
How to set my own icon for java frame ??
I create a java class it extends JFrame. I want to change default icon on the left_top corner and using my own icon. It is a --.gif file. How to do it. When I try to modify it using setIconImage( Image image), I met problem. I cann't new Image("--.gif"). I don't know how to create a Image object using a string(file name). I try to use ImageIcon , but it is not image obj. Thanks. Gary
According to the documentation setIconImage does the following: Sets the image to be displayed in the minimized icon for this frame. Not all platforms support the concept of minimizing a window.
So,
1) It does not change the icon in the top-left corner
2) It does not work on all platforms. -
How to use generic webservice methods in java
Hi,
I am working on jdk1.5 and axis web service client version 1.3.
I am calling webservice which developed in wcf service using .net ,Extesion like .svc?asmx
input of webservice method is generic like list<IEmployee>
When i try to call in cleint side , it is showing like object[] array.
but it has to show like list<object>
May i know solution for this.
Thanks,
MuraliHi konanki,
Web services are using SOAP as protocol and SOAP has been designed for interoperability between computers installed with different platforms : Java, .Net, PHP, ...
As List<IEmployee> or List<Object> are specific to Java language, they are translated in a way understandable for other platforms. Just have a look to your WSDL file. -
I'm trying to learn how to write my own methods and couldn't figure out what the problem is with the codes below.
public class methodtry {
public static int myMethod1 (int a)
a += 10;
System.out.println("*** Method1, a is : " + a);
return (a);
int b = myMethod1(3);
System.out.println(b);
}it gives identifier expected error in the last System.out.println(b); part..
Edited by: SwmeRt on Mar 26, 2009 7:27 AMYou can't have free-floating statements like System.out.println(b); just inside a class. Why not put that statement in a method:
public class MethodTry {
public static int myMethod1(int a) {
a += 10;
System.out.println("*** Method1, a is : " + a);
return a;
public static void main(String[] args) {
int b = myMethod1(3);
System.out.println(b);
}Start here: [http://java.sun.com/docs/books/tutorial/java/index.html] -
Calling javascript method from java
Hi this is sri,
I have one doubt on Java Applets "how to call the javascript method from java Applet".Can u give me the complete sample code for one program(both java applet file and html file also)because i can easily understand the programming flow.
Thanks ,
Srilekha.It's an extremely important skill to learn how to search the web. Not only will it increase your research and development talents, it will also save you from asking questions that have already been answered numerous times before. By doing a little research before you ask a question, you'll show that you're willing to work and learn without needing to have your hand held the entire time; a quality that is seemingly rare but much appreciated by the volunteers who are willing to help you.
If you've done the research, found nothing useful, and decide to post your question, it's a great idea to tell us that you've already searched (and what methodologies you used to do your research). That way, we don't refer you back to something you've already seen.
To get you started, here's a link...
http://www.google.com/search?q=call+java+from+javascript -
How I build my own libraries of classes/methods in java ?
How I build my own libraries of classes/methods in java ? how then I refer a functionX() (i mean method) in LibraryX ? can you give a short/brief example of a library with a class with a method and a main method of normal class calling this method (of external's added library's) ?
Just another cross poster.
[http://www.java-forums.org/new-java/12389-how-i-build-my-own-libraries-classes-methods-java.html]
db
edit And [http://forums.java.net/jive/thread.jspa?messageID=305387]
Edited by: Darryl.Burke -
How can i access the methods if i only got the java class file?
just like what the topic said...i would like to ask if i only got the class file of java without API documentation. how can i know what method is included ?
thanks a lot.
my email address is : [email protected]Class.getMethods()
throws SecurityException
Returns an array containing Method objects reflecting all the public member methods of the class or interface represented by this Class object, including those declared by the class or interface and and those inherited from superclasses and superinterfaces. The elements in the array returned are not sorted and are not in any particular order. This method returns an array of length 0 if this Class object represents a class or interface that has no public member methods, or if this Class object represents an array class, primitive type, or void. -
How i can make my own connection in java source of a jsp page
How i can make my own connection in java source of a jsp page (How to get connection from JNDI datasource address) ?
imagine that i have a rowset in a web page , now i want to do some operation using
plain JDBC , so i will need a connection object.
I tried to get one of my rowsets connection but it return null ?
what is best way to retrive a connection from JNDI datasource that we define for our project?
for example if i have
myRowSet.setDataSourceName("java:comp/env/jdbc/be");
in web page constructor
now i want a pure connection from the same datasource ? JNDI
Thank youIt is not hard to get your own connection from datasource.
in your case you need to do like the the following code.
i provide sample to show you how to catch the exception and create an statement .
Connection con =null;
try{
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/be");
con = ds.getConnection();
java.sql.Statement st =con.createStatement();
}catch(SQLException sqlex){
sqlex.printStackTrace();
sqlex.getNextException().printStackTrace();
catch(NamingException nex){
nex.printStackTrace();
hth
Masoud kalali -
How to know whether a method is thread-safe through the java-doc?
In some book, it says that SAXParserFactory.newSAXParser() is thread-safe,but in the java-doc,it doesn't say that.
newSAXParser
public abstract SAXParser newSAXParser()
throws ParserConfigurationException,
SAXExceptionCreates a new instance of a SAXParser using the currently configured factory parameters.
Returns:
A new instance of a SAXParser.
Throws:
ParserConfigurationException - if a parser cannot be created which satisfies the requested configuration.
SAXException - for SAX errors.
I want to know, how to know whether a method is thread-safe?System.out is a PrintStream object. None of the methods there use the synchronized modifier, but if you look in the source code, you will find out it is thread-safe, because it will use synchronized blocks whenever it writes some text.
The source code is in the src.jar file which you can extract.
I didn't find any comments about that PrintStream is thread-safe in the API. -
How to create search function (af:query) using method in java
hi All..:)
i got problem with search custom (af:query), how to create search function/ af:query using method in java class?
anyone help me....
thx
agungdmtHi,
download the ADF Faces component demo sources from here: http://www.oracle.com/technetwork/testcontent/adf-faces-rc-demo-083799.html It also has an example for creating a custom af:query model
Frank -
How to use " toFront() " method in java application and in which package or
How to use " toFront() " method in java application and in which package or class having this toFront() method.if anybody know pl. send example.
The API documentation has a link at the top of every page that says "Index". If you follow that and look for toFront(), you will find it exists in java.awt.Window and javax.swing.JInternalFrame.
To use it in a Java application, create an object x of either of those two classes and write "x.toFront();". -
(261680070) Q SYNCH-11 How do my web service methods accees EJBs and java classes?
A<SYNCH-11> How do my web service methods accees EJBs and java classes?
A<SYNCH-11> It is simple to use java classes, just do it as you would ordinarily.
The .jws file really contains a simple class so you can program with it in the same
way that you would use a regular Java class.
To use an EJB you can go and access it directly as you would with any EJB remote
client (lookup home stub, create, etc) or if the EJB is deployed to WLS you can use
a control to provide a very simple wrapper to the EJB. We will see this in detail
on Thursday in the ADVC module.Futher information about the possibility of callback:
It may be possible for a synchronous only web service (i.e. MS .net) to even paticipant
in the callback functionality of asynchronous web services. If the client implements
the appropriate methods for the callback but listens for them on a different port
or binding than the SOAP request, then web service may be able to build a response
if the client's "callback URL" is submitted as the beginning part of a conversation.
Watch the BEA developer forum (http://dev2dev.bea.com) for more information about
this approach and other tips and techniques for building web services.
"Adam FitzGerald" <[email protected]> wrote:
>
Q<SYNCH-03> I heard that MS .net only implements synchrnonus method? If
this is true.
Does it means my async methods will only work with J2EE clients?
A<SYNCH-03> I do not know the limitations of .net but let me point out that
is very
difficult to provide asynchronous web service method invocation (this is
different
from an asynchronous web service). HTTP as a general communication protocol
is based
on a request and response paradigm so your client libraries will mostly
likely be
expecting a response even if it is empty (check the asynchronous example
from today
to see that the start method still returns an empty response). You must
distinguish
this from the notion of an asynchronous web service which is a business
operation
that occurs on the server whose return value/result is not directly associated
with
building response to the client. An asynchronous web service can (and generally
will)
be started and stopped with web service operations that are invoked synchronously.
Thus MS .net clients can still be client to WLS hosted web services. -
How can i deprecate a superclass method ?
Hi all,
How can i deprecate a superclass method from a subclassQthe OP: That makes no sense. It is by definition valid to call that method because it is valid for the superclass, and every instance of the subclass is also an instance of the superclass.
Maybe you are looking for
-
Error while Deploying JAR file using SDM in EP system
Hi, As per below mention URL for Installing and Deploying the Enrichment Controller ,I am confuguring MDM Enrichment Controller in EP system http://help.sap.com/saphelp_nwmdm71/helpdata/en/44/aa411ce9d57454e10000000a11466f/frameset.htm So, as per the
-
This happened after I was hacked.
-
How to batch password protect files without having to click "Save" for each file
Hi! I need help. I'm trying to batch password protect a few hundred PDF files. I've setup an action for this, however when I run the action, Acrobat asks me to save each file. Isn't this kind of defeating the purpose of batch processing? Adrian
-
Looking for a Task/ToDo application that syncs with iCal
Can anyone recommend a good ToDo application that has due dates for tasks along with the capability to sync with iCal tasks? I just switched to the iPhone from Blackberry and I would love to have the same task features that I had with my Curve.
-
I would like to know if it is possible to change my ipod touch screen.