How to put a user defined class in Web dynpro

How and where can we create some user defined classes?
For example i wanted to create some utility classs for my project. Under what folder should i create this?

Please create the .java files under src folder of the project
Go to PackageExplorer->expand the project->select src/packages and create the package under this and create java file.
Regards, Anilkumar

Similar Messages

  • Call a user defined method in web dynpro from interactive forms

    Hi All,
    how to call a user defined method in web dynpro java, when a selecting value from drop down list which is in interactive forms by adobe
    thanks.
    Edited by: venkat99 on May 24, 2010 4:52 PM

    Well, you can use F4 help, of course, check here: http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/a1900622ec062be10000000a42189d/frameset.htm
    You need to select the value first and then use the submit button, which is mapped to the WD action submit (you have to set this up in WD designer!!). To use the submit button for more actions, you need to use something like a hidden field, where the value is set according to the action you want to do with your submit button. The submit sends this value back to WD, where you can switch the program code according to the value.
    Otto
    p.s.: and maybe this blog can help: /people/shruti.rathour/blog/2008/02/07/uploading-sap-interactive-form-on-the-abap-webdynpro-view

  • User defined class  for Web Services

    I am trying to use the Web Service Publishing Wizard to publish
    a class as a web service. The wizard will not allow me to select
    the method I wish to publish. When I click on the "Why Not?"
    button the message says:
    "One or more parameters did not have an XML Schema mapping
    and/or serializer specified"
    I use user defined classes as parameters of the methods of the service web.
    How cam i install this web service on "Oracle J2EE Web services"?

    If you use Java Beans (or single dimension arrays of Java Beans) that implement the java.io.serializable interface as per this article:
    http://otn.oracle.com/tech/webservices/htdocs/samples/customtype/content.html
    then Oracle9iAS will handle the publishing process of custom data types. The publishing wizard in Oracle9i JDeveloper 9.0.2 doesn't support this yet, but the link in the article to the JDeveloper help gives a fairly straightforward workaround. This workaround will be eliminated in Oracle9i JDeveloper 9.0.3 (due late August).
    Does representing your parameters as Java Beans work for your problem?
    Mike.

  • How to import user defined class in UIX page?

    Does anyone know how to import user defined class in UIX page so that the class can be called in the javascript in the UIX ?
    Thks & Rgds,
    Benny

    what you are referring to is not javascript.
    it is JSP scriptlets. These are very different.
    In order to keep a strict separation between View and Controller, it is not possible to run arbitrary java code from within your UIX code.
    However, you can run java code from within a UIX event handler; see:
    http://otn.oracle.com/jdeveloper/help/topic?inOHW=true&linkHelp=false&file=jar%3Afile%3A/u01/app/oracle/product/IAS904/j2ee/OC4J_ohw/applications/jdeveloper904/jdeveloper/helpsets/jdeveloper/uixhelp.jar!/uixdevguide/introducingbaja.html
    event handler code is run before the page is rendered.

  • How can 1 make an object of user defined class immutable?

    Hi All,
    How can one make an object of user defined class immutable?
    Whats the implementation logic with strings as immutable?
    Regards,

    Hi All,
    How can one make an object of user defined class
    immutable?The simple answer is you can't. That is, you can't make the object itself immutable, but what you can do is make a wrapper so that the client never sees the object to begin with.
    A classic example of a mutable class:
    class MutableX {
        private String name = "None";
        public String getName() {
            return name;
        public void setName(String name) {
            this.name = name;
    }I don't think it's possible to make this immutable, but you can create a wrapper that is:
    class ImmutableX {
        private final MutableX wrappedInstance;
        public ImmutableX (String name) {
            wrappedInstance = new MutableX();
            wrappedInstance.setName(name);
        public String getName() {
            return wrappedInstance.getName();
        // Don't give them a way to set the name and never expose wrappedInstance.
    }Of course, if you're asking how you can make your own class immutable then the simple answer is to not make any public or protected methods that can mutate it and don't expose any mutable members.
    Whats the implementation logic with strings as
    immutable?
    Regards,I don't understand the question.

  • How to display a  User defined  symbol when using addLinearFeature

    Hi ,
    We are displaying our DataBase spatial data in the form of image on to the browser .
    With the help of MapViewer mv.addLinearFeature i am able to draw lines on to it .
    I have created styles in MapBuilder for our userdefined symbols and added to Mapviewerconfig file .
    Now as per our requirement we need to put our user defined symbols in the middle of the line when a line is drawn using addLinearFeature
    For example Like This :
    Assume that (::) this is our symbol .
    Please tell me how to do this .

    You could use the marker (user defined symbol) as a label for the line. Something like the highways theme/style definition in the mvdemo example where the highway shield is a marker.
    SQL> select styling_rules from user_sdo_themes where name='THEME_DEMO_HIGHWAYS';
    STYLING_RULES
    <?xml version="1.0" standalone="yes"?>
    <styling_rules >
    <rule >
    <features style="L.PH"> </features>
    <label column="ROUTEN" style="M.SHIELD1"> 1 </label>
    </rule>
    </styling_rules>
    SQL> select definition from user_sdo_styles where name='M.SHIELD1';
    DEFINITION
    <?xml version="1.0" standalone="yes"?>
    <svg width="1in" height="1in">
    <desc></desc>
    <g class="marker" style="width:20;height:18;font-family:sansserif;font-size:9pt
    ;fill:#ffffff;text-style:[t.shield1]">
    <image x="0" y="0" width="9999" height="9999" type="gif" href="dummy.gif"/></g>
    </svg>
    SQL>
    The content of ROUTEN (column/attribute) is displayed in the marker (m.shield1).
    Will something similar work or is your requirement different?
    If its to simply display a marker (i.e. your user defined symbol which is in the database user_sdo_styles view) somewhere along the line then use a line style definition like (see Appendix A of the user guide):
    <?xml version="1.0" standalone="yes"?>
    <svg width="1in" height="1in">
    <g class="line" style="fill:#33a9ff;stroke-width:4;
    marker-name:M.IMAGE105_BW;marker-position:0.15;marker-size=8">
    <line class="parallel" style="fill:red;stroke-width:1.0"/>
    </g>
    </svg>
    This will display the marker M.IMAGE105_BW at about 0.15th of the line length.
    If you want that marker repeated at fixed intervals (0.15 of line length in the following) then use
    <?xml version="1.0" standalone="yes"?>
    <svg width="1in" height="1in">
    <g class="line" style="fill:#33a9ff;stroke-width:4;
    marker-name:M.IMAGE105_BW;marker-position:0.15;marker-size=8;multiple-marker=true">
    <line class="parallel" style="fill:red;stroke-width:1.0"/>
    </g>
    </svg>

  • Cannot comile user defined classes

    Hello i have a problem on compiling user defined classes .
    example
    file x.java
    public class x{
    file y.java
    import x;
    public class y{
    I first compile x.java and everything is OK .
    Then i compile y.java and the compiler gives the folowing
    y.java:2: '.' expected
    import y
    I have tried to put the classes on a package and added the folowing line yo each file
    import /home/bill/test
    Then i puted the java files on that dir
    and compiled with
    javac -classpath /home/bill/test y.java
    AGAIN THE SAME
    y.java:2: '.' expected
    import y
    WHAT I DO WRONG PLEASE HELP!!!!!!!!!!!!

    1. Since J2SDK 1.4, you can not import classes that are in the default (or unnamed) package. You are getting the error because the compiler expects something after y like y.*;
    2. You do not need to import classes that are in the same package, and all classes in the default package are in the same package.
    In your case, your classes are in the default package so remove the import statement.

  • User defined class objects for a ADF component (button,inputfield)

    How do I define a user defined class object for ADF objects?
    My requirement is that when I do a modification to the class object, it should get reflectected to all the instances on my page.
    E.g:- I'm having class object clsInputField, and all my input fields in my pages are based on this object. So when I change clsInputField it should get reflected to all my controls based on this class object.
    Please help!!!

    Hi Timo,
    In our client server environment, we have a custom control for managing the zip code (used a Custom InputText field which extends the actual TextField) . All zip code specific validations are written in this custom class. In our application many of the pages uses this Custom component. So if any of the zipcode specific behaviour changes, we could implement this by only changing the Custom InputText field class.
    We need to implement this behaviour in our ADF applications. Please advise.
    Thanks,
    Vishnu

  • Clone a user defined class..

    Hello all,
    just curious to know how can I copy/clone an instance of a class that I cant change/rebuild? I have gone thru the forums and I understand that to be able to clone a class-instance, the class itself should implement Cloneable or apply the deep-copy technique as mentioned in one of the JavaWorld pages but, as I said, what happens in a case where one has no access to the class code?
    however, if these are the only ways to have a user defined class cloned then, it should be possible to avoid a clone/copy situation... I dont know how. Does anyone else know?
    I have tried with few examples to understand what a shallow/deep copy is.
    the curiosity is terribly grown once I heard from one of my colligues that this is very much (easily) possible in c++ and delphi!!!
    please clarify. thanks in advance!

    Object.clone() is native and create a copy by ignoring all access checks (native code have access to everything by default), therefore copying all fields in the new object. All you have to do is implements Cloneable. Overload the method if you want it to be public and then just call super.clone() or if you don't want to copy everything you have to deal with it manually, copy all the fields you need. If you don't have access to all members you have to use reflection and suppress the access checks.

  • An array of vectors that contain a user defined class gives: warning: [unch

    I've read two tutorial on Generics and still don't get everything.
    Anyway I have a user defined class called a Part. I have some Vectors of Part objects, and these Vectors of Part objects are stored in an Array of Vectors.
    Amazingly, I got all the checking right so far; however, am now trying to loop through my Array, an pass the individual Vectors to a method:
    //create a single list of all parts numbers
    //add the part number from each vector/part into a new vector of strings
    for(int y=0; y < ArrayOfPartVectors.length; y++) {
        Vector<Part> vTemp = ArrayOfPartVectors[y];
        vAllPartNumbers.addAll(pm.getPartNumbersFromVector(vTemp));
    }I get the following warning:
    com\gdls\partMatrix\PartMatrix.java:75: warning: [unchecked] unchecked conversion
    found   : java.util.Vector
    required: java.util.Vector<com.gdls.partMatrix.Part>
                                    Vector<Part> vTemp = VectorArrayParts[y];
                                                                         ^
    1 warningNow I have put the 'check' (<Part>) in every concievable spot in that statement, and I get a compler error now instead of a warning.
    Any guidance would be appreciated.
    Thank you,

    The problem is not with Vector. If you want to use it that's fine.
    You could also want to use ArrayList because the class is roughly equivalent to Vector, except that it is unsynchronized.
    But your problem is that arrays and generics don't mix well as previously mentioned in the first reply.
    You did not specify the type of ArrayOfPartVectors but I guess it is Vector[], not Vector<Part>[], right?
    So you'll have an unchecked warning when doing the conversion from Vector to Vector<Part> in the assignment within the loop.
    Maybe you tried to use a ArrayOfPartVectors of type Vector<Part>[] instead but found it impossible to create it with new
    You can do it with Array.newinstance() but you'll get an unchecked warning at this line instead of later.
    So mixing generics and arrays will allways result in warnings.
    You should read: [url http://www.angelikalanger.com/Articles/Papers/JavaGenerics/ArraysInJavaGenerics.htm]Arrays in Java Generics.
    Regards

  • How to let the user define the colors for each plots in the graph (I use LabVIEW 7)?

    How to let the user define the colors for each plots in the graph (I
    use LabVIEW 7)?

    Hi,
    Take a look at this example, it uses property nodes to select tha
    active plot and then changes the color of that plot.
    If you want to make the number of plots dynamic you could use a for
    loop and an array of color boxes.
    I hope this helps.
    Regards,
    Juan Carlos
    N.I.
    Attachments:
    Changing_plot_color.vi ‏38 KB

  • How to add a User Defined Field in OUBI

    Dear Experts
    I would like to find out how to add a user defined field into OUBI from a Customer Care & Billing source system. If anyone could list the steps involved or point me toward a source of documentation that sets out the steps involved it would be much appreciated.
    Cheers
    Tim

    Is there anyone out there who has had experience using OUBI with CC&B?

  • How to Add a user defined field in transaction-PKMC?

    Could anyone tell me the step by step process of how to add a user defined field in transaction-PKMC?
    Moderator message: please do some research before posting.
    Edited by: Thomas Zloch on Jan 16, 2012

    Is there anyone out there who has had experience using OUBI with CC&B?

  • How can I use User-Defined Aggregate Functions in Timesten 11? such as ODCI

    Hi
    we are using Timesten 11 version and as per the documentation, it doesn't support User-Defined Aggregate Functions.
    So we are looking for alternatives to do it. Could you please provide your expert voice on this.
    Thanks a lot.
    As the following:
    create or replace type strcat_type as object (
    cat_string varchar2(32767),
    static function ODCIAggregateInitialize(cs_ctx In Out strcat_type) return number,
    member function ODCIAggregateIterate(self In Out strcat_type,value in varchar2) return number,
    member function ODCIAggregateMerge(self In Out strcat_type,ctx2 In Out strcat_type) return number,
    member function ODCIAggregateTerminate(self In Out strcat_type,returnValue Out varchar2,flags in number) return
    number
    How can I use User-Defined Aggregate Functions in Timesten 11? such as ODCIAggregateInitialize ?

    Dear user6258915,
    You absolutely right, TimesTen doesnt support object types (http://docs.oracle.com/cd/E13085_01/doc/timesten.1121/e13076/plsqldiffs.htm) and User-Defined Aggregate Functions.
    Is it crucial for your application? Could you rewrite this functionality by using standart SQL or PL/SQL?
    Best regards,
    Gennady

  • How to add a user defined HTTP header field?

    Hi, everyone!
    I want to add a user defined HTTP header field to a HTTP
    response header.
    I use the following statements in testHeader.jsp
    response.addHeader("myheader", "123");
    response.sendRedirect("middleHeader.jsp");
    in middleHeader.jsp,
    out.print(request.getHeader("myheader"));
    But the output in middleHeader.jsp is null!
    How to add a user defined HTTP header field to a HTTP
    response header? Are there some sample codes?
    Cheers,
    George

    the send redirect actually creates a new request (through the client) and thus a new response
    thus the headers you set in the response are gone for the next request/response
    You can try servletDispatcher.forward

Maybe you are looking for