Problem with a class attr

Hello,
I'm trying to execute this command…
sym.$("cible").attr({class:"pancarte"});
… but nothing happens.
Of course, i've tried to apply the pancarte class in my HTML document (to a <p>) and it works.
I also tried with the addClass() method, but nothinh happened.
I'm not able to apply a class to an element in Edge Animate
David

resdesign wrote:
In Edge there are 2 ways to write CSS properties:
Text
sym.$('element').css('color','blue');
background
sym.$('element').css('background-color','blue');
and
sym.$('element').css({'color':'blue'});
sym.$('element').css({'background-color':'blue'});
But I think David is using a class name. I am not sure why you would have to change the format of the attribut names but you can do it with split() as shown above.
Just to clarify what you said above, the object notation one is super useful when you need to set multiple properties, so in your 2nd example, you could actually write it so it looked like this:
sym.$('element').css({
  'color': 'blue',
  'background-color': 'blue'
(I think your split() thing is in another thread )

Similar Messages

  • Getting problem with DOMImplementation classes method getFeature() method

    hi
    getting problem with DOMImplementation classes method getFeature() method
    Error is cannot find symbol getFeature()
    code snippet is like...
    private void saveXml(Document document, String path) throws IOException {
    DOMImplementation implementation = document.getImplementation();
    DOMImplementationLS implementationLS = (DOMImplementationLS) (implementation.getFeature("LS", "3.0"));
    LSSerializer serializer = implementationLS.createLSSerializer();
    LSOutput output = implementationLS.createLSOutput();
    FileOutputStream stream = new FileOutputStream(path);
    output.setByteStream(stream);
    serializer.write(document, output);
    stream.close();
    problem with getFeature() method

    You are probably using an implementation of DOM which does not implement DOM level-3.

  • Problems with inner classes in JasminXT

    I hava problems with inner classes in JasminXT.
    I wrote:
    ;This is outer class
    .source Outer.j
    .class Outer
    .super SomeSuperClass
    .method public createrInnerClass()V
         .limit stack 10
         .limit locals 10
         ;create a Inner object
         new Outer$Inner
         dup
         invokenonvirtual Outer$Inner/<init>(LOuter;)V
         ;test function must print a Outer class name
         invokevirtual Outer$Inner/testFunction ()V
    .end method
    ;This is inner class
    .source Outer$Inner.j
    .class Outer$Inner
    .super java/lang/Object
    .field final this$0 LOuter;
    ;contructor
    .method pubilc <init>(LOuter;)V
         .limit stack 10
         .limit locals 10
         aload_0
         invokenonvirtual Object/<init>()V
         aload_0
         aload_1
         putfield Inner$Outer/this$0 LOuter;
         return
    .end method
    ;test
    .method public testFunction ()V
         .limit stack 10
         .limit locals 10
         ;get out object
         getstatic java/io/PrintStream/out  java/io/PrintStream;
         aload_0
         invokevirtual java/lang/Object/getClass()java/lang/Class;
         ;now in stack Outer$Inner class
         invokevirtual java/Class/getDeclaringClass()java/lang/Class;
         ;but now in stack null
         invokevirtual java/io/PrintStream/print (Ljava/lang/Object;)V
    .end methodI used dejasmin. Code was equal.
    What I have to do? Why getDeclatingClass () returns null, but in dejasmin code
    it returns Outer class?

    Outer$Inner naming convention is not used by JVM to get declaring class.
    You need to have proper InnerClasses attribute (refer to http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#79996)
    in the generated classes. Did you check using jclasslib or another class file viewer and verified that your .class files have proper InnerClasses attribute?

  • Problem with JFrame class.

    To risolve my problem i need for few diferent frame
    ( for esample in one i put JTextFild that take the user input, in a nother one i need for program output ) . But, th problem is, all my frames using the same object.
    If i construct diferent JFrame window class i have problem that i don't acess in the same object from all the window. And if i dont use a object, i have static acess .
    I risolve the problem with 1 JFrame class with diferent constructors, but i wont a diferent way to risolve my problem, because there are few windows.
    Help me.....

    Make the class that extends JFrame an inner class of the the main class. You can then access all members of the outer class.

  • Problems with importing classes in Java

    Hello,
    i have some problems with a simple project.
    The structure is like this:
    web-inf/classes/databeans/loginexistinguserform.java
    web-inf/classes/formactions/loginexistinguseraction.java
    loginexistinguserform.java :
    package databeans;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionMapping;
    import javax.servlet.http.HttpServletRequest;
    public class LoginExistingUserForm extends ActionForm
         String userid;
         String password;
         public String getUserid(){return userid;}
         public void setUserid(String newUserid){userid=newUserid;}
         public String getPassword(){return password;}
         public void setPassword(String newPassword) {password=newPassword;}
         public ActionErrors validate(ActionMapping mapping, HttpServletRequest request){
              ActionErrors errors=new ActionErrors();
              if(this.userid==null||this.userid.equals(""))
                   errors.add("user",new ActionError("error.userid.required"));
              if(this.password==null||this.password.equals(""))
                   errors.add("pass",new ActionError("error.password.required"));
              return errors;
    }loginexistinguseraction.java
    package formactions;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import databeans.LoginExistingUserForm;
    public class LoginExistingUserAction extends Action
         public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
         throws IOException, ServletException
              LoginExistingUserForm loginData=(LoginExistingUserForm)form;
              if(loginData.getUserid().equals("Admin")&&loginData.getPassword().equals("Parola"))
                   return mapping.findForward("successLogin");
              else
                   return mapping.findForward("failureLogin");
    }I can complie succesfully loginexisitinguserform.java but problems appears when i want to compile the second file, loginexistinguseraction.java with command: javac loginexistinguseraction.java
    C:\ApacheGroup\Tomcat\webapps\PersonalWeb\WEB-INF\classes\formactions>javac loginexistinguseraction.java
    loginexistinguseraction.java:10: package databeans does not exist
    import databeans.LoginExistingUserForm;
    ^
    loginexistinguseraction.java:17: cannot find symbol
    symbol : class LoginExistingUserForm
    location: class formactions.LoginExistingUserAction
    LoginExistingUserForm loginData=(LoginExistingUserForm)form;
    ^
    loginexistinguseraction.java:17: cannot find symbol
    symbol : class LoginExistingUserForm
    location: class formactions.LoginExistingUserAction
    LoginExistingUserForm loginData=(LoginExistingUserForm)form;
    ^
    3 errors
    I have the CLASSPATH variable setup tu C:/Sun/Appserver/lib/j2ee.jar
    Can someone help me ? Thank you in advance !

    Thank you very much ! It worked. I'm really new in Jav a programming.
    Now i have encoutered another problem. When i want to login, and enter user name and password i am redirected to a login.do page, instead of Welcome.jsp
    Here is Login.jsp:
    <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@page contentType="text/html; charset=ISO-8859-1"%>
    <html>
    <head><title>Login Form</title></head>
    <body>
    <html:errors/>
    <html:form action="/login">
    <table border="0" width="200">
    <tr>
         <td>User Name:</td>
         <td><html:text property="userid" maxlength="13"/></td>
    </tr>
    <tr>
         <td>Password:</td>
         <td><html:password property="password" maxlength="13"/></td>
    </tr>
    </table>
    <br />
    <html:submit value="Login"/>
    </html:form>
    </body>
    </html>and here is struts-config.xml :
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
              "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
              "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
    <struts-config>
    <!--========================beans for HTML form data=======================-->
    <form-beans>
         <form-bean name="loginBean" type="databeans.LoginExistingUserForm"/>
    </form-beans>
    <!--========================Action Mappings================================-->
    <action-mappings>
         <action path="/login" type="formactions.LoginExistingUserAction" name="loginBean" input="/Login.jsp" scope="session">
              <forward name="succesLogin" path="/pages/Welcome.jsp" redirect="true"/>
              <forward name="failureLogin" path="/pages/Diverse.jsp" redirect="true"/>
         </action>
    </action-mappings>
        <message-resources parameter="MessageResources" />
    </struts-config>

  • Problem with loading classes!!!

    I am loading classes using
    // Open File
    InputStream jarFile = new BufferedInputStream(new FileInputStream(
    pluginPath));
    // Get Manifest and properties
    Attributes attrs = new JarInputStream(jarFile).getManifest().
    getMainAttributes();
    jarFile.close();
    // Read Main Class
    String mainClass = attrs.getValue("Protocol-Class");
    // Load all classes from jar file without giving classpath
    URL url = new URL("jar:file:" + pluginPath + "!/");
    JarURLConnection jarConnection = (JarURLConnection) url.openConnection();
    URL[] urls = new URL[] {
    url};
    ClassLoader classLoader = new URLClassLoader(urls);
    // Create new instance of protocol
    Protocol protocol = (Protocol) classLoader.loadClass(mainClass).
    newInstance();
    I am loading classes one by one say a order A, B, C. In my case class c extends class A. So I am loading class A first and later B and finally C. But I am getting exceptions when loading class C that Class A is unknown.The following exception is thrown
    java.lang.NoClassDefFoundError: com/a/A at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    Please give me a solution to make it run.

    You create a new class loader for each class. The class loaders are independent, and so the class hierarchies they load are independent. Class A loader by classLoaderOne doesn't see class B loader by classLoaderTwo - they are loaded into their own sandboxes.
    Either load everything with one class loader or create the class loaders in a hierarchy. To create a hierarchy use the class loader constructor that takes a parent class loader as a parameter. One class loader may be easier because then you don't need to worry about loading order.

  • Problems with loading Classes from a Directory of a jar file.

    Hi Guys,
    i have a problem with my programm. It works greatly in my eclipse platform. but there are all classes in my default folder. I want to add a plugin function now. My Abstract classes are in in my default folder and my doughter classes are in my plugin-folder called plugin.
    I look what is in the pluginfolder -> all my doughter classes. but i every time get a Class Cast Exception and an ClassNotFoundException.
    How can i do that ? Current i do it with Class.forName(frames.substring(0,frames[i].indexOf(".class")));
    best regards flo

    http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html

  • Inheritance problem with parent class calling child class

    I have a problem with inheritance with a parent class calling a child class method. Below is the example pseudocode code and my problem:
    public abstract class A {
        protected void function1 ( ) { }
        protected void function2 () {
             //calls function1();
             function1();
    public abstract class B extends A {
        protected void function1 ()  {
             // do stuff
    public class C extends B {
        protected void function1 ()  {
            // do stuff
            super.function1 ();
    }I have an object instance of class C created and its function2() is invoked.
    My problem is, while in function2(), which belongs to abstract class A and the method call to function 1() is called, the call invokes the function1() of class B. Shouldn't the call invoke function 1() of class C instead? And then function1() of class B will be called after due to the super.function1(). It's not behaving like I thought it would.
    Edited by: crono77 on Jan 10, 2008 8:13 PM

    Nevermind, i found my error :)

  • Problems with String[] Class Object

    Hi guys,
    I'm writing a web server who should invoke a method of a class when asked by a client.
    My problem is that if the method that should be invoked has a String[] parameter the web server is unable to invoke it and throws a java.lang.IllegalArgumentException: argument type mismatch.
    Useful pieces of code to understand are the following:
    //create the Class[] to pass as parameter to the getMethod method
    Class[] paramType = {String[].class};
    //find the class "className" and create a new instance
    Class c = Class.forName(className);
    Object obj = c.newInstance();
    //the getMethod should find in the class c the method called nameMeth
    // having paramType (i.e. String[]) as parameter type...
    Method theMethod = c.getMethod(nameMeth, paramType);
    //here's the problematic call!!
    theMethod.invoke(obj, params);I've noted that System.out.println(theMethod); prints the signature of the method with the parameter type java.lang.String[].
    System.out.println(paramType[0]); instead prints [Ljava.lang.String;
    I know that [L means that it is an array, so why do you think that I'm having an argument type mismatch?
    Thank you                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    I had no problems making that work.import java.lang.reflect.Method;
    public final class StringArray {
        public static final String CLASSNAME = "StringArray";
        public static final String METHODNAME = "myMethod";
        public static final String[] sa = { "a", "b"};
        // automatic no-args constructor
        public final void myMethod(String[] sa) {
            for(int i=0;i<sa.length;++i) {
                System.out.println(sa);
    public static final void main(String[] arg) throws Exception {
    //create the Class[] to pass as parameter to the getMethod method
    Object[] params = { sa };
    Class[] paramType = {sa.getClass()};
    //find the class "className" and create a new instance
    Class c = Class.forName(CLASSNAME);
    Object obj = c.newInstance();
    //the getMethod should find in the class c the method called nameMeth
    // having paramType (i.e. String[]) as parameter type...
    Method theMethod = c.getMethod(METHODNAME, paramType);
    //here's the problematic call!!
    theMethod.invoke(obj, params);

  • Problems with Adler32 class in JDK 1.5 (not tried 1.6)

    When I use the java.util.zip.Adler32-class for generating Adler32-checksums, I found a couple of strange problems. When the total filesize (generating checksums of several files with the same checksum-object, using reset() in between) is 31999 bytes or greater, it gives pseudorandom output for the first file that exceeds the 31999 bytes. By running the test-program several times in a row, it seems like the output changes every second, as if random data was generated with the second counter as a seed. All the other checksums seem correct, and they do not change. A workaround that works for a series of only small files is to create a new Adler32-object for every file that needs its checksum generated, but that proves itself insufficient when a single file exceeds 31998 bytes of size (31999 or above).
    I've tried different inputstreams and various methods of using the update(xx)-functions of the Adler32, but I always get the same results. Is this a known bug (Note: JDK 1.5, not 1.6)? Or am I doing something obviously wrong? Example source code can be provided if necessary.

    R,
    I'm disappointed to see that you haven't received any replies to this. I am experiencing a very similar problem. What I have noticed is that the problem occurs when the combo-box is forced to be heavy-weight (meaning it has to draw itself outside the bounds of the window). In those cases, I can never pick a different value from the combo-box in the table. The exact same app run under 1.3.1 does not have any problems. Further, combo-boxes not in table views do not seem to have any problems even when they are heavy-weight.
    Paul

  • Problems with Embedded classes mapping

    Hi,
    I'm experiencing problems for table generation with the following case:
    a class declares two fields; one of them typed as a subclass of the other; both fields annotated with @Embedded; the subclass uses the annotation @AttributeOverride to avoid column names duplication.
    When the tables are generated, one of the field (the most specialized one) is simply omitted by the JPA implementation...
    To illustrate my problem, here is an example:
    @Entity
    public class Bar implements Serializable {
         @Embedded
         protected Foo foo = null;
         @Id
         @GeneratedValue(strategy=GenerationType.SEQUENCE)
         protected long id = -1;
         @Embedded
         protected SubFoo subFoo = null;
         public Bar() {
                    super();
            // getters & setters
    @Embeddable
    public class Foo implements Serializable {
         @Column
         protected String bar = null;
         @Column
         protected String foo = null;
         public Foo() {
              super();
            // getters & setters
    @Embeddable
    @AttributeOverrides({
         @AttributeOverride(name="bar", column=@Column(name="subbar")),
         @AttributeOverride(name="foo", column=@Column(name="subfoo"))
    public class SubFoo extends Foo {
         public SubFoo() {
                    super();
    }The generated table BAR contains only 3 columns: ID, FOO, BAR...
    ...and what I expect is two additionnal columns named SUBFOO & SUBBAR!
    Can someone tell me: if I definitely need to go back to school (I'm obviously not an EJB expert), or how to make it work as I expect...?
    Thanks
    -Jerome

    I found the note in the EJB specs that clearly states that my issue has no solution at this time:
    "Support for collections of embedded objects and for the polymorphism and inheritance of embeddable classes will be required in a future release of this specification."
    EJB 3.0 specs - final release - persistence, page 23, note 10 in section 2.1.5

  • Problem with local class, static private attribute and public method

    Hello SDN,
    Consider the following situation:
    1) I have defined a LOCAL class airplane.
    2) This class has a private static attribute "type table of ref to" airplane (array of airplanes)
    3) A public method should return the private static table attribute
    Problems:
    a) The table cannot be given as an EXPORTING parameter in the method because TYPE TABLE OF... is not supported and I get syntax errors. I also cannot define a dictionary table type because it is a local class.
    b) The table cannot be given as a TABLES parameter in the method because TABLES is not supported in the OO context.
    c) The table cannot be given as an EXPORTING parameter in the method defined as LIKE myStaticAttribute because my method is PUBLIC and my attribute is PRIVATE. ABAP syntax requires that all PUBLIC statements are defined before PRIVATE ones, therefore it cannot find the attribute to reference to with LIKE.
    I see only 2 solutions:
    a) Never ever use local classes and always use global classes so that I might define a dictionary table type of my class which I can then use in my class.
    b) Make the attribute public, but this goes against OO principles, and isn't really an option.
    Am I missing anything here, or is this simply overlooked so far?

    Hello Niels
    Since your class is local and, thus, only know to the "surrounding" application is does not really make sense to make it public to any other application.
    However, if you require to store instances of your local classes in internal tables simply use the most generic reference type possible, i.e. <b>OBJECT</b>.
    The following sample report shows how to do that. Furthermore, I believe it also shows that there are <u><b>no </b></u>serious inconsistency in the ABAP language.
    *& Report  ZUS_SDN_LOCAL_CLASS
    REPORT  zus_sdn_local_class.
    " NOTE: SWF_UTL_OBJECT_TAB is a table type having reference type OBJECT
    *       CLASS lcl_airplane DEFINITION
    CLASS lcl_airplane DEFINITION.
      PUBLIC SECTION.
        DATA:    md_counter(3)             TYPE n.
        METHODS: constructor,
                 get_instances
                   RETURNING
                     value(rt_instances)   TYPE swf_utl_object_tab.
      PRIVATE SECTION.
        CLASS-DATA: mt_instances    TYPE swf_utl_object_tab.
    ENDCLASS.                    "lcl_airplane DEFINITION
    *       CLASS lcl_airplane IMPLEMENTATION
    CLASS lcl_airplane IMPLEMENTATION.
      METHOD constructor.
        APPEND me TO mt_instances.
        DESCRIBE TABLE mt_instances.
        md_counter = syst-tfill.
      ENDMETHOD.                    "constructor
      METHOD get_instances.
        rt_instances = mt_instances.
      ENDMETHOD.                    "get_instance
    ENDCLASS.                    "lcl_airplane IMPLEMENTATION
    DATA:
      gt_instances      TYPE swf_utl_object_tab,
      go_object         TYPE REF TO object,
      go_airplane       TYPE REF TO lcl_airplane.
    START-OF-SELECTION.
      " Create a few airplane instance
      DO 5 TIMES.
        CREATE OBJECT go_airplane.
      ENDDO.
      gt_instances = go_airplane->get_instances( ).
      CLEAR: go_airplane.
      LOOP AT gt_instances INTO go_object.
        go_airplane ?= go_object.
        WRITE: / 'Airplane =', go_airplane->md_counter.
      ENDLOOP.
    END-OF-SELECTION.
    Regards
      Uwe<u></u>

  • Problem with java classes

    i have made some java files in java project but when i compile the files
    it gives me error " error 300 : classes are not found "
    <<should the classes be created automatically or i have to create them>>
    i will post more info if necessary

    Are you using an IDE? Are you just starting with Java? If so, it's generally recommended to not start with IDEs because you tend to miss learning about some basic fundamentals.
    As for obvious problems.... I'm not sure these aren't just cuz you posted them here wrong, but I'm not going to assume that...
    If the file is driver.java, the class name has to be driver, not Driver. It's case sensitive. The public class name (I say public cuz you can define multiple classes in one java file) has to have the same name as the java file. So that could cause problems.
    The other thing is what you set up in the CLASSPATH system variable. If you don't know what this is, you should go here:
    http://java.sun.com/docs/books/tutorial/
    and start reading from the begining.

  • What is a Problem With Image Class very amizing

    When I am using Image Class in my program it start the new thread .
    e.g Image img = Toolkit.getDefaultToolkit().getImage("c:/imode/top.gif");
    program is not terminated .
    Please give me solution on this problem .

    You should be using a MediaTracker to ensure that all the resources are loaded before doing anything with them. In addition to this, it is sensible practise in any multi-threaded program to call System.exit to make sure all threads terminate.
    // Begin loading the image.  Remember that this call starts a new thread.  Image loading occurs in the background so that partial rendering can be done.
    Image img = Toolkit.getDefaultToolkit().getImage("c:/imode/top.gif);
    // Track the image to completion.
    MediaTracker tracker = new MediaTracker();
    tracker.addImage(img, 0);
    try {
        tracker.waitForAll();
    } catch (InterruptedException ie) {}
    // ... now do stuff with the image ...
    // make sure all threads stop
    System.exit(0);

  • Problems With Accessing Classes

    I am having trouble calling classes that I have written. I put
    all of my .java files into my bin directory, and then I compile all of them. But when I compile one that has a reference to another class file that I have written, it acts like it doesn't recognize the class. Even though I am able to compile the .java file into a class file.
    I am thinking that it may have something to do with the version of the JDK I am running, JDK1.2.1. And I have also tried to run it in JDK1.3.1, but I have the same problem. If anyone has any suggestions I would really appreciate them.

    When you try to compile a file that has reference to another class that you have written, it looks in a place called your "classpath". You need to add the path to your classes that are needed for the current compile. I know this is a bit confusing. But here is an example:
    I am trying to compile Test.java, but Test.java uses a class that I already have written and compiled called NeededByTest. If NeededByTest.class is found int c:\classes directory, I need to add that path to my classpath. I do that by typing the following at the command prompt
    c:\ CLASSPATH = %CLASSPATH;C:\classes;
    Note that this appends C:\classes to my classpath.
    I hope that helped..
    Later
    Cardwell

Maybe you are looking for