Problem in Adding link to Masthead

Hi All,
I am a beginner in Portals
I want to add an extra link to the masthead.
For this I have done folowing steps
1. Masthead PAR download
2. Import this PAR into NWDS
3. Make changs in portalapp.xml - Adding Component Profile properties for standard Who's Who iview
       whoIsWhoLocation=pcd:portal_content/com.sap.pct/every_user/com.sap.pct.erp.ess.bp_folder/com.sap.pct.erp.ess.iviews/com.sap.pct.erp.ess.employee_search/com.sap.pct.erp.ess.whoiswho
WhoIsWhoText=Who's Who
4.In lightheaderiview.jsp file, I have made the changes to display the link Who's Who
5. Save
6. Quick PAR Upload was not working. so I did the PAR Upload from Portal
i.e. System Administartion->Support->Portal Runtime->Administartive Console->Upload
7. Created iview from the deployed PAR file
8. Save
The problem is that when I preview the iview I am getting the exception.
When I go to nwa and see the logs ..I get the error
java.lang.ClassNotFoundException: com.sapportals.portal.navigation.LightHeaderiView
What might be the reason?
Please help me with this.

Sometimes Jar files may be missed.
check whether you have the com.sap.portal.navigation.masthead_core.jar  file in the path  portalinf/private/exlib/
Also you can add the the link in the Headerview.jsp and light_headerview.jsp  direclty.
Raghu

