Importing a Custom Class

Hi everyone...
I'm working on one final part of a Flash piece that's ended being quite a bear for me. So looking forward to wrapping it up! I'm a big-time newbie. This has been an amazing learning experience but boy it has made my brain hurt!
The final issue I'm having invloves importing a custom class that calls a custom application. It's a class/application that I downloaded and am trying to apply to my project. It is an application that adds transform handles around targeted objects.
I'm importing the class as I think I am supposed to but it doesn't work. There aren't any erros but it simply doesn't work.
Here's how I'm doing it...
My .FLA, FloorPlan.FLA, is located in my root folder along with the class file, ApplicationMain.as.
ApplicationMain.as has an import that imports the application called TransformTool.as. TransformTool.as is located in the root as well.
So in scenen 1 on frame 1 of FloorPlan.FLA I have an import written like so...
import ApplicationMain;
In the file ApplicationMain.as I have an import to grab the file TransformTool.as that is written like so...
package  {
    import flash.display.MovieClip;
    import flash.geom.Rectangle;
    import flash.events.MouseEvent;
    import TransformTool;
    public class ApplicationMain extends MovieClip
        private var _transformTool;
        public function ApplicationMain ()
            _transformTool = new TransformTool();           
            _transformTool.mode = TransformTool.ROTATE;
            _transformTool.iconScale = new HandleHintScale();         
            _transformTool.iconRotate = new HandleHintRotate();
            // _transformTool.boundaries = new Rectangle(50, 50, 475, 260);
            addChild(_transformTool);
        // register targets //   
            _transformTool.targets = [content_MC.e1, content_MC.e2, content_MC.e3, content_MC.e4, content_MC.f1, content_MC.f2, content_MC.f3, content_MC.f4, content_MC.f5, content_MC.f6, content_MC.f7, content_MC.f8];
            _transformTool.activeTarget = content_MC.f8;
        // register radio buttons //   
              // radio1.addEventListener(MouseEvent.CLICK, changeToolMode);
          //  radio2.addEventListener(MouseEvent.CLICK, changeToolMode);             
        private function changeToolMode(evt:MouseEvent):void
            _transformTool.mode = evt.currentTarget.label.toLowerCase();
Everything but this class/application is working just fine. It doesn't cause any erros and make other items not function. It simply isn't working. And I had it working at the very beginning of the project so I know its not the class/application files causing the problem; other than possible path issues.
I'm stumped, yet again! 
Thanks in advance for your help!

HandleHintScale and HandleHintRotate are movie clips in the library of the .fla

Similar Messages

  • Importing a custom class error

    In my testDB.jsp as follows,
    <body>
    <%@ page language="java" import="java.sql.*" %>
    <%@ page import="DBConn" %>
    <%
    DBConn DBConn1 = new DBConn();
    out.print("bean test:" + DBConn1.test_bean());
    %>
    </body >
    </html >
    I imported a custom class DBConn
    DBConn.java
    import java.sql.*;
    public class DBConn
    public DBConn()
    public static int test_bean()
    return 1;
    Running on AS side. Encountered an error:
    Request URI:/gis/class/testDB.jsp
    Exception:
    java.lang.NoSuchMethodError: DBConn: method test_bean()I not found
    at gis.class._testDB._jspService(_testDB.java:63)
    at oracle.jsp.runtime.HttpJsp.service(Compiled Code)
    at oracle.jsp.app.JspApplication.dispatchRequest(Compiled Code)
    at oracle.jsp.JspServlet.doDispatch(Compiled Code)
    at oracle.jsp.JspServlet.internalService(Compiled Code)
    at oracle.jsp.JspServlet.service(Compiled Code)
    at javax.servlet.http.HttpServlet.service(Compiled Code)
    at org.apache.jserv.JServConnection.processRequest(Compiled Code)
    at org.apache.jserv.JServConnection.run(Compiled Code)
    at java.lang.Thread.run(Compiled Code
    Knowing that DBConn.class was included in the CLASSPATH
    Thanks for any advice!

    HandleHintScale and HandleHintRotate are movie clips in the library of the .fla

  • Import of custom class doesn't seem to work...

    OK, I have my custom class defined in a file called "rootInstace.as". This is what it contains:
    package
    import flash.display.MovieClip;
    public class CRoot extends MovieClip
    public static var _root:MovieClip;
    public function CRoot ()
    _root = this;
    this file is located at C:\Flash_Files\rootStuff\.
    I have this directory included in my Flash Edit\Preferences\ActionScript 3.0 Languages\Source Path for Source files. The path I gave it was C:\Flash_Files\
    when I try to use the CRoot class in the first frame of my main .fla like this:
    import rootStuff.*;
    var rt:CRoot = new CRoot();
    , it throws errors:
    1046: Type was not found or was not a compile-time constant: CRoot.
    1180: Call to a possibly undefined method CRoot.
    what, I ask you, am I doing wrong?!

    Thank you. I also had to add a package name to reflect its location, but that was simple as well and I managed to figure it out.

  • How to import custom classes from model to view controller in adf?

    hi...
    i have some custom classes in model layer in adf.
    i want to use them in view controller but i cannot import them.
    how is this possible?
    my jdev version is 11.1.1.5

    You normally don't have to do anything special. The view controller project has a dependency to the model project. So simply typing the class name should show you hte option to generate the need import statement for the class.
    However, not all classes which reside in the model project should be imported into the view Controller as it might break the MVC pattern.
    Timo

  • Trouble importing custom class

    Hi all
    Just working my way through Programming for Mac OS X (2nd edition), and I've gotten all stuck at page 62. We've just created a custom class, and then try and 'build & go' the application. However, it never compiles, it always complain with my command to "#import <LotteryEntry.h>" that "error. LotteryEntry.h no such file or directory".
    I'm all confused why because there IS such a file! Lol.
    Any help would be appreciated
    Adam

    I stumbled on the same error. Be sure to use *import "LotteryEntry.h"* and not *import <LotteryEntry.h>* as suggested by the automatic completion of XCode.

  • 'Cannot Resolve Symbol' error when importing custom class

    I get this error...
    c:\mydocu~1\n307\auto.java:14: cannot resolve symbol
    symbol: class Box
    import Box;
    ^
    when I try to compile auto.java, the applet that's supposed to import the class Box, which I built to be like a message box in VB. Here is the code for Box...
    import java.awt.*;
    import java.awt.event.*;
    public class Box extends Window{
         Label lblMsg = new Label();
         Button cmdOk = new Button("OK");
         Panel pnlSouth = new Panel();
         EventHandler ehdlr=new EventHandler(this);
         public Box(Frame parent){
              super(parent);
              setLayout(new BorderLayout());
              add(lblMsg, BorderLayout.NORTH);
              add(pnlSouth, BorderLayout.SOUTH);
              pnlSouth.setLayout(new FlowLayout());
              pnlSouth.add(cmdOk);
              cmdOk.addActionListener(ehdlr);
              this.addWindowListener(ehdlr);
         public void speak(String msg){
              lblMsg.setText(msg);
              this.setLocation(200,200);
              this.setSize(200,200);
              this.setVisible(true);
         private class EventHandler extends WindowAdapter
                        implements ActionListener{
              Window theWindow;
              public EventHandler(Window a){
                   theWindow=a;
              public void actionPerformed(ActionEvent e){
                   theWindow.setVisible(false);
    AND HERE IS THE CODE FOR AUTO...
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import Box;
    public class auto extends Applet implements ActionListener{
         Panel pnlCenter=new Panel();
         Panel pnlSouth=new Panel();
         Panel pnlNorth=new Panel();
         Panel pnlCenterleft=new Panel();
         Panel pnlCenterright=new Panel();
         Button cmdSubmit=new Button("Submit");
         Button cmdNext=new Button("Next");
         Button cmdPrev=new Button("Previous");
         Label lblLoc=new Label("LOCATION:");
         Label lblDate=new Label("DATE:");
         Label lblMile=new Label("MILEAGE:");
         Label lblCost=new Label("COST:");
         Label lblDesc=new Label("DESCRIPTION:");
         Label lblFind=new Label("FIND LOCATION:");
         Label lblDisp=new Label();
         TextField txtLoc=new TextField();
         TextField txtDate=new TextField();
         TextField txtMile=new TextField();
         TextField txtCost=new TextField();
         TextArea txtDesc=new TextArea();
         TextField txtFind=new TextField();
         Box bxOne = new Box((Frame(this).getParent()));
         /*by declaring these four variables here, they are instance level, meaning they are
         available to the whole applet*/
         String textFile="auto.txt";
         String list[] = new String[100];
         String sort[] = new String[100];
         int counter=0;
         int count=0;
         String currentLine="";
         int i;
         int sortcount;
         public void init(){
              this.setLayout(new BorderLayout());
              this.add(pnlNorth, BorderLayout.NORTH);
              this.add(pnlCenter, BorderLayout.CENTER);
              this.add(pnlSouth, BorderLayout.SOUTH);
              pnlNorth.setLayout(new FlowLayout());
              pnlNorth.add(new Label("VIEW RECORDS"));
              pnlCenter.setLayout(new GridLayout(1,2));
              pnlCenter.add(pnlCenterleft);
              pnlCenter.add(pnlCenterright);
              pnlCenterleft.setLayout(new GridLayout(0,1));
              pnlCenterleft.add(lblLoc);
              pnlCenterleft.add(lblDate);
              pnlCenterleft.add(lblMile);
              pnlCenterleft.add(lblCost);
              pnlCenterleft.add(lblDesc);
              pnlCenterleft.add(lblFind);
              pnlCenterright.setLayout(new GridLayout(0,1));
              pnlCenterright.add(txtLoc);
              pnlCenterright.add(txtDate);
              pnlCenterright.add(txtMile);
              pnlCenterright.add(txtCost);
              pnlCenterright.add(txtDesc);
              pnlCenterright.add(txtFind);
              pnlSouth.setLayout(new FlowLayout());
              pnlSouth.add(cmdPrev);
              pnlSouth.add(lblDisp);
              pnlSouth.add(cmdSubmit);
              pnlSouth.add(cmdNext);
              lblDisp.setText("0 of 0");
              cmdPrev.addActionListener(this);
              cmdNext.addActionListener(this);
              cmdSubmit.addActionListener(this);
         public void actionPerformed(ActionEvent e){
              String command=e.getActionCommand();
              if (command.equals("Next")){
                   if(txtLoc.getText().equals("")){
                        reader();
                        transfer();
                        writer();
                        bxOne.speak("Viewing all records");
                   }else{
                        if(counter<count-2){
                             counter++;
                             writer();
                        }else{
                             //don't move
              } else if (command.equals("Previous")){
                   if(txtLoc.getText().equals("")){
                        //do nothing
                   }else{
                        if(counter>0){
                             counter--;
                             writer();
                        }else{
                             //don't move
              } else {
                   txtLoc.setText("");
                   txtDate.setText("");
                   txtMile.setText("");
                   txtCost.setText("");
                   txtDesc.setText("");
                   reader();
                   sorter();
                   writer();
         private void writer(){
              StringTokenizer stCurrent=new StringTokenizer(sort[counter], "\t");
              txtLoc.setText(stCurrent.nextToken());
              txtDate.setText(stCurrent.nextToken());
              txtMile.setText(stCurrent.nextToken());
              txtCost.setText(stCurrent.nextToken());
              txtDesc.setText(stCurrent.nextToken());
              lblDisp.setText(String.valueOf(counter+1) + " of " + String.valueOf(count-1));
         private void reader(){
              try{
                   URL textURL=new URL(getDocumentBase(), textFile);
                   InputStream issIn=textURL.openStream();
                   InputStreamReader isrIn=new InputStreamReader(issIn);
                   BufferedReader brIn=new BufferedReader(isrIn);
                   while(currentLine!=null){
                        currentLine=brIn.readLine();
                        list[count]=currentLine;
                        count++;
              }catch(MalformedURLException exc){
              System.out.println("MalformedURLException Error");
              }catch(IOException exc){
              System.out.println("IOException Error");
              }catch(NullPointerException exc){
              System.out.println("NullPointerException Error");
         private void transfer(){
              for(i=0;i<count;i++){
                   sort=list[i];
         private void sorter(){
              sortcount=0;
              String find=txtFind.getText();
              System.out.println(String.valueOf(count));
              for(i=0;i<count-1;i++){
                   StringTokenizer st=new StringTokenizer(list[i], "\t");
                   String next=st.nextToken();
                   if (find.equals(next)){
                        sort[sortcount]=list[i];
                        sortcount++;
              count=sortcount+1;
    Any help is greatly appreciated.
    2Willis4

    Hi agian,
    I looked closer at your code, I think if you play around with directories and paths, you'll get it, and I think also when you import, you have to have put the class in a package...? Maybe? Blind leading the blind here! So at the top of your box class you have to say something like
    package org.blah.lala
    and you have to have that directory structure for the class files org/blah/lala/Box.class
    Does that make sense?
    And then when you import you say:
    import org.blah.lala.Box
    (I think)
    I cna only imagine that this 'help' I am giving you would be hilarious to a more experienced programmer!
    Anyway, best of luck.

  • Need help calling and looping custom classes

    Hi, I am writing a code with custom classes in it and another program that calls upon all of the classes in the first program. I can get the second one (L6) to call upon and execute all of the classes of the first (Foreign). However, I need the second one to loop until quit is selected from the menu on Foreign and I can't seem to figure out how to do it. Here are the codes:
    L6:
    public class lab6
    public static void main(String[] args)
    Foreign camount = new Foreign();
    camount = new Foreign();
    camount.get();
    camount.print();
    camount.intake();
    camount.convert();
    camount.vertprint();
    System.out.println(camount);
    Foreign:
    import java.util.Scanner;
    public class Foreign
    private String country;
    private int choice;
    private float dollars;
    private float conversionValue;
    private float conversionAmount;
    public Foreign()
    country = "null";
    choice = 0;
    dollars = 0;
    conversionValue = 0;
    conversionAmount = 0;
    public void get()
         Scanner Keyboard = new Scanner(System.in);
              System.out.println("Foreign Exchange\n\n");
    System.out.println("1 = U.S. to Canada");
    System.out.println("2 = U.S. to Mexico");
    System.out.println("3 = U.S. to Japan");
    System.out.println("4 = U.S. to Euro");
    System.out.println("0 = Quit");
    System.out.print("\nEnter your choice: ");
    choice = Keyboard.nextInt();
    public void print()
    System.out.print("\nYou chose " + choice);
    public void intake()
         Scanner Keyboard = new Scanner(System.in);
              if (choice >= 1 && choice <= 4)
    switch (choice)
              case 1: System.out.println("\nU.S. to Canada");
                        conversionValue = 1.1225f;
                        country = ("Canadian Dollars");
                        break;
              case 2: System.out.println("\nU.S. to Mexico");
                        conversionValue = 10.9685f;
                        country = ("Mexican Pesos");
    break;
              case 3: System.out.println("\nU.S. to Japan");
                        conversionValue = 118.47f;
                        country = ("Japanese Yen");
    break;
              case 4: System.out.println("\nU.S. to Euro");
                        conversionValue = 0.736377f;
                        country = ("European Union Euros");
    break;
                   System.out.print("\nEnter U.S. dollar amount: ");
              dollars = Keyboard.nextFloat();
    public void convert()
    conversionAmount = conversionValue * dollars;
    public void vertprint()
    System.out.println("\nCountry = " + country);
    System.out.println("Rate = " + conversionValue);
    System.out.println("Dollars = " + dollars);
    System.out.println("Value = " + conversionAmount);
    public String toString()
    String line;
    line = "\n" + country + " " + conversionValue + " " + dollars + " " + conversionAmount;
    return line;
    I appreciate any help anyone can give me. This is driving me crazy. Thanks.

    1. first you need to write method to get choice value from Foreign class.
    simply add this method.
       public class Foreign {
          // ... Add this
          public int getChoice() {
             return choice;
       }2. Then in your main, you can obtain with previos method.
    public static void main(String[] args) {
       Foreign camount = new Foreign();
       // remove this. you alredy create an instance in last statement.
       //camount = new Foreign();
       int choice = 0;
       do {
          camount.get();
          choice = camount.getChoice();
          // your process...
       } while (choice != 0);
    }

  • Use of deployment classpath or shared-libraries to pick-up "custom" classes

    Hi,
    I’m trying to determine an approach to dealing with how classes are found in a deployed ADF application via classpath, etc. I’ve tried to explain the situation below as best I can so it’s clear. If you have any comments/suggestions as to how this could be done, it would be much appreciated
    Current Application structure:
    Consists of an application initially deployed to OC4J 10.1.3.4 using an alesco-wss.ear file
    Application contains a single Web Module, initially deployed as wss.war file within the alesco-wss.ear file above.
    The Web Module (wss) was built in JDeveloper 10.1.3.4 using 2 projects, a Model and ViewController project, and uses ADFBC.
    The Model project seems to also generate an alesco-model.jar file in the /WEB-INF/lib/ folder, even though Model classes are in the /WEB-INF/classes/ folder below?
    Exploded structure of application on application server looks something like:
    applications/alesco-wss/META-INF/
    /application.xml <- specifies settings for the Application such as Web Module settings
    /wss/
    /app/ <- directory containing application .jspx pages protected by security
    /images/ <- directory containing application images
    /infrastructure/ <- directory containing .jspx files for login, logout and error reduced security
    /skins/ <- directory containing Skin image, CSS and other files
    /WEB-INF/
    /classes/ <- directory containing application runtime class files as per package sub-directories
    /lib/ <- JAR files used by application (could move some to shared-libaries?) – seems to contain alesco-model.jar
    /regions/ <- directory containing .jspx pages used for Regions within JSPX template page
    /templates/ <- directory containing template .jspx pages used for development (not really required for deployment)
    /adf-faces-config.xml
    /adf-faces-skins.xml
    /faces-config.xml
    /faces-config-backing.xml
    /faces-config-nav.xml
    /region-metadata.xml
    /web.xml
    testpage.jspx <- Publicly accessible page just to test
    The application runs successfully using the above deployment structure.
    We plan to use the exploded deployment structure so that updates to pages, etc. can be applied individually rather than requiring construction and re-deployment of complete .EAR or .JAR files.
    What I’m trying to determine/establish is whether there is a mechanism to cater for a customisation of a class, where such a class would be used instead of the original class, perhaps using a classpath mechanism or shared library?
    For example, say there is a class “talent2.alesco.model.libraries.ModelUtil.class”, this would in the above structure be found under:
    applications/alesco-wss/META-INF/classes/talent2/alesco/model/libraries/ModelUtil.class
    Classes using the above class would import “talent2.alesco.model.libraries.ModelUtil”, so they effectively use that full-reference to the class (talent2.alesco.model.libraries as a path, either expanded or within a JAR).
    From the Oracle Containers for J2EE Developer’s Guide 10.1.3 page 3-17, it lists the following:
    Table 3–1 Configuration Options Affecting Class Visibility
    Classloader Configuration Option
    Configured shared library <code-source> in server.xml
    <import-shared-library> in server.xml
    app-name.root <import-shared-library> in orion-application.xml
    <library> jars/directories in orion-application.xml
    <ejb> JARs in orion-application.xml
    RAR file: all JARs at the root.
    RAR file: <native-library> directory paths.
    Manifest Class-Path of above JARs
    app-name.web.web-mod-name WAR file: Manifest Class-Path
    WAR file: WEB-INF/classes
    WAR file: WEB-INF/lib/ all JARs
    <classpath> jars/directories in orion-web.xml
    Manifest Class-Path of above jars.
    search-local-classes-first attribute in orion-web.xml
    Shared libraries are inherited from the app root.
    We have reasons why we prefer not to use .JAR files for these “non-standard” or “replaced” classes, so prefer an option that doesn’t involve creating a .JAR file.
    Our ideal solution would be to have such classes placed in an alternate directory that is referred to in a classpath such that IF a class exists in that location, it will be used instead of the one in the WEB-INF/classes/ directories, and if not such class is found it would then locate it in the WEB-INF/classes/ directories.
    - Can a classpath be set to look for such classes in a directory?
    - Do the classes have to replicate the original package directory structure within that directory (<dir>/talent2/alesco/model/libraries)?
    - If the class were put in such a directory, without replicating the original package directory structure, I assume the referencing “import” statements would not locate it correctly.
    - Is the classpath mechanism “clever” enough to search the package directory structure to locate the class (i.e. just points to <dir>)?
    - Or would the classpath mechanism require each individual path replicating the package structure to be added (i.e. <dir>/talent2/alesco/model/libraries/ and any other such package path)?
    If we are “forced” to resort to the use of JAR files, does a JAR file used for the purpose of overwrite/extending a sub-set of classes in the original location need to contain ALL related package classes? Or does it effectively “superset” classes it finds in all JAR files, etc. in the whole classpath? That is, it finds talent2.alesco.model.libraries.ModelUtil in the custom.jar file and happily goes on to get the remainder of talent2.alesco.model.libraries classes in the other core JAR/location. Or does it need all of them to be in the first JAR file for that package?
    Any help would be appreciated to understand how these various class visibility mechanisms could be used to achieve what is required would be appreciated.
    Gene

    So, nobody's had any experience with deploying an ADF application, and providing a means for a client to place custom classes in such a way as they're used in preference to the standard application class, effectively to implement a customised class without overwriting the original "standard" class?
    Gene

  • Reproducing Incident Form Elements in a Custom Class

    Hello again everyone,
    I am trying to rollout a completely separate module in SCSM to record MACD (Move/Add/Change/Delete) requests. I decided to use the OOB incident module as my base class as it already contained many fields I require (I inherited the properties
    and relationships) and created a new form assembly in Visual Studio to wire the properties to.
    After created the form and labels, I imported the .dll into the Authoring Tool so I can just drag out each property from the MP explorer onto the form. Everything works except for the last few fields which are a bit more complex than a standard list or textbox.
    I cannot seem to add the controls for the more complicated items like "Affected Services" or "Affected Items", when I try to drag them out to the form I get an error saying cardinality is not set to 1... I am guessing this is because
    its trying to map a relationship between a workitem and a service instead of my custom class and a service...
    So I went back into Visual Studio and added a ListView to the form, thinking I will have to wire the data bindings inside the form itself. However, I am stuck as I am not sure where "Services" are being written to, as I will need this location
    to reference in my empty ListView. I have provided my code and commented where I believe I am missing logic. Thank you in advance for any help!
    Note: "servicerelatestoworkitem" is not actually an object, my logic is conceptual and I still have not found which class/object the list of services is being written to.
    C# Code containing button logic (an add button to add a service to the ListView, and a delete button to remove a service from the ListView.
    private void add_services_button_Click(object sender, RoutedEventArgs e)
       // Open list of Services here, allow user to pick a service, then add selected service to "servicerelatestoworkitem"
       // AffectedServicesListView is populated from servicerelatestoworkitem
    private void del_services_button_Click(object sender, RoutedEventArgs e)
        // Test to see if item is being selected and display selected item to confirm ability to manipulate variable
        try
            var itemSelected = ListView.GetIsSelected(AffectedServicesListView);
            MessageBox.Show(itemSelected.ToString());
        catch (Exception ex)
            MessageBox.Show(ex.Message);
        // Remove selected item from servicerelatestoworkitem and refresh AffectedServicesListView
    XAML Code containing the list view and two buttons: (Note: The binding is most likely incorrect, I was just experimenting with it)
    <ListView x:Name="AffectedServicesListView" HorizontalAlignment="Left" Height="95" Margin="10,414.6,0,0" VerticalAlignment="Top" Width="521" ItemsSource="{Binding Path=AffectedServicesListView, Mode=Default, UpdateSourceTrigger=PropertyChanged}">
                            <ListView.View>
                                <GridView>
                                    <GridViewColumn/>
                                </GridView>
                            </ListView.View>
                        </ListView>
                        <Button x:Name="add_services_button" Content="" HorizontalAlignment="Left" Margin="470.55,382.749,0,0" VerticalAlignment="Top" Width="27.674" Height="26.851" Click="add_services_button_Click" BorderBrush="{x:Null}">
                            <Button.Background>
                                <ImageBrush ImageSource="add.png"/>
                            </Button.Background>
                        </Button>
                        <Button x:Name="del_services_button" Content="" HorizontalAlignment="Left" Margin="503.224,382.749,0,0" VerticalAlignment="Top" Width="27.776" Height="26.851" Click="del_services_button_Click" BorderBrush="{x:Null}">
                            <Button.Background>
                                <ImageBrush ImageSource="delete.png"/>
                            </Button.Background>
                        </Button>

    Cardinality is a property of relationships classes, not a property of specific relationships. each type of relationship has it's own cardinality values, but the engine only really recognizes "one" and "many". it makes sense to say that
    the "affected user" relationship is many to one, because Each work item can have one and only one affected user, but each users may be the affected user of many work items. The Related work items relationship is a many to many, because each workitem
    may be related to many other work items. it doesn't make sense to say this specific relationship between this IR and that user is "many to one", because each instance is only between one specific object and another specific objects. the cardinality
    just controls how many of those specific relationships instances can exist for each type of relationship. 
    There are no out of the box controls for many to many relationships. the Instance Picker control is designed to support one to one and many to one relationships. you'd have to write your own controls for support many to one relationships. Consider Travis
    Wright's SR Example for 2010, since most of this code should execute in 2012 and 2012r2 with only minor modifications. 
    You'd have to either find the control that defines it, like with the history tab, or recreate it using the
    authoring tool or
    Visual Studio. 

  • Accessing custom classes from JSP

    Hi Guys,
    I am having some problems accessing my custom classes from my JSP.
    1) I've created a very simple class, SimpleCountingBean that just has accessors for an int. The class is in the package "SimpleCountingBean". I compiled this class locally on my laptop and uploaded the *.class file to my ISP.
    2) I've checked my classpath and yes, the file "SimpleCountingBean/SimpleCountingBean.class" is located off of one of the directories listed in the classpath.
    3) When I attempt to use this class in my JSP, via the following import statement:
    import "SimpleCountingBean.*"
    I get the following compile error
    java.lang.NoClassDefFoundError: SimpleCountingBean/SimpleCountingBean
    I'm pretty sure that my classpath is properly setup because when I purposely garble the import statement, I get the "package not found" compile error.
    Do I need to upload some other files in addition to the class file? Any suggestions would of course be appreciated.
    Sonny.

    Trying to get some clearer view.. so don't mind..
    So you uploaded all your .jsp files into your account which is:
    home/sonny
    and it compiles and work. But custom classes doesn't seems to be working, where did you place your classes?
    From my knowledge of tomcat, classes are normally placed in, in this case:
    home/sonny/web-inf/classes
    Maybe it differs from windows enviroment to *nix enviroment.. well, I'm just saying out so if its not the case.. don't mind me.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to access MC's textfield created in a custom class?

    I have a custom class which creates a new MC using a library MC. The  library MC contains a dynamic textfield called productName.
    The custom class object gets created fine and is displaying on the  stage. It's also holding custom properties I set as well.
    How do I control the dynamic textfield inside the MC, which is inside  the custom class object?
    My Product.as:
    package {
         import flash.display.MovieClip;
         public class Product extends MovieClip {
             public var prodName:String;
             public var prodCategory:String;
             public var prodQuality:String;
             public function Product():void {
                 var productMC:MovieClip = new cellMC();
                 addChild(productMC);
    My .FLA first frame:
    var myProd1:Product = new Product();
    myProd1.prodCategory = "Heaters";
    myProd1.x = 150;
    myProd1.y = 140;
    addChild(myProd1);
    // THE FOLLOWING DOES NOT WORK
    myProd1.productMC.productName.text = "ABC 123";
    I figure something like this would work, but with lots of variations, still nothing works
    I get errors telling me it can't find productMC.
    UPDATE:
    Using GetByChildName it seems I can access productMC. For example this works:
    myProd1.getChildByName("productMC").visible = false;
    But this does not work:
    myProd1.getChildByName("productMC").getChildByName("productName").text = "dgdhdhdhrgh";
    If I take the textfield out of the library MC, and create it in the class, then this works:
    myProd1.getChildByName("productName").visible = false;
    BUT this does not work:
    myProd1.getChildByName("productName").text = "sdgsgdfsg";

    Hi Otto,
    If I well understood your situation, the solution  might be quite simple.
    Since your Product class is a  MovieClip (and not a Sprite), you could solve your problem many ways  knowing that a MovieClip is a dynamic class.
    But first,  the thing is that you created your productMC object on the fly inside  your Product class.
    So either you correct it like this:
    package {
         import  flash.display.MovieClip;
         public class  Product extends MovieClip {
             public var  prodName:String;
             public var prodCategory:String;
              public var prodQuality:String;
             public var productMC:MovieClip; // *****
             public function  Product():void {
                 productMC = new  cellMC(); // *********
                 addChild(productMC);
    Or use this cheap trick (a MovieClip is a dynamic class):
    package {
         import  flash.display.MovieClip;
         public class  Product extends MovieClip {
             public var  prodName:String;
             public var prodCategory:String;
              public var prodQuality:String;
             public function  Product():void {
                 var productMC:MovieClip = new  cellMC();
                 this.productMC = productMC; // **************
                 addChild(productMC);
    Although it is possible that, for this one, you need to reforce the dynamic property:
    package {
         import  flash.display.MovieClip;
         dynamic public class  Product extends MovieClip {
    I am not sure, but anyway, you will see for yourself.
    Plus, you try to change text to a MovieClip object? Either there is already a TextField in you cellMC object and you are not targeting it, or productMC should be instanciated as a TextField and not a MovieClip. I think you know the answer to that.
    Design Cyboïde
    Designer web Montreal

  • Putting Loader in a custom class: events, returning to main ... asynch challenges

    I'm creating a custom class to retrieve some data using URLoader.
    My code is below, doing this from memory, plz ignore any minor typos.
    The challenge I'm encountering: when my custom class calls the loader, the event handler takes over.  At which point the context of my code leaves the function and it's not clear to me how I then return the data retrieved by the loader.  I sense that I'm breaking the rules of how ActionScript really runs by putting a loader in a separate class; at least, that's my primitive understanding based upon the reading I've done on this.
    So can I do this?  I am trying to create a clean separation of concerns in my program so that my main program doesn't get clogged up with code concerned with retrieving remote data.
    Thanks!
    Main program;
    import bethesda.myLoader;
    var ldr:myLoader = new myLoader;
    var data:String = myLoader.getData("someurl");
    My custom class:
    package bethesda {
         public class myLoader {
              function myLoader(url:String):String {
                   var loader:URLLoader = new URLLoader();
                   var request:URLRequest = new URLRequest(url);
                   loader.addEventListener(Event.COMPLETE, completeHandler);
         function completeHandler(event:Event):void {
              var ld:URLLoader = new URLLoader(event.target);
              data = loader.load(); // here's where I don't know what to do to get the data back to my main program

    I think you are on the right track in abstracting loading from other code.
    Your class may be like that:
    package 
         import flash.events.Event;
         import flash.events.EventDispatcher;
         import flash.net.URLLoader;
         import flash.net.URLRequest;
         public class myLoader extends EventDispatcher
              // declare varaibles in the header
              private var loader:URLLoader;
              private var url:String;
              public function myLoader(url:String)
                  this.url = url;
              public function load():void {
                  var loader:URLLoader = new URLLoader();
                  var request:URLRequest = new URLRequest(url);
                  loader.addEventListener(Event.COMPLETE, completeHandler);
                  loader.load(request);
              private function completeHandler(e:Event):void
                  dispatchEvent(new Event(Event.COMPLETE));
              public function get data():*{
                  return loader.data;
    Although, perhaps the best thing to do would be to make this class extend URLLoader. With the example above you can use the class as following:
    import bethesda.myLoader;
    import flash.events.Event;
    var ldr:myLoader = new myLoader("someurl");
    ldr.addEventListener(Event.COMPLETE, onLoadComplete);
    ldr.load();
    function onLoadComplete(e:Event):void {
         var data:String = ldr.data;

  • Using custom classes that are not beans

    Hi folks,
    Is it possible to use java classes that are not beans. I mean, on a page, could you say Customer cust = new Customer("Jones", 25);
    if you had a Customer class with a constructor that took a name and age (String and int).
    If so, how do you go about this- do you need to import the class, or put it in a standard location? I'm using Tomcat, and would guess that this would go in WEB-INF/classes?
    I hope it's not a stupid question, all the literature seems to be focused on JavaBeans
    Any advice on this would be great!

    Beans are used as putting Java code into a JSP is generally considered bad practice. The advantage of the bean pattern is that you use things like:
    <jsp:setProperty name="laBean" property="someSetter" value="someValue" />so that you aren't embedding Java directly into the JSP. I'm not very religious about this particular topic personally and will throw a line or two in here and there.
    Having said that though, you can easily use any Java class in a JSP. You'll have to import it first:
    <%@ page import="java.util.*" %>And then you can easily use it like in a real Java program.

  • Sqlite, moving sqlstatements to a custom class

    I'm working on a FB AIR app.
    I have a main.mxml file with a source to a main.as file.
    My main.as file is getting very bloated with sqlstatements. I want to move these to a custom class, but I don't know how to proceed.
    I found an example of a package on this page: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/data/SQLConnectio n.html#begin()
    about a 3rd of the way down.
    The example above is exactly what I want to do, but I don't know how to adapt this for use in my main.as file beyond importing the class and instantiating it. How do I assign my values to the class file? How do I use the class to load up the dataProvider, etc...
    Also, in the example above the class extends Sprite. This sounds like it's meant for a Flash application. Would I still extend Sprite in Flex 4? I have done a couple of simple events, passing data back to the main app with the Flash.Events.Event, so the use of Sprite causes some confusion.
    In a previous post, Amy suggested using Robotlegs. I think I need to get a handle on using Flex before I explore other architectures. I'm just not that sophisticated yet.
    Thanks
    Kristin

    ok, a quick example
    make a new package called utilities and then a new actionscript class called DatabaseManager
    package utilities
         import flash.data.SQLConnection;
         import flash.data.SQLResult;
         import flash.data.SQLStatement;
         import flash.filesystem.File;
         import mx.collections.ArrayCollection;
         public class DatabaseManager
              private var sqlConnection:SQLConnection;
              private var stm:SQLStatement;
              public function DatabaseManager()
                   //connect to database
                   sqlConnection = new SQLConnection();
                   sqlConnection.open(File.applicationStorageDirectory.resolvePath("whatever"));
                   //create tables if not exist
                   stm = new SQLStatement();
                   stm.sqlConnection = sqlConnection;
                   stm.text = "create your table here";
                   stm.execute();
                   //create more tables
              public function getThings():ArrayCollection
                   stm = new SQLStatement();
                   stm.sqlConnection = sqlConnection;
                   stm.text = "your query";
              public function addStuff(stuff:Object):int
    then in your main file you need to import
    import utilities.DatabaseManager;
    instantiate the class, this connects and creates tables
    private var myDB:DatabaseManager = new DatabaseManager();
    then to use it
    var listFromDatabase:ArrayCollection = myDB.getThings();
    insertid = myDB.addStuff(thingToAdd);
    hope that gives you an idea 

  • Lock a custom class

    Hi,
    I want to put editor lock on a custom class that I created using SE24. How can I do that?
    Sridhar

    Hello Sridhar
    Apparently there is no attributes popup available where you can set the <i>Editor Lock</i>.
    However, you could use function module <b>TRINT_TADIR_MODIFY</b> (IMPORTING parameter <b>EDTFLAG = 'X'</b>) to set the lock.
    Regards
      Uwe

Maybe you are looking for

  • Having Troubles With Restoring Refurbished iPhone 4.

    I have just received a refurbished phone as my iPhone 4 went for a swim. Now I am trying to restore my phone through iTunes, and after three tries its still saying my phone needs to be restored. My contacts have transfered but none of my apps will an

  • Where can I download adobe acrobat professional version 7.0 for mac

    thanks!

  • SQL Date Function

    Hi I have problem regarding date function in the following statment and unable to sort out the real cause as yet, i am not finding any materail for using date function in sql where clause any one can help me why is it. Sector Table Sect_Id Varchar2(2

  • How to set the URL??

    Hello Friends, I am using the Oralce BPEL process manager 10.1.2 . In my BPEL program (in BPEL jdeveloper->BPEL process manager )I have deployed the wsdl of SALESFORCE.COM I had accessed the Login api of salesforce.com and login is sucessful. After t

  • Info spoke error : ABAP/4 processor: DATASET_NOT_OPEN

    HI all, We have Infospoke with Data source: 0MATERIAL and Destination : BW_MAT In process chain after this infospoke is filled we have ABAP Program to Transfer Material Data. In process chian the load is successfull till infospoke but failed at the A