Adding componets to a new class

I've created a new class for BidFrame Jframe, and would like to get contents from the previous method to use, or even start afresh. But when i declare an item, it still doesn't work. What am i doing wrong? The problem lies in BidFrame extend JFrame....if the code is taken out of the two brackets, everything else works. Please help
import java.awt.*;
import java.awt.event.*;
import java.text.DecimalFormat;
import javax.swing.*;
import javax.swing.border.*;
import java.lang.*;
public class EasyAuction extends JFrame
     // JPanel for login window
             private JPanel  biddingJPanel, oneJPanel, welcomeJPanel, registertwoaJPanel;
             private JLabel titleJLabel, buyernameJLabel, buyerpasswordJLabel, buyerJLabel, sellernameJLabel, sellerpasswordJLabel, sellerJLabel;
             private JButton buyerJButton, sellerJButton, registeroneJButton, registertwoJButton;
             private JTextField buyernameJTextField, buyerpasswordJTextField, sellernameJTextField, sellerpasswordJTextField;
             private JComboBox itemJComboBox;
             public JPanel BidFrameJFrame;
//Publics JPanels
//public JPanel registertwoJFrame;
            //contentPane
             public Container contentPane, c;
             //no argument constructor
             public EasyAuction()
                  createUserInterface();
             //create and position components
             private void createUserInterface()
                 //get contentPane
                  contentPane = getContentPane();
                  c = getContentPane();
               //and set layout to null
                  contentPane.setLayout(null);
                  c.setLayout(null);
               //goes to public void welcome
                  login();
                  //set properties of applications window
                  setTitle( "Easy Auction" ); // set JFrame's title bar string
                setSize( 300, 200);   // set width and height of JFrame
                setVisible( true );    // display JFrame on screen
             } // end method createUserInterface
             public void login(){
                       //setup oneJPanel
                       oneJPanel = new JPanel();
                       oneJPanel.setLayout( new FlowLayout() );
                       oneJPanel.setBounds(0,0, 300,200);
                       oneJPanel.setVisible(true);
                     // setup buyernameJLabel
                     buyernameJLabel = new JLabel();
                     buyernameJLabel.setText("Buyer Name");
                     oneJPanel.add( buyernameJLabel );
                     //setup nameJTextField
                     buyernameJTextField = new JTextField(15);
                    buyernameJTextField.
                    setEnabled(true);
                    oneJPanel.add( buyernameJTextField );
                    //setup buyerpasswordJLabel
                    buyerpasswordJLabel = new JLabel();
                    buyerpasswordJLabel.setText("Pass word  ");
                    oneJPanel.add( buyerpasswordJLabel);
                    //setup buyerpasswordJTextField
                    buyerpasswordJTextField = new JTextField(15);
                    buyerpasswordJTextField.setEnabled(true);
                    oneJPanel.add( buyerpasswordJTextField);
                    //setup buyerJLabel
                    buyerJLabel = new JLabel();
                    buyerJLabel.setText("Click on Buyer Button");
                    oneJPanel.add(buyerJLabel);
                    //setup buyerJButton
                    buyerJButton = new JButton ();
                    buyerJButton.setText("Buyer");
                    buyerJButton.setBackground( Color.YELLOW );
                    oneJPanel.add( buyerJButton );
                    buyerJButton.addActionListener(
                         new ActionListener(){
                              public void actionPerformed( ActionEvent event )
                                   BidFrame f = new BidFrame();
                               f.setVisible(true);
                    //setup registeroneJButton
                    registeroneJButton = new JButton ();
                    registeroneJButton.setText ("Register");
                    registeroneJButton.setBackground ( Color.ORANGE);
                    oneJPanel.add( registeroneJButton);
                    //setup sellernameJLabel
                    sellernameJLabel = new JLabel();
                    sellernameJLabel.setText("Seller Name");
                    oneJPanel.add( sellernameJLabel);
                    //setup sellernameJTextField
                    sellernameJTextField = new JTextField(15);
                    sellernameJTextField.setEnabled(true);
                    oneJPanel.add(sellernameJTextField);
                    //setup sellerpasswordJLabel
                    sellerpasswordJLabel = new JLabel();
                    sellerpasswordJLabel.setText("Pass word  ");
                    oneJPanel.add( sellerpasswordJLabel );
                    //setup sellerpasswordJTextField
                    sellerpasswordJTextField = new JTextField(15);
                    sellerpasswordJTextField.setEnabled(true);
                    oneJPanel.add( sellerpasswordJTextField );
                    //setup sellerJLabel
                    sellerJLabel = new JLabel();
                    sellerJLabel.setText("Click on Seller Button");
                    oneJPanel.add(sellerJLabel);
                    //setup sellerJButton
                    sellerJButton = new JButton ();
                    sellerJButton.setText("Seller");
                    sellerJButton.setBackground( Color.YELLOW );
                    oneJPanel.add( sellerJButton );
                    //setup registertwoJButton ();
                    registertwoJButton = new JButton ();
                    registertwoJButton.setText("Register");
                    registertwoJButton.setBackground( Color.ORANGE);
                    oneJPanel.add( registertwoJButton );
                    contentPane.add(oneJPanel);
                return;          
          public class BidFrame extends JFrame
                  oneJPanel.setVisible(false);
               biddingJPanel = new JPanel ();
     biddingJPanel.setLayout( new FlowLayout() );
          biddingJPanel.setBounds(0, 0, 300,200);
          biddingJPanel.setVisible(true);
          setup itemJComboBox
          itemJComboBox = new JComboBox( );
          biddingJPanel.add (itemJComboBox);
          contentPane.add(biddingJPanel);
          // main method
             public static void main( String[] args )
                EasyAuction application = new EasyAuction();
                application.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
             } // end method main
}//ends public class Bidding 

Normally you would use a modal JDialog, not a JFrame, to gather additional information.
If you need data to display in the dialog then just pass the data when you create the dialog:
BidDialog dialog = new BidDialog(parameter1, parameter2, ....);
dialog.setModal( true );
dialog.setVisible(true);

Similar Messages

  • Adding a new class with Creator (really simple problem i think..)

    I added a new class to my project with creator...
    class name is "CambiaNote" and there's a method called Cambia
    tabellaselezionabile is my project(package)
    I tried to run everything but It gave me an error:
    Exception Details:  org.apache.jasper.JasperException
      Error getting property 'cambia' from bean of type tabellaselezionabile.Page1I don't know, but the word cambia don't exists at all in my code... or it is not case sensitive..?
    please help, thanks

    typo: correct Paint() to paint()

  • Adding new class in already created DIR

    I created a DIR and it is in released staus .
    I change the status from released to correction. One class is already added in the DIR. I want to add a new class in that DIR. but the system won't allow me. Message appearing "Multiple classification not allowed"
    Can anyone help?
    Its urgent

    Message appearing "Multiple classification not allowed"
    Propose you setup a Class Hierarchy to meet your requirement.Herein,you would need to create a parent class and assign subordinate classes to it.
    For Eg: Assume you have created classes Class ABC and Class PQR and you need to assign both of these to a Document Type.When you attempt to do this, the system throws up a message  "Multiple classification not allowed". Hence,you need to create another new class Class XYZ and assign both the previously created classes Class ABC and Class PQR to it. (Path:SAP Menu> CA components> Classification S/m > Assignment > Assign objects/Classes to classes)
    Once done,you would have to assign Class XYZ to the required Document Type.This will ensure that the required classes are assigned and reflect in the Document Type.
    Regards,
    Pradeepkumar Haragoldavar

  • Added new classes

    Hi everybody,
    I am a Java beginner and i would like to know the good way to put new classes i want to use.
    I would like to use a class named "netscape.javascript.JSObject", this one is located in a .zip file and i put it in my Java home dir (c:\j2sdk1.4_03 (That is also in my CLASSPATH)) but it does not work at compilation time (does not find package "netscape.javascript.JSObject")!!!
    If i dezip all classes from .zip file, then it creates all directory structure from this .zip file and especially netscape/javascript/*.* branch in my c:\j2sdk1.4_03 directory and this way it compiles.
    In fact netscape/javascript/ dir contains two classes JSObject and JSException (those classes need certain other classes include in the same .zip file so i dezip all classes !!)
    I though that a .zip file was only needed to use class (if CLASSPATH is correctly set)
    1) Is there a good way (path) to add classes we wanted to use ?
    2) It compiles but crash in run time ....
    here is a little code sample to test:
    import netscape.javascript.JSObject;
    public static class Test{
    public static void main(String[] args){
    try{
    Class c = Class.forName("netscape.javascript.JSObject");
    catch(ClassNotFoundException e){
    System.err.println(e);
    and i receive the message when i want to run it ...
    "Exception in thread "main" java.lang.UnsatisfiedLinkError: IIDFromString
    at com.ms.com._Guid.IIDFromString(Native Method)
    at com.ms.com._Guid.set(_Guid.java)
    at com.ms.com._Guid.<init>(_Guid.java)
    at netscape.javascript.JSObject.<clinit>(JSObject.java)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:140)
    at lpa.examples.GrepReader$Test.main(GrepReader.java:38)"
    Is this a version problem ?
    I hope you understand my problem.
    Can somebody help me ?
    Thanks for your help
    PS ; Sorry for my probably bad english but it is not my native language ...

    For JAR and ZIP files, you need to add the file to the classpath, not just the parent directory.

  • How to add new class to existing DC (Web Dynpro project)

    Hi,
    How can I add new class to an existing DC (Web Dynpro project)?
    I tried adding it using File - New - Other - Java - Class, but after a build of the DC the new class (and its contents    ) was completely removed.
    Then I created a new DC (java project) and created a new class in that DC. This went fine, but I got into problems because of circular referencing between the new & the old DC, so no build was possible.
    This can't be difficult, does somebody knows how to do it?
    My temporary solution is to add the classdefinition to an exisiting .java file. Very ugly.
    Thanks,
    Jeroen

    Hi Jeroen,
    where did you create the class? If the *.java file is placed in the src/packages folder it should not be deleted by a build. (I suspect you created it in the gen_wdp folder?)
    Regards,
    Marc

  • Adding a JPanel from one class to another Class (which extends JFrame)

    Hi everyone,
    So hopefully I go about this right, and I can figure out what I'm doing wrong here. As an exercise, I'm trying to write a Tic-Tac-Toe (TTT) game. However, in the end it will be adaptable for different variations of TTT, so it's broken up some. I have a TTTGame.java, and TTTSquareFrame.java, and some others that aren't relavent.
    So, TTTGame:import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import joshPack.jUtil.*;
    public class TTTGame extends JFrame
         private Integer sides = 3;
         private TTTSquareFrame mainSquare;
         private TTTGame newGame;
         private Container contents;
         private JPanel mainSquarePanel, addPanel;
         public static void main(String [] args)
              TTTGame newGame = new TTTGame();
              newGame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         public TTTGame()
              super("Tic-Tac-Toe");
              contents = getContentPane();
              contents.setLayout(new FlowLayout());
              addPanel = startSimple();
              if(!addPanel.isValid())
                   System.out.println("Something's wrong");
              contents.add(addPanel);
              setSize(300, 300);
              setVisible(true);
         public JPanel startSimple()
              mainSquare = new TTTSquareFrame(sides);
              mainSquarePanel = mainSquare.createPanel(sides);
              return mainSquarePanel;
    }and TTTSquareFrame:import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import joshPack.jUtil.Misc;
    public class TTTSquareFrame
         private JPanel squarePanel;
         private JButton [] squares;
         private int square, index;
         public TTTSquareFrame()
              System.out.println("Use a constructor that passes an integer specifying the size of the square please.");
              System.exit(0);
         public TTTSquareFrame(int size)
         public JPanel createPanel(int size)
              square = (int)Math.pow(size, 2);
              squarePanel = new JPanel();
              squarePanel.setLayout(new GridLayout(3,3));
              squares = new JButton[square];
              System.out.println(MIN_SIZE.toString());
              for(int i = 0; i < square; i++)
                   squares[i] = new JButton();
                   squares.setRolloverEnabled(false);
                   squares[i].addActionListener(bh);
                   //squares[i].setMinimumSize(MIN_SIZE);
                   squares[i].setVisible(true);
                   squarePanel.add(squares[i]);
              squarePanel.setSize(100, 100);
              squarePanel.setVisible(true);
              return squarePanel;
    }I've successfully added panels to JFrame within the same class, and this is the first time I'm modularizing the code this way. The issue is that the frame comes up blank, and I get the message "Something's wrong" and it says the addPanel is invalid. Originally, the panel creation was in the constructor for TTTSquareFrame, and I just added the mainSquare (from TTTGame class) to the content pane, when that didn't work, I tried going about it this way. Not exactly sure why I wouldn't be able to add the panel from another class, any help is greatly appreciated.
    I did try and cut out code that wasn't needed, if it's still too much let me know and I can try and whittle it down more. Thanks.

    Yea, sorry 'bout that, I just cut out the parts of the files that weren't relevant but forgot to compile it just to make sure I hadn't left any remnants of what I had removed. For whatever it's worth, I have no idea what changed, but something did and it is working now. Thanks for your help, maybe next time I'll post an actual question that doesn't somehow magically solve itself.
    EDIT: Actually, sorry, I've got the panel working now, but it's tiny. I've set the minimum size, and I've set the size of the panel, so...why won't it respond to that? It almost looks like it's being compressed into the top of the panel, but I'm not sure why.
    I've compressed the code into:
    TTTGame.java:
    import java.awt.*;
    import javax.swing.*;
    public class TTTGame extends JFrame
         private Integer sides = 3;
         private TTTSquareFrame mainSquare;
         private TTTGame newGame;
         private Container contents;
         private JPanel mainSquarePanel, addPanel;
         public static void main(String [] args)
              TTTGame newGame = new TTTGame();
              newGame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         public TTTGame()
              super("Tic-Tac-Toe");
              contents = getContentPane();
              contents.setLayout(new FlowLayout());
              mainSquare = new TTTSquareFrame(sides.intValue());
              contents.add(mainSquare);
              setSize(400, 400);
              setVisible(true);
    }TTTSquareFrame.java
    import java.awt.*;
    import javax.swing.*;
    public class TTTSquareFrame extends JPanel
         private JButton [] squares;
         private int square, index;
         private final Dimension testSize = new Dimension(50, 50);
         public TTTSquareFrame(int size)
              super();
              square = (int)Math.pow(size, 2);
              super.setLayout(new GridLayout(size, size));
              squares = new JButton[square];
              for(int i = 0; i < square; i++)
                   squares[i] = new JButton();
                   squares.setMinimumSize(testSize);
                   squares[i].setVisible(true);
                   super.add(squares[i]);
              setSize(200, 200);
              setVisible(true);
    I've made sure the buttons are smaller than the size of the panel, and the panel is smaller than the frame, so...
    Message was edited by:
    macman104

  • Creating a new class type in the classification system

    We are wanting to classify objects in a ZTABLE.  We have a home grown system for defining our customer requirements that is used as the way for the sales people to communicate to the engineering dept. what the customer wants.  A new need has come up that seems to be a good fit to be able to classify our customer requirements.  I have been trying to create a new class type that is linked to our ZTABLE.  However, even though it looks like we should be able to do this I have not been able to do it.  I ran across some documentation that seems to imply that adding a new class type used to be possible, but no longer is.
    Can anyone verify that creating a new class type is still possible to do?  We are on ECC 5.0.

    Can someone point me in the right direction as to how to create my own Class Type.  Is there some documentation as to how to dow this? Other than what is fould in SPRO I have tried and tried but no joy for me. 
    This is what I have done so far:
    in SPRO:
    1) Created an Object Key for my table ZLO_CUSTREQ.  This table has a primary key of CRQNR (custormer requirements number which is I created)  The documentation says that I need to add this key field to structure RMCLY (I did that).  BUT, it also says the RMCLY is embeded in structure RMCLX and it is not.  Do I need to modify RMCLX to add RMCLY as an append structure?
    2) Went to Maintain Object types and Class types and selected my table. Double clicked on Class Types in the Dialog Structure tree, which displayed an empty list of class types. 
    I then Clicked New Entries button and filled in the fields: Class type(Z10), Description(Customer Requirements), Table(ZLO_CUSTREQ).  in the Screens group I selected Keywords and Characteristics.  In the Functions group I selected: Standard class type and Multiple classifications. I then Clicked the back arrow.  This returned me to the Class Types list which now displayed my new class type. 
    When I click the save button it kicks me out the the SPRO menu screen and I get the warning message "Class type Z10 does not have the classification status incomplete system" . 
    Then, it won't let me re-enter the Maintain Object types and Class Types screen due to an error "View cluster is already open, go back with F3"
    When I hit F3 I am returned to the main SPRO screen.  After navigating back to the Maintain Object types and Class types I continue to get the View cluster already open error.  The only way I can get back to Maintain Object types and Class types  is to completely exit SPRO and start over.  When I do, class type Z10 is gone.
    I have repeated this procedure several times with always the same results.
    Can anyone please help me?

  • How to add new class in modified template...

    Finally I have encourage myself to scratch to (for me deepest darkwood) templates...
    I have modified original Theme 2 to My theme 2 and added in some tempaltes region my parts-looks promising.
    Now I want to create sidebar region that is 450 px wide.
    It should be the same sidebar region but with different width!
    I saw on file system that there is .css so I add this class in it....(as aspected) it is not shown in template class list...
    I am able to apply that new class to template, but I cannot see that class in "Template Class" LOV (in Edit Region Template form).
    Is that important and could this bee seen in that list?
    THX!

    I have now working template with my new class...
    What is still bothering me is that I have editeted "theme_V2.css" file. I'm plannig to put my app on hosted WEB site in Germany, where this file will not be the same as is on my server.
    How to achieve future compatibilty according this?
    THX!

  • Old globals with new classes

    Please forgive my ignorance:
    I'm porting some old illustrator sdk code into the illustrator cs5 sdk.  I plan on making this a hybrid plugin where the UI is built in flash builder.  I am using the FreeGrid sample as a model.
    My old code is based in the old "shell" model, where in there is a file called common.h which contains a the line "extern Globals *g;".
    I was able to keep use these globals to store some preferences for the life of the plug-in.
    Is there a way to achieve this using the new class model.  I tried to declare a public member variable in the FreeGridPlugin class called "selected".  Then I added a pointer to FreeGridPlugin instance as a member of the FreeGridDialogControler class.  But when I try to access the FreeGridPlugin methods from the FreeGridDialogControler methods I get the error "bool FreeGridPlugin::selected is private within this context".  I can't figure out what I'm doing wrong of if there's a better way to go about this, but really need to be able set edit some variables whether from the dialog controler and from elsewhere.  How can I have these variables persist, and not go away as instances of classes are created and deleted?
    Or am I just completely backwards on all this?
    Any help would be MUCH appreciated.  Thanks.

    I know almost nothing about any of the Flash stuff, so take this with a grain of salt -- but if you're having trouble with things going away when the plugin reloads & unloads, have you tried making it persistent? I.e., make sure it never unloads? We avoid all that crap about the VTABLE fix and such by just making sure MAPublisher is in memory, all the time. You do that by doing this:
    SPAccessRef m_pluginAccess = 0;
    AIErr error = sSPAccess->AcquirePlugin(GetPluginRef(), &m_pluginAccess);
    (you can get the plugin ref in any message, so StartUp will have one)
    Just call
    AIErr error = sSPAccess->ReleasePlugin(m_pluginAccess);
    in the ShutdownPlugin message

  • Is it possible to extend bytearrayoutputstream to a new class

    hi is it possible to extend byteArrayoutputStream class to my new class so that i can directly access the buf[] (instace of bytearrayoutputstream), if so how to do it and what are the functions i need to override and provide me any tutorials or topics on this....

    manju_hawk wrote:
    hi is it possible to have my new class extend byteArrayoutputStreamYes (fixed slightly).
    manju_hawk wrote:
    so that i can directly access the buf[] (instace of bytearrayoutputstream),Though why would you want to do that? You can already access the buffer as ByteArrayOutputStream.toByteArray() outside of that class. Regardless, see [the Inheritance trail|http://java.sun.com/docs/books/tutorial/java/IandI/subclasses.html] of the Java tutorial for more information on overriding methods. I don't think you'd need to override many methods in your ByteArrayOutputStream subclass though, just read(byte[], int, int) and write(byte[], int, int) probably.
    Edited by: Looce on Nov 12, 2008 1:18 AM (added more information)

  • [svn:osmf:] 14028: Adding missing TestVerticalAlign and TestHorizontalAlign classes.

    Revision: 14028
    Revision: 14028
    Author:   [email protected]
    Date:     2010-02-08 01:42:06 -0800 (Mon, 08 Feb 2010)
    Log Message:
    Adding missing TestVerticalAlign and TestHorizontalAlign classes.
    Added Paths:
        osmf/trunk/framework/OSMFTest/org/osmf/layout/TestHorizontalAlign.as
        osmf/trunk/framework/OSMFTest/org/osmf/layout/TestVerticalAlign.as

    Sorry about that. I am not exactly sure where the problem is, but I know it takes place after I put the <nav> in (in the html portion). If I understand what I am learning, the CSS at the top will structure my html code so I would have thought the CSS tageting my nav would be the focus. Maybe it is a different section though.
    CSS part:
    nav p {
    font-size: 90%;
    color: #FFC;
    text-align: right;
    font-weight: bold;
    background-color: #090;
    padding-top: 5px;
    padding-right: 20px;
    padding-bottom: 5px;
    border-top-width: 2px;
    border-top-style: solid;
    border-top-color: #060;
    HTML part: (bold italic is the part I added)
    <body>
    <div class="container">
      <div id="apDiv1"><img src="Lessons/images/butterfly-ovr.png" width="170" height="158" alt="GreenStart Logo"></div>
      <header></header>
      <nav>
        <p>Home | About Us | Contact Us</p>
      </nav>
      <div class="sidebar1">
        <ul class="nav">
          <li><a href="#">Green News</a></li>
          <li><a href="#">Green Products</a></li>
          <li><a href="#">Green Events</a></li>
          <li><a href="#">Green Travel</a></li>
          <li><a href="#">Green Tips</a></li>
        </ul>

  • Is there any way to force jvm load a new class?

    I write a standalone command line program. This program calls a function which I added to an existing class. the existing class has run run for a while by other processes.
    When I run my command line program, it can not find the function I added to the existing class. But I am 100% sure I have overwrote the existing class file with my new copy. It looks like the old class file is still in effect.
    How can I instruct the JVM to load my new class file, not using the old one(maybe it is cached in memory, and didn't get refreshed)
    Welcome any suggestions. I have run out of idea. (BTW: It is infeasible for me to restart the computer)

    Classes are loaded by an object called a ClassLoader which stores all the classes it loads in some kind of internal Map object. If you ask the same ClassLoader for a class it's already loaded it will given you the old one.
    The only way to drop a class is to drop the ClassLoader which loaded it and create a new one to load a new version.
    What you need to do is to put the class file in question is a directory or jar which isn't on the class path. And make sure that no class file of the same name exists on the classpath (because that will be loaded in preference).
    Then you create a java.net.URLClassLoader pointing to the directory or jar (use FIle.toURL() to turn a file into a URL).
    Then call loadClass on that to load your class file. Then you'll probably have to call newInstance() on the class object to create an instance.
    Of course, if new method signatures are added you'll have to access them using Method objects, since they won't be know about at compile time.

  • New class installation in jre

    hi,
    could anyone tell me how intall new classes(as jar files) in jre. copying the file in lib and adding the CLASSPATH works for j2sdk. but appletviewer does not recognize the classes. any idea how to install the jars with j2re.
    thanks
    bala

    try putting the .jar in jre/lib/ext directory.

  • Error during creating a new class diagram

    Hi everbody,
    I'm using JDeveloper 10.1.3.3.0 with ADF Faces and Toplink. I'm exposing to an error message in JDeveloper while creating a new class diagram. The error message is shown in dialog and saying "The name of the element can not be set to 'package name' as another element has got the same name in the package". I have controlled the name of the new class diagram. The name is unique in the package. Also I'm creating this new file in the package "tr.com.bilisim.class_diagram" and details part of this error message in dialog also says
    "BME-02002 : The name of the element can not be set to 'class_diagram' as another element has got the same name in the package"
    "BME-02002 : The name of the element can not be set to 'bilisim as another element has got the same name in the package"
    "BME-02002 : The name of the element can not be set to 'com' as another element has got the same name in the package"
    "BME-02002 : The name of the element can not be set to 'tr' as another element has got the same name in the package"
    As I understand from the error message, during creating a new class diagram from 'new file dialog' also tries to create the directories in relevant package (tr.com.bilisim.class_diagram).
    How can I solve this problem? Please urgent help!
    best regards...
    --baris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    -repost
    please urgent
    --barisk                                                                                                                                                                                                                           

  • How can i add custom attributes to a new Class Object using the API ?

    Hello everyone,
    Here is my problem. I just created a subclass of Document using the API (not XML), by creating a ClassObjectDefinition and a ClassObject. Here is the code :
    // doc is an instance of Document
    ClassObject co = doc.getClassObject();
    ClassObjectDefinition cod = new ClassObjectDefinition(ifsSession);
    cod.setSuperclass(co);
    cod.setSuperclassName(co.getName());
    cod.setName("MYDocument");
    ClassObject c = (ClassObject)ifsSession.createSchemaObject(cod);
    Everything seems to be OK since i can see the new class when i use ifsmgr. But my question is : how can i add custom attributes to this new class ? Here is what i tried :
    AttributeDefinition value = new AttributeDefinition(ifsSession);
    value.setAttribute("FOO", AttributeValue.newAttributeValue("bar"));
    c.addAttribute(value);
    But i got the following error message :
    oracle.ifs.common.IfsException: IFS-30002: Unable to create new LibraryObject
    java.sql.SQLException: ORA-01400: impossible d'insirer NULL dans ("IFSSYS"."ODM_ATTRIBUTE"."DATATYPE")
    oracle.ifs.server.S_LibraryObjectData oracle.ifs.beans.LibrarySession.DMNewSchemaObject(oracle.ifs.server.S_LibraryObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.NewSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.createSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    void fr.sword.ifs.GestionDocument.IFSDocument.createDocument(java.lang.String)
    void fr.sword.ifs.GestionDocument.IFSDocument.main(java.lang.String[])
    So, what am i doing wrong ?
    More generally, are we restricted in the types of the attributes ? (for example, would it be possible to add an attribute that would be an inputStream ? Or an object that i have already created ?).
    Any help would be appreciated. Thanks in advance.
    Guillaume
    PS : i'm using Oracle iFS 1.1.9 on NT4 SP6 and Oracle 8.1.7
    null

    Hi Guillaume,
    you're welcome. Don't know exactly, but assume that ATTRIBUTEDATATYPE_UNKNOWN
    is used to check for erronous cases only
    and it shouldn't be used otherwise.
    Creating your own objects could be simply done via
    ClassObject ifsClassObject;
    DocumentDefinition ifsDocDef = new DocumentDefinition(ifsSession);
    // get class object for my very own document
    ifsClassObject = ClassObject.getClassObjectFromLabel(ifsSession, "MYDOCUMENT");
    // set the class for the document i'd like to create
    ifsDocDef.setClassObject(ifsClassObject);
    // set attributes and content for the document...
    ifsDocDef.setAttribute("MYFOO_ATTRIBUTE",....);
    ifsDocDef.setContent("This is the content of my document");
    // create the document...
    PublicObject doc = ifsSession.createPublicObject(ifsDocDef);
    null

Maybe you are looking for

  • MM Help plz Urgent

    Hi, I want to see Purchase order wise report. The report should show PO wise payment in FI. PO field is EBLEN and i am unable to find its link to BSIK or BSAK. The reason is that they are not maintaining EBELN in both these table. I tried on LIFNR bu

  • How to put videos in a classic iPod with the new version of iMovie (iMovie 10.0)?

    Hi guys, I've just had a classic iPod, and I've been able to put movies I made with the "old" version of iMovie (iMovie'11) but whenever I want to put movies I've made with iMovie 10.0, I can't, my iPod "can't read them", what can I do to put them in

  • Dc 5750 computer won't boot when restarting

    I have a DC 5750 HP Desktop and I can't get it to boot up to logon screen when selecting restart, it will power down and attemp to reboot but after reading memory I just displays a blank or black screen with no writing or mouse pointer at all.  This

  • Samsung Sata Dvdwr and Kernel Panic

    I bought a new sata dvdwr(samsung sata dvdwr sh-s223c) but when I plug the new dvdwr, at boot kernel panic appears. well I try to plug the device from ICH8 chip of the motherboard and my system works on fakeraid0 on the same chip. On the other hand i

  • Webutil_file package

    Hello, I'm facing problems with the webutil_file package The copy_file function works ok. The rename_file and delete_file do not work. They return false. Any suggestions? Regards Erik