Similar Messages

  • Problems with adding Library for a MySQL JDBC driver

    Good day,
    I am new with the JDeveloper package, so the following could be a user fault.
    I found the following:
    - I downloaded and installed Oracle JDeveloper 10.1.2.1.10 (latest version).
    - I downloaded the latest JDBC drivers for MySQL. ( mysql-connector-java-3.1.10 )
    Now, I did the following steps extracted from the link http://www.oracle.com/technology/products/jdev/tips/duff/mysql_and_oc4j3.html it should be quite easy to add the JDBC Drivers to the project.
    I did the steps with the following results:
    When I Edit the Project properties, follow Profiles -> Development -> Libraries
    When I do ' New' , fill in at JS2E the value 'MySQL' and fill in the Class Path (in my case 'C:\javaInstalls\mysql-connector-java-3.1.10\mysql-connector-java-3.1.10-bin.jar').
    In that case the [OK] is disabled. I should expect the [OK] button was enabled!
    My question: Is this a bug? When not, what am I doing wrong!
    Regards,
    Mike

    I tried it on an other system and had no problems with adding the libraries. It still is a problem on that particular system using the Dutch version of XP. The problem is that the Ok button stays disabled !
    Could it bw a version problem with Java? How ever no changes are made to the original configuration, so it should pick up as default the java version of JDeveloper self.

  • Problem in adding rows in a table

    Hello All ,
    I am having a strange problem in adding table rows here . All things seems to be in place . But when i click the button nothing happens . I have worked on much more complex tables and added rows safely but i cant understand what's happening here . I have saved the form as Dynamic XML form , interactive form , I have set the pagination of the repeating rows . But Heck !!! It's not working at all . I am totally confused . More over while i drag the table from the object palette an error appears and LC closes down .But when i click on the table at the toolbar and inserted table over there then it shows no error . What's happening ?? Any help is greatly appreciated .
    Script : form1.Page1.Subform1.Button1::click - (JavaScript, client)
    form1.Page1.Subform1.Table1.Row4.instanceManager.addInstance(1);
    Thanks .
    Bibhu.

    Hi,
    The way you described reminded me of another thread, where the index was not straightforward: Saving finished Form duplicates some subForms
    You can post your form to Acrobat.com, hit the Share and Publish buttons when prompted and then copy / paste the link here.
    Niall

  • Added Link at messageLovInput through personalizaton and getting error

    Hi Friends,
    While creating work order in eAM, Material Requirements secon is there, there we can find Item messagelovinput field. My clients wants to check Item details while selecting the item (long desc, on hand quantity etc..). For getting this functionality developed one custom page with item details and calling that page using link at item lov.
    1) added link at results table of Item lov and given at destination URI as follows
    OA.jsp?page=/xxnwc/oracle/apps/eam/workorder/webui/XXNWCItemDetailsPG&addBreadCrumb=Y&org_id={@OrganizationId}&inv_id={@InventoryItemId}.
    Issue
    1) open Item lov click on go --> we will get item in results table --> click on item details link --> open new custom page
    2) click on quick select at item then getting error like as follos
    Error: Cannot Display Page
    You cannot complete this task because you accessed this page using the browser's navigation buttons (the browser Back button, for example).
    To proceed, please select the Home link at the top of the application page to return to the main menu. Then, access this page again using the application's
    navigation controls (menu, links, and so on) instead of using the browser's navigation controls like Back and Forward.
    Please let me know how to resolve this issue.
    For replicating issue you can go
    Responsibility: Maintenance Super User > Work Orders tab> then go to “Material Requirements” section. > add link to Item lov
    Thanks in Advance,
    Hanimi.

    I'm a great fan of problems magically fixing themselves ... always breathe a sigh of relief if that happens during a troubleshoot.
    I was wondering about trouble with a piece of album art initially. But if that was afoot we'd expect the synch to be always dying on the same song (or songs from the same album).
    Perhaps it's just that the USB connection is getting grumpy during a *really long* sync. If that's what is going on, we could be able to make some progress by moving the music across in smaller batches.
    Switch the iPod over to manually managing content. Select a chunk of songs ... say, about 1.5 GB-worth, and copy them over.
    Does that complete successfully? If so, select another batch of about 1.5 GB, and copy them over, and so on until you've got the songs on. Once you've done that, you can switch her back to your preferred auto-sync settings.
    Any better luck getting stuff on in stages like that?

  • Functional link in masthead

    Hi,
    We added a new functiona link in masthead. I created a url iview in Portal and through development we made it as a link in masthead but when i click on that it is opening in the framework page, in the sense it is displaying whole portal screen in a new window and displaying in content are.I want it to open that website in new window like Help link.
    Please let me know i need to set any propert in that iview.
    Regards,
    Pradeep

    Hi Pradeep,
    Set the iView property "Launch in New Window" to Launch in Separate Window.
    Regards,
    Khushboo

  • How i will add new link in masthead iview

    Hi,
    i want to add  a new link in masthead iview,
    e.g. i want to add aboutus link .
    so what could be the code/procedure for header.jsp.
    Please help .
    Thanks
    Sanjay

    Hi Sanjay,
    -The three main files in the masthead are HeaderiView.jsp,LogInRedirect.jsp and LogOffConfirmMsg.jsp
    -The HeaderiView contains the masthead users see when they are in the portal.
    -Once you added your link to the HeaderiView.jsp,upload the par file.
    -Once the par file is uploaded to the portal,you need to create a masthead iview based on this par file.
    -Then this iView will be used for masthead on the framework page.
    -create a folder in portal catalog-right click the folder->create a iView from par->select your own masthead iView->choose next->choose default component  and click next->Enter the properties like-iView name,iView ID,prefix,Save as -iView and click next>save.
    Here is the important step :
    Add the iView to the framework page,then only it will be visible to the end users.
    Browse the ramework page being used by the portal in the portal catalog
    Right click on he page->edit->Page Layout->Select masthead iView on the framework page and click remove.
    now iViews(Right click)->Widgets_masthead->Add iView to page->Delta Link->Position the masthead.->Logoff and logon to the portal.
    It should work fine for you now I guess.
    Thank you.
    Regards,
    Karthick

  • Interactive report performance problem over database link - Oracle Gateway

    Hello all;
    This is regarding a thread Interactive report performance problem over database link that was posted by Samo.
    The issue that I am facing is when I use Oracle function like (apex_item.check_box) the query slow down by 45 seconds.
    query like this: (due to sensitivity issue, I can not disclose real table name)
    SELECT apex_item.checkbox(1,b.col3)
    , a.col1
    , a.col2
    FROM table_one a
    , table_two b
    WHERE a.col3 = 12345
    AND a.col4 = 100
    AND b.col5 = a.col5
    table_one and table_two are remote tables (non-oracle) which are connected using Oracle Gateway.
    Now if I run above queries without apex_item.checkbox function the query return or response is less than a second but if I have apex_item.checkbox then the query run more than 30 seconds. I have resolved the issues by creating a collection but it’s not a good practice.
    I would like to get ideas from people how to resolve or speed-up the query?
    Any idea how to use sub-factoring for the above scenario? Or others method (creating view or materialized view are not an option).
    Thank you.
    Shaun S.

    Hi Shaun
    Okay, I have a million questions (could you tell me if both tables are from the same remote source, it looks like they're possibly not?), but let's just try some things first.
    By now you should understand the idea of what I termed 'sub-factoring' in a previous post. This is to do with using the WITH blah AS (SELECT... syntax. Now in most circumstances this 'materialises' the results of the inner select statement. This means that we 'get' the results then do something with them afterwards. It's a handy trick when dealing with remote sites as sometimes you want the remote database to do the work. The reason that I ask you to use the MATERIALIZE hint for testing is just to force this, in 99.99% of cases this can be removed later. Using the WITH statement is also handled differently to inline view like SELECT * FROM (SELECT... but the same result can be mimicked with a NO_MERGE hint.
    Looking at your case I would be interested to see what the explain plan and results would be for something like the following two statements (sorry - you're going have to check them, it's late!)
    WITH a AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_one),
    b AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_two),
    sourceqry AS
    (SELECT  b.col3 x
           , a.col1 y
           , a.col2 z
    FROM table_one a
        , table_two b
    WHERE a.col3 = 12345
    AND   a.col4 = 100
    AND   b.col5 = a.col5)
    SELECT apex_item.checkbox(1,x), y , z
    FROM sourceqry
    WITH a AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_one),
    b AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_two)
    SELECT  apex_item.checkbox(1,x), y , z
    FROM table_one a
        , table_two b
    WHERE a.col3 = 12345
    AND   a.col4 = 100
    AND   b.col5 = a.col5If the remote tables are at the same site, then you should have the same results. If they aren't you should get the same results but different to the original query.
    We aren't being told the real cardinality of the inners select here so the explain plan is distorted (this is normal for queries on remote and especially non-oracle sites). This hinders tuning normally but I don't think this is your problem at all. How many distinct values do you normally get of the column aliased 'x' and how many rows are normally returned in total? Also how are you testing response times, in APEX, SQL Developer, Toad SQLplus etc?
    Sorry for all the questions but it helps to answer the question, if I can.
    Cheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)

  • Problem with adding Sun JSF RI v1.2 as a new library in JDeveloper 10.1.3.1

    Hi,
    I have a problem with adding a latest JSF 1.2 RI from Sun (https://javaserverfaces.dev.java.net/files/documents/1866/44998/jsf-1_2_03.zip) to JDeveloper as a new library.
    I created a new User library and added into it jsf-impl.jar and jsf-api.jar from JSF 1.2 RI.
    Then I try to create two new JSP Tag libraries based from .tld files.
    When a .tld file is placed in "TLD File:" field there is no information below about Library Version and Required JSP Version. If I check "Execute Tags in JSP Visual Editor" and click "Customize" button - list of tags in "Customize Tag Library" window is empty.
    I have errors when I try to use JSF Tags from this new library in JSP page like :
    "Can't create tag instance: f:view (class: null). Make sure, that the tag class or a library contained this class is available in this application"
    (free translation to English)
    Is this possible to add JSF RI v1.2 as another library in Jdeveloper 10.1.3.1 ?
    thanks for help
    koli

    Hi,
    This solution is not exactly for Jdeveloper 10.1.3.x I think.
    - "Create a JSF system library." section, point 2. - there is not possible to add library in folder other than User I see, so I added it in User folder.
    - "Register the JSF JSP tag libraries." section, point 5. - in JD 10.1.3 there is no dialog box, I checked checkbox "Show Tag Library in Palette". A new library was added to User folder but there is no new libraries in component Palette.
    Even as I use "Edit tag libraries .." from Component Palette context menu and add manually new tag libraries to selected, there is no libraries in Component Palette after it.
    I feel so problem is with different .tld files format, not with adding libraries method.
    Sun RI tld file (from version 1.2_03) fragment:
    <taglib xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
    version="2.1">
    <!-- ========== Tag Library Description Elements ========================= -->
    <description>
    The core JavaServer Faces custom actions that are independent of
    any particular RenderKit.
    </description>
    <tlib-version>1.2</tlib-version>
    <short-name>f</short-name>
    <uri>http://java.sun.com/jsf/core</uri>
    tld included in JD:
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
    <!-- ========== Tag Library Description Elements ========================= -->
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>f</short-name>
    <uri>http://java.sun.com/jsf/core</uri>
    <description>
    The core JavaServer Faces custom actions that are independent of
    any particular RenderKit.
    </description>
    Did JDeveloper 10.1.3.x maintain with taglib version 1.2 ?
    Regards
    koli

  • JTable sorting - problem when adding elements (complete code inside)

    I�m writing this email with reference to a recent posting here but this time with the code example. (I apologize for the duplicated posting � this time it will be with the code)
    Problem: when adding more elements to the JTable (sorted) the exception: ArrayIndexOutOfBoundsException is thrown.
    Example: If the elements in the table are 10 and then the user requests for 8 � the table will produce the correct result. However, if the user will ask for 11 items (>10) the exception will be thrown.
    The program: The program below (compiles and running). A JTable is constructed with 3 items, when you click the button - the return result should be 4 items - this will generate the error, WHY?
    I would highly appreciate your thoughts why this is happening and most importantly � how to fix it.
    Thanks a lot
    3 files:
    (1) TableSorterDemo
    (2) Traveler
    (3)TableSorter
    //TableSorterDemo:
    package sorter;
    import javax.swing.DefaultListModel;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.table.AbstractTableModel;
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    * TableSorterDemo is like TableDemo, except that it
    * inserts a custom model -- a sorter -- between the table
    * and its data model.  It also has column tool tips.
    public class TableSorterDemo implements ActionListener
         private JPanel superPanel;
         private JButton clickMe = new JButton("click me to get diff data");
         private boolean DEBUG = false;
         private DefaultListModel defaultListModel;
         private JTable table;
        public TableSorterDemo()
             superPanel = new JPanel(new BorderLayout());
             defaultListModel = new DefaultListModel();
             init1();
            TableSorter sorter = new TableSorter(new MyTableModel(defaultListModel)); //ADDED THIS     
            table = new JTable(sorter);             //NEW
            sorter.setTableHeader(table.getTableHeader()); //ADDED THIS
            table.setPreferredScrollableViewportSize(new Dimension(500, 70));
            //Set up tool tips for column headers.
            table.getTableHeader().setToolTipText(
                    "Click to specify sorting; Control-Click to specify secondary sorting");
            //Create the scroll pane and add the table to it.
            JScrollPane scrollPane = new JScrollPane(table);
            //Add the scroll pane to this panel.
            superPanel.add("Center", scrollPane);
            superPanel.add("South",clickMe);
            clickMe.addActionListener(this);              
        public JPanel getPanel()
             return superPanel;
        public void init1()
             //in real life this will be done from the db
             Traveler a = new Traveler();
             Traveler b = new Traveler();
             Traveler c = new Traveler();
             a.setFirstName("Elvis");
             a.setLastName("Presley");
             a.setSprot("Ping Pong");
             a.setNumYears(3);
             a.setVegetarian(true);
             b.setFirstName("Elton");
             b.setLastName("John");
             b.setSprot("Soccer");
             b.setNumYears(2);
             b.setVegetarian(true);
             c.setFirstName("shaquille");
             c.setLastName("oneil");
             c.setSprot("Golf");
             c.setNumYears(22);
             c.setVegetarian(true);
             defaultListModel.addElement(a);
             defaultListModel.addElement(b);
             defaultListModel.addElement(c);
        public void init2()
             //in real life this will be done from the db
             Traveler d = new Traveler();
             Traveler e = new Traveler();
             Traveler f = new Traveler();
             Traveler g = new Traveler();
             d.setFirstName("John");
             d.setLastName("Smith");
             d.setSprot("Tennis");
             d.setNumYears(32);
             d.setVegetarian(true);
             e.setFirstName("Ron");
             e.setLastName("Cohen");
             e.setSprot("Baseball");
             e.setNumYears(12);
             e.setVegetarian(true);
             f.setFirstName("Donald");
             f.setLastName("Mac Novice");
             f.setSprot("Vallyball");
             f.setNumYears(1);
             f.setVegetarian(true);
             g.setFirstName("Eithan");
             g.setLastName("Superstar");
             g.setSprot("Vallyball");
             g.setNumYears(21);
             g.setVegetarian(true);
             defaultListModel.addElement(d);
             defaultListModel.addElement(e);
             defaultListModel.addElement(f);
             defaultListModel.addElement(g);            
        class MyTableModel extends AbstractTableModel
             private DefaultListModel myModel;
             public MyTableModel(DefaultListModel m)
                  myModel=m;
            private String[] columnNames = {"First Name",
                                            "Last Name",
                                            "Sport",
                                            "# of Years",
                                            "Vegetarian"};
            public int getColumnCount()
                return columnNames.length;
            public int getRowCount()
                return myModel.size();
            public String getColumnName(int column)
                 return getNames()[column];             
             public String[] getNames()
                  String[] names = {"First Name", "Last Name", "Sport", "# of Years", "Vegetarian"};
                  return names;
            public Object getValueAt(int row, int col)
                 return distributeObjectsInTable(row, col, (Traveler) myModel.elementAt(row));
            public Object distributeObjectsInTable(int row, int col, Traveler tr)
               switch(col)
                         case 0:
                              return tr.getFirstName();
                         case 1:
                           return tr.getLastName();
                      case 2:
                           return tr.getSprot();
                      case 3:
                           return new Integer(tr.getNumYears());
                      case 4:
                           return new Boolean (tr.isVegetarian());
                     default:
                         return "Error";
            public Class getColumnClass(int c)
                return getValueAt(0, c).getClass();
        private static void createAndShowGUI()
            //Make sure we have nice window decorations.
            JFrame.setDefaultLookAndFeelDecorated(true);
            //Create and set up the window.
            JFrame frame = new JFrame("TableSorterDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            TableSorterDemo newContentPane = new TableSorterDemo();
            newContentPane.getPanel().setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane.getPanel());
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args)
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable()                   
                public void run()
                    createAndShowGUI();
         public void actionPerformed(ActionEvent ae)
              if (ae.getSource()==clickMe)
                   defaultListModel.removeAllElements();
                   init2(); //if the size of the model was less than 2 items - the result will be ok.
                              //in other words, if you commens the last 2 rows of this method (addElement(f) & g)
                             // the result will be fine.
                   table.updateUI();          
    }//(2) Traveler
    package sorter;
    public class Traveler
         private String firstName;
         private String lastName;
         private String sprot;
         private int numYears;
         private boolean vegetarian;
         public String getFirstName()
              return firstName;
         public String getLastName()
              return lastName;
         public int getNumYears()
              return numYears;
         public String getSprot()
              return sprot;
         public boolean isVegetarian()
              return vegetarian;
         public void setFirstName(String firstName)
              this.firstName = firstName;
         public void setLastName(String lastName)
              this.lastName = lastName;
         public void setNumYears(int numYears)
              this.numYears = numYears;
         public void setSprot(String sprot)
              this.sprot = sprot;
         public void setVegetarian(boolean vegetarian)
              this.vegetarian = vegetarian;
    }//(3)TableSorter
    package sorter;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.util.List;
    import javax.swing.*;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.*;
    public class TableSorter extends AbstractTableModel {
        protected TableModel tableModel;
        public static final int DESCENDING = -1;
        public static final int NOT_SORTED = 0;
        public static final int ASCENDING = 1;
        private static Directive EMPTY_DIRECTIVE = new Directive(-1, NOT_SORTED);
        public static final Comparator COMPARABLE_COMAPRATOR = new Comparator() {
            public int compare(Object o1, Object o2) {
                return ((Comparable) o1).compareTo(o2);
        public static final Comparator LEXICAL_COMPARATOR = new Comparator() {
            public int compare(Object o1, Object o2) {
                return o1.toString().compareTo(o2.toString());
        private Row[] viewToModel;
        private int[] modelToView;
        private JTableHeader tableHeader;
        private MouseListener mouseListener;
        private TableModelListener tableModelListener;
        private Map columnComparators = new HashMap();
        private List sortingColumns = new ArrayList();
        public TableSorter() {
            this.mouseListener = new MouseHandler();
            this.tableModelListener = new TableModelHandler();
        public TableSorter(TableModel tableModel) {
            this();
            setTableModel(tableModel);
        public TableSorter(TableModel tableModel, JTableHeader tableHeader) {
            this();
            setTableHeader(tableHeader);
            setTableModel(tableModel);
        private void clearSortingState() {
            viewToModel = null;
            modelToView = null;
        public TableModel getTableModel() {
            return tableModel;
        public void setTableModel(TableModel tableModel) {
            if (this.tableModel != null) {
                this.tableModel.removeTableModelListener(tableModelListener);
            this.tableModel = tableModel;
            if (this.tableModel != null) {
                this.tableModel.addTableModelListener(tableModelListener);
            clearSortingState();
            fireTableStructureChanged();
        public JTableHeader getTableHeader() {
            return tableHeader;
        public void setTableHeader(JTableHeader tableHeader) {
            if (this.tableHeader != null) {
                this.tableHeader.removeMouseListener(mouseListener);
                TableCellRenderer defaultRenderer = this.tableHeader.getDefaultRenderer();
                if (defaultRenderer instanceof SortableHeaderRenderer) {
                    this.tableHeader.setDefaultRenderer(((SortableHeaderRenderer) defaultRenderer).tableCellRenderer);
            this.tableHeader = tableHeader;
            if (this.tableHeader != null) {
                this.tableHeader.addMouseListener(mouseListener);
                this.tableHeader.setDefaultRenderer(
                        new SortableHeaderRenderer(this.tableHeader.getDefaultRenderer()));
        public boolean isSorting() {
            return sortingColumns.size() != 0;
        private Directive getDirective(int column) {
            for (int i = 0; i < sortingColumns.size(); i++) {
                Directive directive = (Directive)sortingColumns.get(i);
                if (directive.column == column) {
                    return directive;
            return EMPTY_DIRECTIVE;
        public int getSortingStatus(int column) {
            return getDirective(column).direction;
        private void sortingStatusChanged() {
            clearSortingState();
            fireTableDataChanged();
            if (tableHeader != null) {
                tableHeader.repaint();
        public void setSortingStatus(int column, int status) {
            Directive directive = getDirective(column);
            if (directive != EMPTY_DIRECTIVE) {
                sortingColumns.remove(directive);
            if (status != NOT_SORTED) {
                sortingColumns.add(new Directive(column, status));
            sortingStatusChanged();
        protected Icon getHeaderRendererIcon(int column, int size) {
            Directive directive = getDirective(column);
            if (directive == EMPTY_DIRECTIVE) {
                return null;
            return new Arrow(directive.direction == DESCENDING, size, sortingColumns.indexOf(directive));
        private void cancelSorting() {
            sortingColumns.clear();
            sortingStatusChanged();
        public void setColumnComparator(Class type, Comparator comparator) {
            if (comparator == null) {
                columnComparators.remove(type);
            } else {
                columnComparators.put(type, comparator);
        protected Comparator getComparator(int column) {
            Class columnType = tableModel.getColumnClass(column);
            Comparator comparator = (Comparator) columnComparators.get(columnType);
            if (comparator != null) {
                return comparator;
            if (Comparable.class.isAssignableFrom(columnType)) {
                return COMPARABLE_COMAPRATOR;
            return LEXICAL_COMPARATOR;
        private Row[] getViewToModel() {
            if (viewToModel == null) {
                int tableModelRowCount = tableModel.getRowCount();
                viewToModel = new Row[tableModelRowCount];
                for (int row = 0; row < tableModelRowCount; row++) {
                    viewToModel[row] = new Row(row);
                if (isSorting()) {
                    Arrays.sort(viewToModel);
            return viewToModel;
        public int modelIndex(int viewIndex)
            return getViewToModel()[viewIndex].modelIndex;
        private int[] getModelToView()
            if (modelToView == null) {
                int n = getViewToModel().length;
                modelToView = new int[n];
                for (int i = 0; i < n; i++) {
                    modelToView[modelIndex(i)] = i;
            return modelToView;
        // TableModel interface methods
        public int getRowCount() {
            return (tableModel == null) ? 0 : tableModel.getRowCount();
        public int getColumnCount() {
            return (tableModel == null) ? 0 : tableModel.getColumnCount();
        public String getColumnName(int column) {
            return tableModel.getColumnName(column);
        public Class getColumnClass(int column) {
            return tableModel.getColumnClass(column);
        public boolean isCellEditable(int row, int column) {
            return tableModel.isCellEditable(modelIndex(row), column);
        public Object getValueAt(int row, int column) {
            return tableModel.getValueAt(modelIndex(row), column);
        public void setValueAt(Object aValue, int row, int column) {
            tableModel.setValueAt(aValue, modelIndex(row), column);
        // Helper classes
        private class Row implements Comparable {
            private int modelIndex;
            public Row(int index) {
                this.modelIndex = index;
            public int compareTo(Object o) {
                int row1 = modelIndex;
                int row2 = ((Row) o).modelIndex;
                for (Iterator it = sortingColumns.iterator(); it.hasNext();) {
                    Directive directive = (Directive) it.next();
                    int column = directive.column;
                    Object o1 = tableModel.getValueAt(row1, column);
                    Object o2 = tableModel.getValueAt(row2, column);
                    int comparison = 0;
                    // Define null less than everything, except null.
                    if (o1 == null && o2 == null) {
                        comparison = 0;
                    } else if (o1 == null) {
                        comparison = -1;
                    } else if (o2 == null) {
                        comparison = 1;
                    } else {
                        comparison = getComparator(column).compare(o1, o2);
                    if (comparison != 0) {
                        return directive.direction == DESCENDING ? -comparison : comparison;
                return 0;
        private class TableModelHandler implements TableModelListener {
            public void tableChanged(TableModelEvent e) {
                // If we're not sorting by anything, just pass the event along.            
                if (!isSorting()) {
                    clearSortingState();
                    fireTableChanged(e);
                    return;
                // If the table structure has changed, cancel the sorting; the            
                // sorting columns may have been either moved or deleted from            
                // the model.
                if (e.getFirstRow() == TableModelEvent.HEADER_ROW) {
                    cancelSorting();
                    fireTableChanged(e);
                    return;
                // We can map a cell event through to the view without widening            
                // when the following conditions apply:
                // a) all the changes are on one row (e.getFirstRow() == e.getLastRow()) and,
                // b) all the changes are in one column (column != TableModelEvent.ALL_COLUMNS) and,
                // c) we are not sorting on that column (getSortingStatus(column) == NOT_SORTED) and,
                // d) a reverse lookup will not trigger a sort (modelToView != null)
                // Note: INSERT and DELETE events fail this test as they have column == ALL_COLUMNS.
                // The last check, for (modelToView != null) is to see if modelToView
                // is already allocated. If we don't do this check; sorting can become
                // a performance bottleneck for applications where cells 
                // change rapidly in different parts of the table. If cells
                // change alternately in the sorting column and then outside of            
                // it this class can end up re-sorting on alternate cell updates -
                // which can be a performance problem for large tables. The last
                // clause avoids this problem.
                int column = e.getColumn();
                if (e.getFirstRow() == e.getLastRow()
                        && column != TableModelEvent.ALL_COLUMNS
                        && getSortingStatus(column) == NOT_SORTED
                        && modelToView != null) {
                    int viewIndex = getModelToView()[e.getFirstRow()];
                    fireTableChanged(new TableModelEvent(TableSorter.this,
                                                         viewIndex, viewIndex,
                                                         column, e.getType()));
                    return;
                // Something has happened to the data that may have invalidated the row order.
                clearSortingState();
                fireTableDataChanged();
                return;
        private class MouseHandler extends MouseAdapter {
            public void mouseClicked(MouseEvent e) {
                JTableHeader h = (JTableHeader) e.getSource();
                TableColumnModel columnModel = h.getColumnModel();
                int viewColumn = columnModel.getColumnIndexAtX(e.getX());
                int column = columnModel.getColumn(viewColumn).getModelIndex();
                if (column != -1) {
                    int status = getSortingStatus(column);
                    if (!e.isControlDown()) {
                        cancelSorting();
                    // Cycle the sorting states through {NOT_SORTED, ASCENDING, DESCENDING} or
                    // {NOT_SORTED, DESCENDING, ASCENDING} depending on whether shift is pressed.
                    status = status + (e.isShiftDown() ? -1 : 1);
                    status = (status + 4) % 3 - 1; // signed mod, returning {-1, 0, 1}
                    setSortingStatus(column, status);
        private static class Arrow implements Icon {
            private boolean descending;
            private int size;
            private int priority;
            public Arrow(boolean descending, int size, int priority) {
                this.descending = descending;
                this.size = size;
                this.priority = priority;
            public void paintIcon(Component c, Graphics g, int x, int y) {
                Color color = c == null ? Color.GRAY : c.getBackground();            
                // In a compound sort, make each succesive triangle 20%
                // smaller than the previous one.
                int dx = (int)(size/2*Math.pow(0.8, priority));
                int dy = descending ? dx : -dx;
                // Align icon (roughly) with font baseline.
                y = y + 5*size/6 + (descending ? -dy : 0);
                int shift = descending ? 1 : -1;
                g.translate(x, y);
                // Right diagonal.
                g.setColor(color.darker());
                g.drawLine(dx / 2, dy, 0, 0);
                g.drawLine(dx / 2, dy + shift, 0, shift);
                // Left diagonal.
                g.setColor(color.brighter());
                g.drawLine(dx / 2, dy, dx, 0);
                g.drawLine(dx / 2, dy + shift, dx, shift);
                // Horizontal line.
                if (descending) {
                    g.setColor(color.darker().darker());
                } else {
                    g.setColor(color.brighter().brighter());
                g.drawLine(dx, 0, 0, 0);
                g.setColor(color);
                g.translate(-x, -y);
            public int getIconWidth() {
                return size;
            public int getIconHeight() {
                return size;
        private class SortableHeaderRenderer implements TableCellRenderer {
            private TableCellRenderer tableCellRenderer;
            public SortableHeaderRenderer(TableCellRenderer tableCellRenderer) {
                this.tableCellRenderer = tableCellRenderer;
            public Component getTableCellRendererComponent(JTable table,
                                                           Object value,
                                                           boolean isSelected,
                                                           boolean hasFocus,
                                                           int row,
                                                           int column) {
                Component c = tableCellRenderer.getTableCellRendererComponent(table,
                        value, isSelected, hasFocus, row, column);
                if (c instanceof JLabel) {
                    JLabel l = (JLabel) c;
                    l.setHorizontalTextPosition(JLabel.LEFT);
                    int modelColumn = table.convertColumnIndexToModel(column);
                    l.setIcon(getHeaderRendererIcon(modelColumn, l.getFont().getSize()));
                return c;
        private static class Directive {
            private int column;
            private int direction;
            public Directive(int column, int direction) {
                this.column = column;
                this.direction = direction;
    }

    The table listens to the TableModel for changes. Changing the table by adding/removing
    rows or columns has no affect on its table model. If you make changes to the table model
    the table will be notified by its TableModelListener and change its view. So tell
    MyTableModel about the change of data:
    public class TableSorterDemo implements ActionListener
        MyTableModel tableModel;
        public TableSorterDemo()
            defaultListModel = new DefaultListModel();
            init1();
            tableModel = new MyTableModel(defaultListModel);
            TableSorter sorter = new TableSorter(tableModel);
        public void actionPerformed(ActionEvent ae)
            if (ae.getSource()==clickMe)
                defaultListModel.removeAllElements();
                init2();
                tableModel.fireTableStructureChanged();
    }

  • Problems with Dinamic Link between Premiere pro CC and After Effects CC

    I'm having serious problems with dinamic link between premiere pro and after effects, really serious problems that have 2 big projects in trouble (a documentary and a video clip) and I had to redo all the work pipeline to the consumer.
    The documentary for a spanish TV was made on CC 2014 and a video clip was made on CC. Both of them with a lot of after effects composition in the premiere pro timeline. Render freeze, a lot of playback issues, and many more problems... Until I decided to remove these links between premiere and after effects and render out all the after effects compositions one by one and insert as clips in premiere pro. 1 week working away with back and fourth.
    I've got a huge workstation:
    i7 4990
    32Gb ram
    GTX780 3gb
    256 gb system ssd
    2 Tb project storage
    *All my hardware and software are update.
    I know that a lot of folks are on the same huge problem and I want to ask everyone:
    How do you save this?
    What is your pipeline?
    Are there any solution?
    Best practice to use dinamic link in a huge project?
    Thanks,
    Ruben Gimenez.
    R&D iceblink.es
    www.rambot.es

    Thank You, Jim -
    Unfortunately that specifically did not work.
    Based on another comment sent to me, here is what did.
    In PProCC
    File > Adobe Dynamic Link > New After Effects Composition
    In AECC
    From that composition created from PPro, I imported the project (aep) initially created in AECC from another team member. Saved the file.
    Back in PProCC
    File > Adobe Dynamic Link > Import After Effects Composition
    Magic.

  • Re: Problem providing download link for BLOB data in apex report

    Hi Don,
    Your solution below worked but in the download option i only see save but not open for PDf file in the blob. Please let me know if you have any suggestion to achieve it
    Thanks
    Jo
    Problem providing download link for BLOB data in apex report 
    591953 Nov 19, 2008 1:55 PM (in response to 660436)
    Currently Being Moderated
    Good morning,
    Here is how I have solved this problem.
    1. The select statement in the sql for the report should not include the BLOB column. I decided to select only 2 columns, the column that has the key and the column with the filename.
    2. On the first column ( the primary key ) I put in the format statement that was simply DOWNLOAD:TABLENAME:BLOB_COLUMN:PRIMARY_KEY
    This works. I believe that the Oracle error I was getting was because I was trying to apply this format statement to the actual BLOB column.
    So, it appears that you can use any of the columns in the report to hold the DOWNLOAD format statement since in the format statement, you are defining the BLOB table, BLOB column and the primary key into that column.
    Hope this helps,
    Don.

    Branched out from a years old thread.
    user3003326 Don't post to old threads, please.

  • Problems working with linked files in illustrator

    Hi everyone, i hope you can help me with this doubt that had given me problems since I started using illustrator. I'm using linked files in illustrator because i'm able to modify the files later, as I do in InDesign too, but in both cases I had have a lot of problems with the links, I don't know if i'm doing something bad, but this is what I do: I create a folder where I place my file (illustrator or InDesign) and the files that should be linked. Whit this i'm expecting of it to work like an html where the links works while they are in the folder, no matter if you move the folder, the links keeps working on the HTML.
    But I have noticed that it doesn't work in the same way, because, I had have cases when the links work perfectly, but then i format my computer (Mac) and after that, I open my files againg but the links don't work already. I have exactly the same problem with my coworker, because im trying to edit a file with linked files since the place where it is in the other computer, obviously it opens perfectly there, but in my computer it asked to repair the links, so I select to repair automatically but I ask me to does it manually... So this is getting me tired, because I must repair the links here in my computer to work on it, and when for it get finished, my coworker should repair the links again, and this is going to be always we share files or i format my computer. It is important to mention that my coworker and me use mac with leopard and the same version of adobe (CS4).
    So, as I said before, i dont knoe if my method is incorrect, should I do something different? any option to activate? or program that I should use? because I have herd a lot of Adobe Bridge, I don't know if this could have a option that could help me.
    I hope finally somebody can help me with this doubt, because im sure that I'm not the only one having thie problem.
    Thanks for your help

    Hi. I am also experiencing this very annoying problem. Currently using version CS2, but this problem dates back to version 9.  I check the box to link a tif file, not embed it, in Illustrator. All is well until I save and reopen the file. Suddenly the file is embedded. No other changes have been made to the folders or anything else. It just embeds itself and cannot be linked again.
    So far, I conclude that something in the file itself has corrupted, because it is not possible to place a new file and have it link correctly again. So if I anticipate more changes, I create a new file.
    Notice the upper left corner of the top toolbar. If you click on a file that has embedded itself, the file will be identified as "Group" instead of "linked file."
    I've tried all kinds of things, like trying to ungroup it, trying to release a clipping mask, and so forth, to see what went wrong. Have not figured it out.

  • Problem in DB Link creation of Oracle Wraehouse Builder 3i - Updated question

    I am facing a problem in DB Link creation.
    Backend: Oracle 8i Server on my machine
    DW Software: Oracle warehouse builder 3i ( client , repository
    asistant.....)
    Operating system: Windows NT 4 SERVICE PACK 6
    I wants to use the scott database( default database given by oracle )
    as my input source.
    How can I create the DB LINK ( for scott database) ?
    How can I create the DB LINK ( for any other database) ?
    Should I need to add anything in Setting of"ODBC DATASOURCE
    ADMINISTRATION"
    ==================
    Settings done:
    ==================
    DB Link Name :prashant
    Host name
    Host name: my machine's ip address
    port number: 1521
    oracle sid: prashant ( my oracle sid)
    user name:scott
    password:tiger
    ==================
    Gives error:
    ==================
    Testing...
    Failed.
    Cwm Error Message: Failed in the WBAPIFactory.createDBLink()
    Cwm Error: SQL Exception
    Class Name: oracle.wh.ui.integrator.common.RepositoryUtils
    Method Name: createDBLink(String, String, String, String)
    Method Name: -1
    Repository Error Message: java.sql.SQLException: ORA-02082: a loopback database link must have a connection qualifier
    ==================
    ==================
    How should I proceed further.
    I am expecting URGENT FEEDBACK.
    Reply me on : [email protected] or this OTN Network
    From
    Prashant

    I solved the problem.
    Procedure I followed :
    UNINSTALL ORACLE WRAEHOUSE BUILDER SOFTAWARE.
    'GLOBAL_NAMES = FALSE' in init.ora file.
    RESTARTED MY MACHINE.
    INSTALL THE ORACLE WRAEHOUSE BUILDER SOFTAWARE.

  • Problem in DB Link creation ( Oracle warehouse builder 3i  )

    I am facing a problem in DB Link creation.
    Backend: Oracle 8i Server on my machine
    DW Software: Oracle warehouse builder 3i ( client , repository asistant.....)
    Operating system: Windows NT 4 SERVICE PACK 6
    I wants to use the scott database( default database given by oracle ) as my input source.
    How can I create the DB LINK ( for scott database) ?
    How can I create the DB LINK ( for any other database) ?
    Should I need to add anything in Setting of"ODBC DATASOURCE ADMINISTRATION"
    ==================
    Settings done:
    ==================
    DB Link Name :scott
    Host name
    Host name: my machine's ip address
    port number: 1521
    oracle sid: prashant ( my oracle sid)
    user name:scott
    password:tiger
    ==================
    Gives error:
    ==================
    Testing...
    Failed.
    ORA-02085 Database link %s connects to %s
    *Cause:   a database link connected to a database with a different name.
    The connection is rejected.
    *Action:   create a database link with the same name as the database it
    connects to, or set global_names=false.
    Please change it to false by doing :
    first option:
    Log in the database with DBA privilege and use the command:
    alter system set GLOBAL_NAMES = false
    second option:
    Change the GLOBAL_NAMES to false in database system parameter file, init.ora
    ==================
    Options tried:
    ==================
    1. I tried to change GLOBAL_NAMES = false but still not able to create the DB LINK.
    2. As per suggestion of one the friend
    "A file named "Logon.Properties" under the directory $OWB_HOME/wbapp
    in this file please set the property
    OWBSingleUserLockUsage = false"
    I tried the same but it is still not working.
    How should I proceed further.
    I am expecting URGENT FEEDBACK.
    Reply me on : [email protected]
    From
    Prashant

    I solved the problem.
    Procedure I followed :
    UNINSTALL ORACLE WRAEHOUSE BUILDER SOFTAWARE.
    'GLOBAL_NAMES = FALSE' in init.ora file.
    RESTARTED MY MACHINE.
    INSTALL THE ORACLE WRAEHOUSE BUILDER SOFTAWARE.

  • [SOLVED] Problem with adding a SSH connection to startup

    Hi guys. I have a problem with adding ssh connection to startup. i want this command to run before kde login screen  and keep running all time.
    ssh -D 9292 remoteuser@remotehost
    but it doesnt connect. Thanks for help!
    Last edited by alperenel (2011-03-11 00:10:27)

    cactus wrote:
    ssh -fN -D 9292 remoteuser@remotehost
    you need -f, which sends ssh to the background, and -N which does not execute a remote command.
    If you need it to run as a user other than root, then you probably need to utilize su as well.
    it didnt work either. i am putting it in rc.local but doesnt work.

Maybe you are looking for