Lazy ManyToOne, setting weaving to static problem!

Hello, I read in the manual that I need to change this property in the persistence.xml to static,
so I could lazy ManyToOne and OneToOne, using "fetch = FetchType.LAZY". I did this:
<property name="toplink.weaving" value = "static"/>But when I run the program I got stranges exceptions like this:
Exception [TOPLINK-60] (Oracle TopLink Essentials - 2.0
(Build b41-beta2 (03/30/2007))):
oracle.toplink.essentials.exceptions.DescriptorException
Exception Description: The method [_toplink_setcurso_vh]
or [_toplink_getcurso_vh] is not defined in the object
[entity.Aluno].
Internal Exception: java.lang.NoSuchMethodException:
entity.Aluno._toplink_getcurso_vh()
Mapping:
oracle.toplink.essentials.mappings.OneToOneMapping[curso]And this:
java.lang.NullPointerException
     at oracle.toplink.essentials.internal.security.PrivilegedAccessHelper.
getMethodReturnType(PrivilegedAccessHelper.java:271)
     at oracle.toplink.essentials.internal.descriptors.MethodAttributeAccessor.
getGetMethodReturnType(MethodAttributeAccessor.java:113)
     at oracle.toplink.essentials.mappings.ForeignReferenceMapping.
validateBeforeInitialization(ForeignReferenceMapping.java:873)
     at oracle.toplink.essentials.descriptors.ClassDescriptor.
validateBeforeInitialization(ClassDescriptor.java:3505)
     at oracle.toplink.essentials.descriptors.ClassDescriptor.
preInitialize(ClassDescriptor.java:2198)
     at oracle.toplink.essentials.internal.sessions.
DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:380)
     at oracle.toplink.essentials.internal.sessions.
DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:360)
     at oracle.toplink.essentials.internal.sessions.
DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:677)
     at oracle.toplink.essentials.internal.sessions.
DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:559)
     at oracle.toplink.essentials.ejb.cmp3.
EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
     at oracle.toplink.essentials.internal.ejb.cmp3.
EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:212)
     at oracle.toplink.essentials.internal.ejb.cmp3.base.
EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:78)
     at oracle.toplink.essentials.internal.ejb.cmp3.base.
EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:111)
     at oracle.toplink.essentials.internal.ejb.cmp3.base.
EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:105)
     at oracle.toplink.essentials.internal.ejb.cmp3.
EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:76)
     at test.Main.main(Main.java:23)When I remove the line:
<property name="toplink.weaving" value = "static"/>Whitout this line in the persistence.xml, everything works fine, but the lazy ManyToOne does not work,
it count as a FetchType.EAGER :/
Here is the line where I use ManyToOne:
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name="curso_id", referencedColumnName="curso_id",
insertable = false, updatable = false)
Curso curso;
public Curso getCurso() { return curso; }Someone could help me? Thanks!

I tryied to made the static weaving using maven, I followed this tutorial:
http://spatula.net/blog/labels/maven.html
But nothing happens! It runs the ant tasks, but the ManyToOne continues as a eager fetch!
Help!

Similar Messages

  • HT204053 I want to use the same apple id for iTunes and iCloud...but I have both set up..my problem is I want to use the one that I use for iTunes for both

    I want to use the same apple id for iTunes and iCloud...but I have both set up..my problem is I want to use the one that I use for iTunes for both

    iForgot.com

  • How do I set up a static IP on Airport Express so I can activate the Connet my Mac App from outside my network?

    How do I set up a static IP on Airport Express so I can activate and use the Connect My Mac app from outside my home network?

    You will need to enable file sharing in System Preferences
    as well as setting up sharing and permissions for the
    directories that you want shared.  You may also want to
    setup a non-administrative user or allow limited guest
    access.  The user would require entering a user name and
    password to make the connection, but would allow remotes
    to change files, if set up tat way.
    As for serving iTunes media, better to post in the iTunes forum.

  • Dell Audigy 2 and Windows SP3 driver and static problems

    SB0243
    Ok, Creative you and Dell have left us customer behind and giving us the shaft.
    I know you tell us to go to Dell to get drivers, and Dell still has the same driver posted they had when i bought my PC in 2003.
    Funny thing is that the only driver i find that work without the static problem is the one from the creative CD from 2003. The only catch is that none of the other sound Apps will install or work with windows SP3. So you end up with a card that has sound without static but only in two speaker mode, no mixer, EAX, CSMM, sound bank, etc... you know all the other stuff.
    I have installed Danial K driver at one time and they worked good for months then the static came back one day. Now after a fresh install of windows with SP3 i end up here with only the old driver working with just two speakers.
    This is very sad that a big company like creative can not create a driver that works with current software. You need to fire all your programmer and go hire two with all the money you paid everyone else and maybe then these two top programmer might be able to make something that works. This has become a joke in the sound industry.
    It was said that this ship is sinking, i think it has sunk at this point, us rats are jumping ship to some other card that works. Most likey it is not going to be from creative.
    Rainey

    ?Hey, I cant get CMSS to work here, im on windows 7 32bit, wich CMSS version are you using? I cannot open THX Console or EAX Console.

  • Using iMovie 7.1.4 on an iMac w/ Snow Leopard; HD video imported with a Firewire cable transfers fine, but audio arrives with major static; problem persists w/ different cameras

    Using iMovie 7.1.4 on an iMac w/ Snow Leopard; HD video imported with a Firewire cable transfers fine, but audio arrives with major static; problem persists w/ different cameras & Firewire cables; source DV tape has no audfio static.

    I forgot to write down my computer specs:
    iMac 27 Mid 2011
    2.7 GHz Intel Core i5
    4 GB 1333 MHz DDR3
    AMD Radeon HD 6770M 512 MB
    OS X 10.9.2

  • Lazy mode setting in Application Module AM for 10g

    Hi,
    I am using Jdev 10.1.3.x
    There is very little information given on Lazy mode setting in AM.
    I tred to enable that and written System.out.println() in getter and setter in Impl class.
    Even though i enabled Lazy mode application on load of page executes this sop(s) which means iterator gets executed on load of page.
    I want to prevent execution of iterator on load of page to boost the page load time. i have VO draged dropped on the page but they are rendered on click of search button. So execution of Iterator impacts the performance.
    Any suggeston will be appriciable.
    Thanks & Regards,
    Kevin Chheda

    Hi Shay Shmeltzer,
    Thanks for the reply.
    Yes you are correct that through post back we can display the result after user has interacted with page. But when i entered some System.out.println()s in the getter and setter of Impl they were executed on load, which implies that post back just controlls when to display data. And when we set the EL rendered="#{adfFacesContext.postback == true}", On load of page iterator is executed and only data is not displayed, which causes one query on load of page which is not desired.
    My ultimate aim is to boost up the onload time and not to query databse when not reqired to prevent Database hit. Through this technique i think we can boost up time by not rendering data on page but cannot prevent free hit to Database.
    Revert in case my assumption need to be refined, and also i would like to know what exactly happens when we enable Lazzy mode option in impl tuning. And how do i assure that it is not querying Database.
    Thanks & Regards,
    Kevin Chheda

  • Need help Setting up Multiple Static Ip , 1 for each port of the fios router

    Need help Setting up multiple Static Ip on my fios router
    I have been trying to figure out how to set up multiple ip in my fios router.
    However I kind of managed how to set up multiple static ip However the way I want it is for each port of my router to have an external ip signed to it. ( like 4 different modem in 1 )
    Verizon gave me 5 static ip but they can not help me how to set it up.
    Have anyone here done more then one static ip on different ports? I assume that the process will be the after the second static ip.

    You want to set up Static Nat. You will not assign the IP to a port, but rather to a local machine. Figure out what machines you want your IP's to go to. Under the firewall section you will see static nat. Pick the machine you want and enter one of the IP's you were assigned.

  • JTree custom renderer setting selection background color problem

    Hi,
    I have a JTree with a custom icon renderer that displays an icon. The JTree is part of a TreeTable component. Iam having a problem setting the selection background uniformly for the entire row. There is no problem when there is no row selected in the JTable.
    My present code looks like this:
    Iam overriding paint in my renderer which extends DefaultCellRenderer.
           super.paint(g);
            Color bColor = null;
            if(!m_selected) {
                 if(currRow % 2 == 0) {
                      bColor = Color.WHITE;
                 } else {
                                                    bColor = backColor;
            } else {
                 bColor = table.getSelectionBackground();                  bColor = getRowSelectionColor();
         if(bColor != null) {
                           g.setColor(bColor);
             if(!m_selected) {
                   g.setXORMode(new Color(0xFF, 0xFF, 0xFF));
             } else {
                 g.setXORMode(new Color(0x00, 0x00, 0x00));
                  I have a color I arrive at using some algorithm that I want using method getRowSelectionColor(). The other cells in the row have this color. But the cell containing the tree node shows different color. Iam not able to arrive at the right combination of the color to set and the xor color so my tree node also looks like the other cells in the row.
    It is not a problem really as the table still looks good. Its just that the tree node looks like it has been highlighted and this might cause a problem when a table cell is highlighed later on in the application ( two cells in the row would be highlighted causing confusion).
    Any help would be appreciated.
    Regards,
    vidyut

    Hi Camickr,
    Thanks for the reply. Iam sorry I didn't include the sources the first time around. There were too many of them. I have created a small, self-contained, compilable program that demonstrates the problem and including it herewith. Still there's quite many files but they are all needed Iam afraid. The only one you will have to concern yourself fior this problem is the file IconRenderer.java. The treenode background and the other cells background are not in sync when table row is not selected in this example though. But they are in my real program. I just need them to be in sync i.e have the same background color when the row is selected.
    Your help would be very much appreciated.
    These are the files that are included below:
    1. AbstractTreeTableModel.java
    2. Bookmarks.java
    3. BookmarksModel.java
    4. DynamicTreeTableModel.java
    5. IconRenderer.java
    6. IndicatorRenderer.java
    7. JTreeTable.java
    8. TreeTableExample3.java (contains main)
    9. TreeTableModel.java
    10. TreeTableModelAdapter.java
    The copyright and javadocs information has been stripped for clarity.
    cheers,
    vidyut
    // AbstractTreeTableModel.java BEGIN
    import javax.swing.tree.*;
    import javax.swing.event.*;
    public abstract class AbstractTreeTableModel implements TreeTableModel {
        protected Object root;    
        protected EventListenerList listenerList = new EventListenerList();
        public AbstractTreeTableModel(Object root) {
            this.root = root;
        // Default implementations for methods in the TreeModel interface.
        public Object getRoot() {
            return root;
        public boolean isLeaf(Object node) {
            return getChildCount(node) == 0;
        public void valueForPathChanged(TreePath path, Object newValue) {}
        // This is not called in the JTree's default mode:
        // use a naive implementation.
        public int getIndexOfChild(Object parent, Object child) {
            for (int i = 0; i < getChildCount(parent); i++) {
             if (getChild(parent, i).equals(child)) {
                 return i;
         return -1;
        public void addTreeModelListener(TreeModelListener l) {
            listenerList.add(TreeModelListener.class, l);
        public void removeTreeModelListener(TreeModelListener l) {
            listenerList.remove(TreeModelListener.class, l);
        protected void fireTreeNodesChanged(Object source, Object[] path,
                                            int[] childIndices,
                                            Object[] children) {
            // Guaranteed to return a non-null array
            Object[] listeners = listenerList.getListenerList();
            TreeModelEvent e = null;
            // Process the listeners last to first, notifying
            // those that are interested in this event
            for (int i = listeners.length-2; i>=0; i-=2) {
                if (listeners==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeNodesChanged(e);
    protected void fireTreeNodesInserted(Object source, Object[] path,
    int[] childIndices,
    Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    TreeModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length-2; i>=0; i-=2) {
    if (listeners[i]==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeNodesInserted(e);
    protected void fireTreeNodesRemoved(Object source, Object[] path,
    int[] childIndices,
    Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    TreeModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length-2; i>=0; i-=2) {
    if (listeners[i]==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeNodesRemoved(e);
    protected void fireTreeStructureChanged(Object source, Object[] path,
    int[] childIndices,
    Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    TreeModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length-2; i>=0; i-=2) {
    if (listeners[i]==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeStructureChanged(e);
    // Default impelmentations for methods in the TreeTableModel interface.
    public Class getColumnClass(int column) { return Object.class; }
    public boolean isCellEditable(Object node, int column) {
    return getColumnClass(column) == TreeTableModel.class;
    public void setValueAt(Object aValue, Object node, int column) {}
    // Left to be implemented in the subclass:
    * public Object getChild(Object parent, int index)
    * public int getChildCount(Object parent)
    * public int getColumnCount()
    * public String getColumnName(Object node, int column)
    * public Object getValueAt(Object node, int column)
    // AbstractTreeTableModel.java END
    // Bookmarks.java BEGIN
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    import javax.swing.text.html.parser.*;
    public class Bookmarks {
    /** The root node the bookmarks are added to. */
    private BookmarkDirectory root;
    * Creates a new Bookmarks object, with the entries coming from
    * <code>path</code>.
    public Bookmarks(String path) {
         root = new BookmarkDirectory("Bookmarks");
         if (path != null) {
         parse(path);
    * Returns the root of the bookmarks.
    public BookmarkDirectory getRoot() {
         return root;
    protected void parse(String path) {
         try {
         BufferedReader reader = new BufferedReader(new FileReader
                                       (path));
         new ParserDelegator().parse(reader, new CallbackHandler(), true);
         catch (IOException ioe) {
         System.out.println("IOE: " + ioe);
         JOptionPane.showMessageDialog(null, "Load Bookmarks",
                             "Unable to load bookmarks",
                             JOptionPane.ERROR_MESSAGE);
    private static final short NO_ENTRY = 0;
    private static final short BOOKMARK_ENTRY = 2;
    private static final short DIRECTORY_ENTRY = 3;
    private class CallbackHandler extends HTMLEditorKit.ParserCallback {
         /** Parent node that new entries are added to. */
         private BookmarkDirectory parent;
         /** The most recently parsed tag. */
         private HTML.Tag tag;
         /** The last tag encountered. */
         private HTML.Tag lastTag;
         * The state, will be one of NO_ENTRY, DIRECTORY_ENTRY,
    * or BOOKMARK_ENTRY.
         private short state;
         * Date for the next BookmarkDirectory node.
         private Date parentDate;
         * The values from the attributes are placed in here. When the
         * text is encountered this is added to the node hierarchy and a
    * new instance is created.
         private BookmarkEntry lastBookmark;
         * Creates the CallbackHandler.
         public CallbackHandler() {
         parent = root;
         lastBookmark = new BookmarkEntry();
         // HTMLEditorKit.ParserCallback methods
         * Invoked when text in the html document is encountered. Based on
         * the current state, this will either: do nothing
    * (state == NO_ENTRY),
         * create a new BookmarkEntry (state == BOOKMARK_ENTRY) or
    * create a new
         * BookmarkDirectory (state == DIRECTORY_ENTRY). If state is
    * != NO_ENTRY, it is reset to NO_ENTRY after this is
    * invoked.
    public void handleText(char[] data, int pos) {
         switch (state) {
         case NO_ENTRY:
              break;
         case BOOKMARK_ENTRY:
              // URL.
              lastBookmark.setName(new String(data));
    parent.add(lastBookmark);
    lastBookmark = new BookmarkEntry();
              break;
         case DIRECTORY_ENTRY:
              // directory.
              BookmarkDirectory newParent = new
                   BookmarkDirectory(new String(data));
              newParent.setCreated(parentDate);
              parent.add(newParent);
              parent = newParent;
              break;
         default:
              break;
    state = NO_ENTRY;
         * Invoked when a start tag is encountered. Based on the tag
         * this may update the BookmarkEntry and state, or update the
         * parentDate.
         public void handleStartTag(HTML.Tag t, MutableAttributeSet a,
                        int pos) {
         lastTag = tag;
         tag = t;
         if (t == HTML.Tag.A && lastTag == HTML.Tag.DT) {
    long lDate;
              // URL
              URL url;
              try {
              url = new URL((String)a.getAttribute(HTML.Attribute.HREF));
              } catch (MalformedURLException murle) {
              url = null;
              lastBookmark.setLocation(url);
              // created
              Date date;
              try {
    lDate = Long.parseLong((String)a.getAttribute("add_date"));
    if (lDate != 0l) {
    date = new Date(1000l * lDate);
    else {
    date = null;
              } catch (Exception ex) {
              date = null;
              lastBookmark.setCreated(date);
              // last visited
              try {
    lDate = Long.parseLong((String)a.
    getAttribute("last_visit"));
    if (lDate != 0l) {
    date = new Date(1000l * lDate);
    else {
    date = null;
              } catch (Exception ex) {
              date = null;
              lastBookmark.setLastVisited(date);
              state = BOOKMARK_ENTRY;
         else if (t == HTML.Tag.H3 && lastTag == HTML.Tag.DT) {
              // new node.
              try {
              parentDate = new Date(1000l * Long.parseLong((String)a.
                                  getAttribute("add_date")));
              } catch (Exception ex) {
              parentDate = null;
              state = DIRECTORY_ENTRY;
         * Invoked when the end of a tag is encountered. If the tag is
         * a DL, this will set the node that parents are added to the current
         * nodes parent.
         public void handleEndTag(HTML.Tag t, int pos) {
         if (t == HTML.Tag.DL && parent != null) {
              parent = (BookmarkDirectory)parent.getParent();
    public static class BookmarkDirectory extends DefaultMutableTreeNode {
         /** Dates created. */
         private Date created;
         public BookmarkDirectory(String name) {
         super(name);
         public void setName(String name) {
         setUserObject(name);
         public String getName() {
         return (String)getUserObject();
         public void setCreated(Date date) {
         this.created = date;
         public Date getCreated() {
         return created;
    public static class BookmarkEntry extends DefaultMutableTreeNode {
         /** User description of the string. */
         private String name;
         /** The URL the bookmark represents. */
         private URL location;
         /** Dates the URL was last visited. */
         private Date lastVisited;
         /** Date the URL was created. */
         private Date created;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setLocation(URL location) {
         this.location = location;
         public URL getLocation() {
         return location;
         public void setLastVisited(Date date) {
         lastVisited = date;
         public Date getLastVisited() {
         return lastVisited;
         public void setCreated(Date date) {
         this.created = date;
         public Date getCreated() {
         return created;
         public String toString() {
         return getName();
    // Bookmarks.java END
    // BookmarksModel.java BEGIN
    import java.util.Date;
    public class BookmarksModel extends DynamicTreeTableModel {
    * Names of the columns.
    private static final String[] columnNames =
    { "Name", "Location", "Last Visited", "Created" };
    * Method names used to access the data to display.
    private static final String[] methodNames =
    { "getName", "getLocation", "getLastVisited","getCreated" };
    * Method names used to set the data.
    private static final String[] setterMethodNames =
    { "setName", "setLocation", "setLastVisited","setCreated" };
    private static final Class[] classes =
    { TreeTableModel.class, String.class, Date.class, Date.class };
    public BookmarksModel(Bookmarks.BookmarkDirectory root) {
         super(root, columnNames, methodNames, setterMethodNames, classes);
    public boolean isCellEditable(Object node, int column) {
         switch (column) {
         case 0:
         // Allow editing of the name, as long as not the root.
         return (node != getRoot());
         case 1:
         // Allow editing of the location, as long as not a
         // directory
         return (node instanceof Bookmarks.BookmarkEntry);
         default:
         // Don't allow editing of the date fields.
         return false;
    // BookmarksModel.java END
    // DynamicTreeTableModel.java BEGIN
    import java.lang.reflect.*;
    import javax.swing.tree.*;
    public class DynamicTreeTableModel extends AbstractTreeTableModel {
    /** Names of the columns, used for the TableModel getColumnName method. */
    private String[] columnNames;
    private String[] methodNames;
    private String[] setterMethodNames;
    /** Column classes, used for the TableModel method getColumnClass. */
    private Class[] cTypes;
    public DynamicTreeTableModel(TreeNode root, String[] columnNames,
                        String[] getterMethodNames,
                        String[] setterMethodNames,
                        Class[] cTypes) {
         super(root);
         this.columnNames = columnNames;
         this.methodNames = getterMethodNames;
         this.setterMethodNames = setterMethodNames;
         this.cTypes = cTypes;
    public int getChildCount(Object node) {
         return ((TreeNode)node).getChildCount();
    public Object getChild(Object node, int i) {
         return ((TreeNode)node).getChildAt(i);
    public boolean isLeaf(Object node) {
         return ((TreeNode)node).isLeaf();
    public int getColumnCount() {
         return columnNames.length;
    public String getColumnName(int column) {
         if (cTypes == null || column < 0 || column >= cTypes.length) {
         return null;
         return columnNames[column];
    public Class getColumnClass(int column) {
         if (cTypes == null || column < 0 || column >= cTypes.length) {
         return null;
         return cTypes[column];
    public Object getValueAt(Object node, int column) {
         try {
         Method method = node.getClass().getMethod(methodNames[column],
                                  null);
         if (method != null) {
              return method.invoke(node, null);
         catch (Throwable th) {}
         return null;
    * Returns true if there is a setter method name for column
    * <code>column</code>. This is set in the constructor.
    public boolean isCellEditable(Object node, int column) {
    return (setterMethodNames != null &&
         setterMethodNames[column] != null);
    // Note: This looks up the methods each time! This is rather inefficient;
    // it should really be changed to cache matching
    // methods/constructors
    // based on <code>node</code>'s class, and code>aValue</code>'s
    //class.
    public void setValueAt(Object aValue, Object node, int column) {
         boolean found = false;
         try {
         // We have to search through all the methods since the
         // types may not match up.
         Method[] methods = node.getClass().getMethods();
         for (int counter = methods.length - 1; counter >= 0; counter--) {
              if (methods[counter].getName().equals
              (setterMethodNames[column]) && methods[counter].
              getParameterTypes() != null && methods[counter].
              getParameterTypes().length == 1) {
              // We found a matching method
              Class param = methods[counter].getParameterTypes()[0];
              if (!param.isInstance(aValue)) {
                   // Yes, we can use the value passed in directly,
                   // no coercision is necessary!
                   if (aValue instanceof String &&
                   ((String)aValue).length() == 0) {
                   // Assume an empty string is null, this is
                   // probably bogus for here.
                   aValue = null;
                   else {
                   // Have to attempt some sort of coercision.
                   // See if the expected parameter type has
                   // a constructor that takes a String.
                   Constructor cs = param.getConstructor
                   (new Class[] { String.class });
                   if (cs != null) {
                        aValue = cs.newInstance(new Object[]
                                       { aValue });
                   else {
                        aValue = null;
              // null either means it was an empty string, or there
              // was no translation. Could potentially deal with these
              // differently.
              methods[counter].invoke(node, new Object[] { aValue });
              found = true;
              break;
         } catch (Throwable th) {
         System.out.println("exception: " + th);
         if (found) {
         // The value changed, fire an event to notify listeners.
         TreeNode parent = ((TreeNode)node).getParent();
         fireTreeNodesChanged(this, getPathToRoot(parent),
                        new int[] { getIndexOfChild(parent, node) },
                        new Object[] { node });
    public TreeNode[] getPathToRoot(TreeNode aNode) {
    return getPathToRoot(aNode, 0);
    private TreeNode[] getPathToRoot(TreeNode aNode, int depth) {
    TreeNode[] retNodes;
         // This method recurses, traversing towards the root in order
         // size the array. On the way back, it fills in the nodes,
         // starting from the root and working back to the original node.
    /* Check for null, in case someone passed in a null node, or
    they passed in an element that isn't rooted at root. */
    if(aNode == null) {
    if(depth == 0)
    return null;
    else
    retNodes = new TreeNode[depth];
    else {
    depth++;
    if(aNode == root)
    retNodes = new TreeNode[depth];
    else
    retNodes = getPathToRoot(aNode.getParent(), depth);
    retNodes[retNodes.length - depth] = aNode;
    return retNodes;
    // DynamicTreeTableModel.java END
    // IconRenderer.java BEGIN
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.plaf.basic.BasicTreeUI;
    class IconRenderer extends DefaultTreeCellRenderer
    // Color backColor = new Color(0xD0, 0xCC, 0xFF);
    Color backColor = new Color(0xF0, 0xF0, 0xE0);
    String tipText = "";
    JTree tree;
    int currRow = 0;
    boolean m_selected;
    JTable table;
    public IconRenderer(JTree tree, JTable table) {
    this.table = table;
    // setBackground(backColor);
    setBackground(Color.GREEN);
    setForeground(Color.black);
         this.tree = tree;
    public Component getTreeCellRendererComponent(JTree tree, Object value,
    boolean selected,
    boolean expanded, boolean leaf,
    int row, boolean hasFocus) {
         Object node = null;
         super.getTreeCellRendererComponent(
    tree, value, selected,
    expanded, leaf, row,
    hasFocus);
         TreePath treePath = tree.getPathForRow(row);
    if(treePath != null)
              node = treePath.getLastPathComponent();
    currRow = row;
    m_selected = selected;
    DefaultMutableTreeNode itc = null;
    if (node instanceof DefaultMutableTreeNode) {
    itc = (DefaultMutableTreeNode)node;
         setClosedIcon(closedIcon);
    setOpenIcon(openIcon);
    return this;
    /* Override the default to send back different strings for folders and leaves. */
    public String getToolTipText() {
    return tipText;
    * Paints the value. The background is filled based on selected.
    public void paint(Graphics g) {
         super.paint(g);
         Color bColor = null;
         if(!m_selected) {
              System.out.println(" iconren not sel currRow " + currRow);
              if(currRow % 2 == 0) {
                   bColor = Color.WHITE;
              } else {
              bColor = backColor;
         } else {
              bColor = table.getSelectionBackground();
              System.out.println("in else selbg = " + bColor);           
              bColor = new Color(0xF0, 0xCC, 0x92);
              System.out.println(" bColor aft = " + bColor);           
         int imageOffset = -1;
         if(bColor != null) {
         imageOffset = getLabelStart();
         g.setColor(bColor);
         if(!m_selected) {
              System.out.println(" not sel setting white ");
              g.setXORMode(new Color(0xFF, 0xFF, 0xFF));
         } else {
    //          g.setXORMode(new Color(0xCC, 0xCC, 0x9F));
              g.setXORMode(new Color(0x00, 0x00, 0x00));
              System.out.println(" using color = " + g.getColor());           
         if(getComponentOrientation().isLeftToRight()) {
         g.fillRect(imageOffset, 0, getWidth() - 1 - imageOffset,
                   getHeight());
         } else {
         g.fillRect(0, 0, getWidth() - 1 - imageOffset,
                   getHeight());
    private int getLabelStart() {
         Icon currentI = getIcon();
         if(currentI != null && getText() != null) {
         return currentI.getIconWidth() + Math.max(0, getIconTextGap() - 1);
         return 0;
    // IconRenderer.java END
    // IndicatorRenderer.java BEGIN
    // import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    import javax.swing.table.*;
    import javax.swing.table.*;
    import javax.swing.plaf.basic.*;
    import java.awt.event.*;
    import java.util.EventObject;
    import java.text.NumberFormat;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.StringTokenizer;
    import java.util.Arrays;
    class IndicatorRenderer extends DefaultTableCellRenderer {
    /** Makes sure the number of displayed in an internationalized
    * manner. */
    protected NumberFormat formatter;
    /** Row that is currently being painted. */
    protected int lastRow;
    protected int reloadRow;
    protected int reloadCounter;
    protected TreeTableModel treeTableModel;
    protected TreeTableModelAdapter treeTblAdapter;
    protected JTable table;
    Component renderer = null;
    Color backColor = new Color(0xF0, 0xF0, 0xE0);
    IndicatorRenderer(TreeTableModelAdapter treeTblAdapter, TreeTableModel treeTableModel) {
         setHorizontalAlignment(JLabel.RIGHT);
         setFont(new Font("serif", Font.BOLD, 12));
         this.treeTableModel = treeTableModel;
         this.treeTblAdapter = treeTblAdapter;
    * Invoked as part of DefaultTableCellRenderers implemention. Sets
    * the text of the label.
    public void setValue(Object value) {
    /* setText((value == null) ? "---" : formatter.format(value)); */
         setText((value == null) ? "---" : (String) value.toString());
    * Returns this.
    public Component getTableCellRendererComponent(JTable table,
    Object value, boolean isSelected, boolean hasFocus,
    int row, int column) {
         renderer = super.getTableCellRendererComponent(table, value, isSelected,
    hasFocus, row, column);
         lastRow = row;
         this.table = table;
              if(isSelected) {
                   doMask(hasFocus, isSelected);
              } else
              setBackground(table.getBackground());
    return renderer;
    * If the row being painted is also being reloaded this will draw
    * a little indicator.
    public void paint(Graphics g) {
         super.paint(g);
    private void doMask(boolean hasFocus, boolean selected) {
              maskBackground(hasFocus, selected);
    private void maskBackground(boolean hasFocus, boolean selected) {
              Color seed = null;
              seed = table.getSelectionBackground();
              Color color = seed;
              if (color != null) {
                   setBackground(
    new Color(0xF0, 0xCC, 0x92));
    // IndicatorRenderer.java END
    // JTreeTable.java BEGIN
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    import javax.swing.table.*;
    import java.awt.event.*;
    import java.util.EventObject;
    public class JTreeTable extends JTable {
    /** A subclass of JTree. */
    protected TreeTableCellRenderer tree;
    protected IndicatorRenderer indicatorRenderer = null;
    public JTreeTable(TreeTableModel treeTableModel) {
         super();
         // Creates the tree. It will be used as a renderer and editor.
         tree = new TreeTableCellRenderer(treeTableModel);
         TreeTableModelAdapter tdap = new TreeTableModelAdapter(treeTableModel, tree);
         // Installs a tableModel representing the visible rows in the tree.
         super.setModel(tdap);
         // Forces the JTable and JTree to share their row selection models.
         ListToTreeSelectionModelWrapper selectionWrapper = new
         ListToTreeSelectionModelWrapper();
         tree.setSelectionModel(selectionWrapper);
         setSelectionModel(selectionWrapper.getListSelectionModel());
         // Installs the tree editor renderer and editor.
         setDefaultRenderer(TreeTableModel.class, tree);
         setDefaultEditor(TreeTableModel.class, new TreeTableCellEditor());
         indicatorRenderer = new IndicatorRenderer(tdap, treeTableModel);     
         // No grid.
         setShowGrid(false);
         // No intercell spacing
         setIntercellSpacing(new Dimension(0, 0));     
         // And update the height of the trees row to match that of
         // the table.
         //if (tree.getRowHeight() < 1) {
         // Metal looks better like this.
         setRowHeight(20);
    public TableCellRenderer getCellRenderer(int row, int col) {
              if(col == 0)
              return tree;
              else
              return indicatorRenderer;     
    public void updateUI() {
         super.updateUI();
         if(tree != null) {
         tree.updateUI();
         // Do this so that the editor is referencing the current renderer
         // from the tree. The renderer can potentially change each time
         // laf changes.
         setDefaultEditor(TreeTableModel.class, new TreeTableCellEditor());
         // Use the tree's default foreground and background colors in the
         // table.
    LookAndFeel.installColorsAndFont(this, "Tree.background",
    "Tree.foreground", "Tree.font");
    public int getEditingRow() {
    return (getColumnClass(editingColumn) == TreeTableModel.class) ? -1 :
         editingRow;
    private int realEditingRow() {
         return editingRow;
    public void sizeColumnsToFit(int resizingColumn) {
         super.sizeColumnsToFit(resizingColumn);
         if (getEditingColumn() != -1 && getColumnClass(editingColumn) ==
         TreeTableModel.class) {
         Rectangle cellRect = getCellRect(realEditingRow(),
                             getEditingColumn(), false);
    Component component = getEditorComponent();
         component.setBounds(cellRect);
    component.validate();
    public void setRowHeight(int rowHeight) {
    super.setRowHeight(rowHeight);
         if (tree != null && tree.getRowHeight() != rowHeight) {
    tree.setRowHeight(getRowHeight());
    public JTree getTree() {
         return tree;
    public boolean editCellAt(int row, int column, EventObject e){
         boolean retValue = super.editCellAt(row, column, e);
         if (retValue && getColumnClass(column) == TreeTableModel.class) {
         repaint(getCellRect(row, column, false));
         return retValue;
    public class TreeTableCellRenderer extends JTree implements
         TableCellRenderer {
         /** Last table/tree row asked to renderer. */
         protected int visibleRow;
         /** Border to draw around the tree, if this is non-null, it will
         * be painted. */
         protected Border highlightBorder;
         public TreeTableCellRenderer(Tr

  • Setting up a static value in a field then saving it

    if i have the case of a field, and i add a dynamic action to set a static value for it (e.g. a status field and when accessing a certain form it should change the STATUS field to CONFIRMED as a static text), how do i make sure that this value gets saved into the database?
    meaning, when i create the assigned form and set the dynamic action to display the status (as a display only field) as "confirmed", when pressing the apply changes button nothing happens and the CONFIRMED status does not get saved into the database.

    Make sure the printer is at least 3 feet away from the router.  Now try here.
    Set a static IP in the printer (click here) outside the DHCP range of the router (check your manual). 
        This is for Linksys routers but can be used for all routers.  Verify your DHCP range and change this
        first if needed.  More Wireless Printing help is here.
    Say thanks by clicking the Kudos Thumbs Up to the right in the post.
    If my post resolved your problem, please mark it as an Accepted Solution ...
    I worked for HP but now I'm retired!

  • DHCPv6 Server. v6 IP only. Do I need IPv6 DHCP in case setting address manually. PROBLEMS

    I want network without Ipv4, only IPv6. Ipv4 is disabled on server and client. After setting IPv6 address manually to 2000:1::1/64 I still have dhcp enabled on interface. And when installing roles (dhcp, dns server) on server it gives message that
    no static addresses is available. Moreover after setting dhcp server scope 2000:1:: it serves addresses to dhcp server.
    How set correct static IPv6?
    After publish route:
    netsh int ipv6 set interface Local adv=en man=en other=en
    netsh int ipv6 add route 2000:1::/64 Ethernet publish=yes
    I have two ipv6 addresses on client? Highlighted address stays as static after releasing adapter and it looks like I do not need dhcp server at all??
    Ethernet adapter Ethernet:
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter
       Physical Address. . . . . . . . . : 00-15-5D-01-02-06
       DHCP Enabled. . . . . . . . . . . : Yes
       Autoconfiguration Enabled . . . . : Yes
       IPv6 Address. . . . . . . . . . . : 2000:1::35ac:d8ae:dac6:5b69(Preferred)
       Lease Obtained. . . . . . . . . . : 22 dec 2013 11:28:33
       Lease Expires . . . . . . . . . . : 22 dec 2013 11:39:48
       IPv6 Address. . . . . . . . . . . : 2000:1::b542:48c6:ac2a:4a18(Preferred)
       Link-local IPv6 Address . . . . . : fe80::b542:48c6:ac2a:4a18%12(Preferred)
       Default Gateway . . . . . . . . . :
       DHCPv6 IAID . . . . . . . . . . . : 301995357
       DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1A-48-61-B0-00-15-5D-01-02-06
       DNS Servers . . . . . . . . . . . : 2000:1::1
       NetBIOS over Tcpip. . . . . . . . : Disabled

    Hi,
    I got something similar with you.
    Since I don’t have a DHCP server in my environment, I just specified a static IP for test. And when I ran netsh interface ipv6 set address “Local Area Connection”,
    the IP didn’t modified as expected. It just ignored the old entry and added a new one.
    It is worth mentioning, there is no problem with IPv4.
    As a workaround, you can manually disable DHCP for the clients.

  • Popping and static problem

    I am getting popping and static when any audio plays on my G4.
    Here are the things that I have tried:
    1) reset the NVRAM in Open Firmware
    2) zeroed the HD an installed fresh OS
    3) installed OS on second internal drive and booted from that drive
    4) ran TechTool Pro tests and everything passed
    The only other thing that I can think of (which I probably should have done earlier) is to disconnect and reconnect the cables on all of the drives. Any other suggestions will be appreciated.
    Thanks,
    Nathan

    Tom,
    Tried your suggestion with the speaker cable as well as the drive cables - no joy. I may have found the culprit. I unplugged the power chord for about 30 minutes or so before I opened up the unit. When I restarted, I got a message that the date was set to an earlier date or something to that effect. I read earlier today on Texas Mac Man's site that this indicates that the battery is bad.
    Could this be the problem? Can I start up the computer with the battery out to check if this is causing the static?
    Thanks,
    Nathan

  • Setting/keeping a static IP on iPad with Apple Configurator?

    Hey there
    We are just getting some iPads into our school and I have been configuring them with Apple Configurator which has gone pretty well so far.
    The problem I am having is that each of our iPads has to be assigned a Static IP address (for web filtering reasons) and each time I plug the iPad back in for a refresh or for a new install of an app the iPad switches back to DHCP and I have to manually type the static IP back in.
    This is rapidly become a pain the more iPads we get in, is there a way to set Configurator to either leave the IP settings alone or to set it so that it pre-fills the static IP settings?  I've looked through all the profile options and nothing jumps out!
    Any help would be greatly appreciated
    Neal

    Configuration profiles do not allow you to apply a static IP address to a device.
    Instead, it would be highly recommended to configure static IP addressing within the DHCP server itself. This would accomplish what you want without worrying about which proifle goes on what device, etc. Configurator can also export the MAC addresses to make life easier in setting this up.
    Right click the 'All Devices' in the Supervise tab, click Export Info > Device Information > WiFi MAC Address.

  • Travelsound Notebook 500 extreme static problems

    Hello,
    I am hoping someone can help me with a problem I have been having with my travelsound 500 speakers. I installed the speakers and couldn't help but notice a very loud static noise coming from the speakers. I think I tried everything to remove it and found out where the source of the static was coming from. I have a skype CIT200 phone attatched and when I unplug the base set, the problem goes away. My question is therefore, is there anything I can do to have both the speakers and phone plugged in at the same time without having to unplug one then plug the other in? I really would appreciate any help or suggestions you can offer.
    Thank you
    m_ceberus

    Hello,
    I am hoping someone can help me with a problem I have been having with my travelsound 500 speakers. I installed the speakers and couldn't help but notice a very loud static noise coming from the speakers. I think I tried everything to remove it and found out where the source of the static was coming from. I have a skype CIT200 phone attatched and when I unplug the base set, the problem goes away. My question is therefore, is there anything I can do to have both the speakers and phone plugged in at the same time without having to unplug one then plug the other in? I really would appreciate any help or suggestions you can offer.
    Thank you
    m_ceberus

  • Setting Value of Static Const

    Hi,
    I want to set the value of a static const to a localised string...
    public static const DEFAULT_PROPERTY_NAME:String =
          ResourceManager.getInstance().getString(
            'strings', 'myVar');
    But it is always null...

    If this compiles, then the problem is that the ResourceManager is loaded with resources AFTER the static initializatino of this class occurs. You'll probalby have the same problem if you make it a static var and initialize it in the declaration of the var. However, you could make it a static var (or maybe even a static const) and initialize in the constructor of the first instance, with code like
    public MyClass()
        if (DEFAULT_PROPERTY_NAME == null)
            DEFAULT_PROPERTY_NAME = ResourceManager.getInstance().getString('strings', 'myVar');
    By the time you are constructing instances, the ResourceManager should be loaded with resources.
    Gordon Smith, Adobe

  • Set text of layer problem (escaping ' and " in javascript)

    Hi all
    I am using the Dreamweaver behaviour "set text of layer" and
    I am having problems with escaping
    single AND double quotes in the javascript.
    Because the text I want to set the Layer with contains some
    javascript.
    So the text of my layer contains both single and double
    quotes.
    I can escape the single quotes like this:
    But I can't escape the double quotes the same way for some
    reason.
    even if I use \" javascript thinks it's the end of the
    javascript function.
    So I have tried using &quot; in the javascript of the
    text to set, but strangely, although it works
    in Safari, it does not work in FireFox and IE.
    When I mouse over my javascript link set in the layer, the
    browser status bar shows the right thing
    in Safari, but in IE and FireFox, it shows extra double
    quotes...
    onClick="MM_setTextOfLayer('list','','<a
    href=&quot;javascript:;&quot;
    onClick=&quot;MM_showHideLayers(\'options\',\'\',\'show\')&quot;>designers</a>')"
    Anybody knows the answer to this one?
    seb ( [email protected])
    http://webtrans1.com | high-end web
    design
    Downloads: Slide Show, Directory Browser, Mailing List

    What about using the &#34; entity? That *should* work.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "(_seb_)" <[email protected]> wrote in message
    news:[email protected]...
    > doubling the quotes did not work.
    > But I solved the problem by removing the quotes all
    together:
    >
    > onClick="MM_setTextOfLayer('list','','<a
    href=javascript: ...
    >
    > that does it!
    >
    > Randy Edmunds wrote:
    >> Try doubling the quotes to escape them, for example:
    >>
    >> onClick="MM_setTextOfLayer('list','','<a
    href=""javascript:"" ...
    >>
    >> HTH,
    >> Randy
    >>
    >>
    >>> I am using the Dreamweaver behaviour "set text
    of layer" and I am having
    >>> problems with escaping single AND double quotes
    in the javascript.
    >>>
    >>> Because the text I want to set the Layer with
    contains some javascript.
    >>>
    >>> So the text of my layer contains both single and
    double quotes.
    >>>
    >>> I can escape the single quotes like this:
    >>> \'
    >>> But I can't escape the double quotes the same
    way for some reason.
    >>> even if I use \" javascript thinks it's the end
    of the javascript
    >>> function.
    >>>
    >>> So I have tried using &quot; in the
    javascript of the text to set, but
    >>> strangely, although it works in Safari, it does
    not work in FireFox and
    >>> IE.
    >>> When I mouse over my javascript link set in the
    layer, the browser
    >>> status bar shows the right thing in Safari, but
    in IE and FireFox, it
    >>> shows extra double quotes...
    >>>
    >>> onClick="MM_setTextOfLayer('list','','<a
    href=&quot;javascript:;&quot;
    >>>
    onClick=&quot;MM_showHideLayers(\'options\',\'\',\'show\')&quot;>designers</a>')"
    >>> Anybody knows the answer to this one?
    >
    >
    > --
    > seb ( [email protected])
    >
    http://webtrans1.com | high-end web
    design
    > Downloads: Slide Show, Directory Browser, Mailing List

Maybe you are looking for

  • Schedule Executed weekly except for a specific day of the month

    Hi all, I need to create a schedule that run weekly every sunday at 9 PM, except for 2nd day of the month it will run at 7 AM. I have created 2 schedules: 1. One to run weekly every sunday at 9 PM, but i don't know from where i can specify the days o

  • Assigning AnyConnect Client Profiles based on the machine?

    I have an ASA running 8.2.x code with AnyConnect 2.4.x.I have both Radius and LDAP (AD) AAA available. If a user connects from a company owned laptop, I want to push down AnyConnect client ProfileA (with scripts to map drives etc...) and network ACL'

  • GTX 750 compatibility

    Hi! Im new here and i have a question for you. I need some help because im not sure that my motherboard (ASR G41C-GS) is compatible with MSI GTX 750. My MB has one PCI-e 1.1 16x slot and this GPU has a PCI-e 3.0. Will this GPU even work with my MB an

  • Making all Filters work as Smart Filters

    In CS3 you could change something to make all filters act like smart filters, even though they won't. I found this worked very well, now I have CS4 and would like to do the same but can't remember what to do to make it work. Anyone remember what to d

  • SPRO - Create Destination for Import Post-Processing

    Hi, What is the significance of this setting in SPRO? SAP IMG -> Business Intelligence -> Transport Settings -> Create Destination for Import Post-Processing How and in what situations do we need to fill the entries for this setting? Thanks