HTML tag problem when adding Google rich snippets in templates?

The new Google plus Rich Snippets allow us to add a schema tag like this example:
<html itemscope itemtype="http://schema.org/Article">
I can do this on my .html pages but as soon as I make any changes to the .dwt template for the page it reverts all of the tags back to <html>
How do I stop this happening?
I have tried:
Changing preferences in Dreamweaver's default code rewrite settings to "'Never Rewrite Code' for HTML document type " but this does not appear to fix things.
Very frustrating as I have lost days of work.
Any help would be appreciated
many thanks
Craig

I've done what you have said (I think) however something is not quite right. I am asssuming that I need to add the schema below the <BODY> tag if I make the changes to the template as you have suggested.
This is my practice page which is in a template:
http://www.psychics.co.uk/lovepsychic/index.html
Following the Adobe instruction on the forum: High at the top of the header section we get this code:
<!-- InstanceParam name="GRS" type="text" value="itemscope itemtype=&quot;http://schema.org/Product"" -->
For the customised body tag we get this:
<body itemscope itemtype="http://schema.org/Product">
Then on the left column of the page and below the navigation and below the <body> I have added this:
<!-- Start Google snippet -->
<h1 itemprop="name" content="Love Psychics Readings">Love Psychics - Psychic Love Predictions Online</h1> 
<img itemprop="image" content="http://www.psychics.co.uk/images/schema/love.jpg" src="/images/stars.gif" width="160" height="76" alt="Psychics and Mediums Network"></img> 
<p itemprop="description" content="Getting a reading with love psychics to find out about relationships, love, romance, marriage and family. Article about our Love psychics readings onlineservices.">Copyright Psychics &amp; Mediums Network - QKE Ltd.</p>
  <!-- End Google snippet -->
I must be getting close but it just shows the normal Google plus stuff.
I need to get your microdata markup into the body of the document somewhere - otherwise Google will use the something like <title> and <meta description>  tags and guess at an image.
Any idea where I am going wrong or is it a quirk in Dreamweaver?

Similar Messages

  • Html tags removed when #COLUMN_HEADER# is used in column template

    Hi all,
    I'm using APEX 4.0.2, theme 2 Builder Blue.
    I am trying to add html tags to dynamically generated column headings of a dynamic SQL Report.
    When using a standard report template, the headings contain the html tags. However when I want to use one of the vertical lay-outs all html tags are removed. After some research I found out that when the substitution string #COLUMN_HEADER# is used within the column headings part of the template, the html tags are being preserved. They are removed however when the #COLUMN_HEADER# substitution string is used in the column templates part of the template.
    This is easily testable by using for instance "return htf.bold ('COL01')" as dynamic column header.
    Is this a bug or am I overlooking something? Is there another solution maybe to preserve html tags in the column heading?
    Cheers, Erik

    webdynpro appears to use XHTML instead of HTML so the syntax is a bit more limitted and more picky.
    this link explains the difference between the two syntaxes:
    http://reference.sitepoint.com/html/html-xhtml-syntax
    you can test your tags in this validator tool
    http://validator.w3.org
    solved?  have a good week, and holidays.

  • HTML Tag problem when sending mails through APEX

    Hi,
    My code for sending mail is below:
    DECLARE
    l_body CLOB;
    l_body_html CLOB;
    cursor c2 is
    SELECT pn,pdt_name FROM lib_details WHERE a_date BETWEEN to_date(:P13_SDATE,'DD-MON_YYYY') AND to_date(:P13_EDATE,'DD-MON-YYYY');
    BEGIN
    for c_lib in c2
    loop
    l_body_html:=l_body_html ||
    '<html><body>
    ul>
    li>'||c_lib.pn||' , '||c_lib.pdt_name||' /li>
    /ul>'; p;
    l_body_html:=l_body_html ||'</body></html>';
    apex_mail.send(
    p_to => 'xxxx',
    p_from => 'xxxx',
    p_body => l_body_html,
    p_subj => 'Test Mail');
    END;
    Gives me the output in the format below:
    all the <html><body> tags also comes along with the email, though I get the correct output, what is the problem here?
    I am not able to figure this out. Can someone help?
    OUTPUT
    <html><body>
    ul> li>a,b
    /ul><html><body>
    ul> li>c,d
    /ul><html><body>
    PLEASE NOTE: I have intentionally removed the starting tags (<) of ul and li so that the post will not be formatted.
    Edited by: Suzi on Feb 9, 2012 1:18 PM

    >
    Gives me the output in the format below:
    all the <html><body> tags also comes along with the email, though I get the correct output, what is the problem here?
    I am not able to figure this out. Can someone help?For HTML output you need to send it using the <tt>p_body_html</tt> parameter, not <tt>p_body</tt>.
    PLEASE NOTE: I have intentionally removed the starting tags (&lt;) of ul and li so that the post will not be formatted.Posting code wrapped in <tt>\...\</tt> tags eliminates the need to resort to these bizarre circumlocutions.

  • How to get Google Rich Snippets to work?

    I'm adding Google Rich Snippets to my product pages for better SERP results. These are described at:
    http://support.google.com/webmasters/bin/answer.py?hl=en&answer=146750
    and see its single product page example.
    The problem is BC is stripping out the attribute itemscope from the tags. See the source code for http://www.caaase.com/apple/iphone-5-case
    Product Snippet:
    Should be (per Google link above):
    <div itemscope itemtype="http://data-vocabulary.org/Product">
    After saving in BC:
    <div itemtype="http://data-vocabulary.org/Product">
    Nested Offer Snippet:
    Should be (per Google link above):
    <span itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer">
    After saving in BC:
    <span itemprop="offerDetails" itemtype="http://data-vocabulary.org/Offer">
    As a result, the Rich Snippet doesn't work. See http://www.google.com/webmasters/tools/richsnippets?url=http%3A%2F%2Fwww.caaase.com%2Fappl e%2Fiphone-5-case&html=
    Ideas?
    Wayne.

    Hi Wayne,
    The editor conforms to XHTML and will try to format content and html in it to that.
    Things like this do not and thus it edits them.
    For coding the editor is not designed for this, do not use it. Placing such code in layouts, templates etc should always be done in a proper local editor or through the "develop" online editor tool provided by BC if you are a partner.

  • Problem when adding ascx user control in the MasterPage: Parser Error Message: The referenced file ... is not allowed on this page.

    Hello,
    I have to maintain a SharePoint 2010 project, in which a TopNavigation User Control for SiteCollection is registered in the MasterPage in this way:
    <%@ Register TagPrefix="ABC" TagName="TopNavigation" src="~/_layouts/ABCApplication/MainSite/Navigation/TopNavigation.ascx" %>
    <asp:ContentPlaceHolder id="PlaceHolderTopNavBar" runat="server">
    <asp:ContentPlaceHolder id="PlaceHolderHorizontalNav" runat="server">
                                        <ABC:TopNavigation ID="TopNavi" XMLDataLocation="/_layouts/ABCApplicatopm/MainSite/TopNavigation.xml" IsRoot="true"
    runat="server" />
    </asp:ContentPlaceHolder>
    </asp:ContentPlaceHolder>
    When I deploy the SiteCollection, the TopNavigation user control is working correctly. Unfortunately when i modify the masterpage over SharePoint Designer, the following error message comes allways, regardless of the art of changes i did in the MAsterPage
    ( even if I open the MasterPage, add an space and do save/close the MasterPage).
    "Problem when adding user control in my custom master page, Parser Error Message: The referenced file '/_layouts/Navigation/TopNavigation.ascx' is not allowed on this page."
    Any ideas?

    Hi Simon,
     When we use UserControl in SharePoint Page or MasterPage, and the UserControl is kept in any folder other than ControlTemplates, we will got the error. Here is an article about this issue and provided the solution:
    http://sharepoint-tina.blogspot.com/2009/07/referenced-file-pathxyzascx-is-not.html 
    The solution can also be used in SharePoint 2010.
    Qiao Wei
    TechNet Community Support

  • 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();
    }

  • Struts bean/html tag problem

    i am writing this url_element on screen
    <bean:write name="url_element"/>
    then i got a link
    <html:link action="urlDetail.do?url=???">aaa</html:link>
    how can i transfer the url_element into ??? do i need to write something like <%...%>?

    just found the solution:
    You can't use a <bean:write> tag inside an <html:link> tag. Struts doesn't support it.
    The easiest way to fix this is to abandon use of <html:link> and just use the plain old html tags <a></a>. Then you will have no problem substituting parameters with <bean:write> tags.
    The only advantage <html:link> has over the plain html tag is that it automatically does URL rewriting (Adding of the jsessionid to the URL so that sessions may be tracked even if the user has turned cookies off). If you're not using this function anyway, as most modern websites don't, you may as well use the html tag.
    If you still want to use <html:link>, use the struts-el version of the html tags and use EL expressions instead of <bean:write> tags.

  • HTML TAG ISSUES WHEN LOADING SPRY

    hello. i'm having some issues when loading spry pages, the
    <a href> tags within the fragments of html pages that i'm
    loading with spry are deactivating themselves
    http://www.asiwouldsay.com/TEST/"
    the zine link is a good example of this as well as some of
    the artist pages when adding more html text the back buttons
    created stop working. all the pages work when loaded by itself but
    not as spry fragments.
    any help? i'm going crazy over here :)
    Thanks in advance

    The links aren't deactivated, what's happening is that your
    nav bar at the bottom (apDiv2) is absolutely positioned. When you
    load the zine page, the container you load it into is stretching to
    accomodate the zine content, and goes *underneath* your nav bar.
    Now when you click on what looks like a link, your nav bar is
    actually intercepting the click event.
    You can see what I mean by giving your nav bar a background
    color.
    --== Kin ==--

  • I have a problem when using Google Maps, at some point my computer blanks the window and says there's a problem with display drivers, and it has recovered,but it doesn't. Problem doesn't happen with Int Explorrer, so I do not believe it is the computer

    When using google maps through Firefox, after asking for a place which is not the general North America section which routinely comes up, the firefox screen goes white, with a narrow banner at the top. A message appears in the lower right corner which says something about display drivers having had a problem, but now have recovered. However the display doesn't recover and the banner message is that Firefox is not responding. When I go to restart Firefox if I go to the restore point, the page is still frozen out.
    I do not believe it is a problem with my computer because it doesn't happen if I use I.E. to go to google maps, then G-maps works normally.
    This phenomenon did not happen before the latest upgrade to either Google or Firefox. I have used Fiefox for a number of years and also Google Maps on previous computers and on this one, and not had this before.
    This is a relatively young computer (Asus EeSlate 121) less than a year old. I have used Firefox since I bought it and until recently had no problem with Google Maps.

    I solved it myself, after the "note" which came back from FF/Mozilla just as I finished my message, commenting on what it was that my system had , I wnnt back to check my plug-ins etc. I downloaded the latest Java, BOTH 32bit AND 64 bit versions and latest Firefox.
    Now all is working.
    Thanks,
    B.

  • Html tags executed when retrived from database

    Exit
    what happens is the html executes ...........

    It is fairly difficult to answer this question, as:
    HTML is not "executed".
    A database defently does not do anything special to HTML.
    "it is multi processing using code "Huh?
    Please .... dont .... write ... like ... this
    i am also working on forum ...
    but i get these html tags executed ...
    when they are retrived and shown... OK, so you are write some forum software, and in the text area your users are putting HTML tags (<b>I'm bold</b>) and you don't want that to happen?
    A simple solution would be BEFORE you insert this data into your varchar replace all the > with &gt; < with &lt; and & with &amp;
    Message was edited by:
    mlk

  • Struts tag problem when migrating to 7.0 from 5.1

              We currently have an application using struts running on WLS 5.1. When we use the
              application
              on WLS 7.0 and WLE 7.0 we get errors for the tag properties that are not defined
              in the tag
              library. In 5.1 WLS seemed to just ignore them and rewrite them but in 7.0 it
              seems to validate them so we can't actually include regular HTML tags.
              The JSP is:
              ', 'Terms', 600, 800 );">
              <html:img page="/jsp/images/viewbill.gif" width="78" height="19"
              border="0" target="_blank"/>
              </a>
              and the error message we are getting is:
              Parsing of JSP File '/jsp/pages/ViewMyBill.jsp' failed:
              /jsp/pages/ViewMyBill.jsp(40): for tag 'img' handler type 'org.apache.struts.taglib.html.ImgTag'
              has no property 'target'
              probably occurred due to an error in /jsp/pages/ViewMyBill.jsp line 40:
              </a>
              Wed Oct 29 11:21:50 GMT 2003 [Exception in:/jsp/pages/ViewMyBill.jsp] (line 40):
              for
              tag 'img' handler type 'org.apache.struts.taglib.html.ImgTag' has no property
              'target'
              weblogic.servlet.jsp.JspException: (line 40): for tag 'img' handler type 'org.apache.struts.taglib.html.ImgTag'
              has no property 'target' at
              weblogic.servlet.jsp.StandardTagLib.jspException(StandardTagLib.java:1087) at
              weblogic.servlet.jsp.StandardTagLib.addAllSetters(StandardTagLib.java:960) at
              weblogic.servlet.jsp.StandardTagLib.genericStartBegin(StandardTagLib.java:716)
              at
              weblogic.servlet.jsp.StandardTagLib.processStartTag(StandardTagLib.java:813) at
              weblogic.servlet.jsp.JspLexer.mOPEN_EXTENSION_TAG(JspLexer.java:2652) at
              weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:2013) at
              weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1892) at
              <snip>
              In 5.1 this would result in the following HTML tag:
              <a href="javascript:openBareScrollableWindow( '/selfcare/GoViewMyBill.do',
              'Terms', 600, 800 );">
              <img src="/selfcare/jsp/images/viewbill.gif" height="19"
              width="78" border="0">
              </a>
              The struts.jar is located correctly in the WEB-INF/lib folder as are the tag libraries
              - it's the
              same folder structure for 5.1 and 7.0.
              Any ideas on what's wrong here appreciated.
              Thanks in advance,
              Brian Flannagan
              BT

              In the tld file include 'target' attribute for tag ImgTag.
              thanks,
              Deepak
              "Brian Flannagan" <[email protected]> wrote:
              >
              >We currently have an application using struts running on WLS 5.1. When
              >we use the
              >application
              >on WLS 7.0 and WLE 7.0 we get errors for the tag properties that are
              >not defined
              >in the tag
              >library. In 5.1 WLS seemed to just ignore them and rewrite them but in
              >7.0 it
              >seems to validate them so we can't actually include regular HTML tags.
              >
              >The JSP is:
              > ', 'Terms', 600, 800 );">
              > <html:img page="/jsp/images/viewbill.gif" width="78"
              >height="19"
              >border="0" target="_blank"/>
              > </a>
              >
              >and the error message we are getting is:
              >Parsing of JSP File '/jsp/pages/ViewMyBill.jsp' failed:
              >--------------------------------------------------------------------------------
              > /jsp/pages/ViewMyBill.jsp(40): for tag 'img' handler type 'org.apache.struts.taglib.html.ImgTag'
              >has no property 'target'
              >probably occurred due to an error in /jsp/pages/ViewMyBill.jsp line 40:
              ></a>
              >--------------------------------------------------------------------------------
              >
              >Wed Oct 29 11:21:50 GMT 2003 [Exception in:/jsp/pages/ViewMyBill.jsp]
              >(line 40):
              >for
              >tag 'img' handler type 'org.apache.struts.taglib.html.ImgTag' has no
              >property
              >'target'
              >weblogic.servlet.jsp.JspException: (line 40): for tag 'img' handler type
              >'org.apache.struts.taglib.html.ImgTag'
              >has no property 'target' at
              >weblogic.servlet.jsp.StandardTagLib.jspException(StandardTagLib.java:1087)
              >at
              >
              >weblogic.servlet.jsp.StandardTagLib.addAllSetters(StandardTagLib.java:960)
              >at
              >
              >weblogic.servlet.jsp.StandardTagLib.genericStartBegin(StandardTagLib.java:716)
              >at
              >weblogic.servlet.jsp.StandardTagLib.processStartTag(StandardTagLib.java:813)
              >at
              >
              >weblogic.servlet.jsp.JspLexer.mOPEN_EXTENSION_TAG(JspLexer.java:2652)
              >at
              >weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:2013) at
              >weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1892) at
              >
              ><snip>
              >
              >
              >In 5.1 this would result in the following HTML tag:
              >
              > <a href="javascript:openBareScrollableWindow( '/selfcare/GoViewMyBill.do',
              >'Terms', 600, 800 );">
              > <img src="/selfcare/jsp/images/viewbill.gif" height="19"
              >width="78" border="0">
              >
              > </a>
              >
              >
              >The struts.jar is located correctly in the WEB-INF/lib folder as are
              >the tag libraries
              >- it's the
              >same folder structure for 5.1 and 7.0.
              >
              >Any ideas on what's wrong here appreciated.
              >
              >Thanks in advance,
              >
              >Brian Flannagan
              >BT
              >

  • Html Tag Problem

    Hello, I have a web page.
    <body  class="mediawiki ns-0 ltr page-Hacker">
         <div id="globalWrapper">
              <div id="column-content">
         <div id="content">
              <a name="top" id="top"></a>
                        <h1 class="firstHeading">Hacker</h1>
              <div id="bodyContent">
         ...I want to replace the lines with new lines which are added id
    <body  id="1" class="mediawiki ns-0 ltr page-Hacker">
         <div id="globalWrapper">
              <div id="column-content">
         <div id="content">
              <a id="2"name="top" id="top"></a>
                        <h1 id="3" class="firstHeading">Hacker</h1>
              <div id="bodyContent">
         Every line must have an id in the tag, I am not familar with html.tag or parser.
    Could you please provide some hint?
    Regards!

    public class AddIds  extends HTMLEditorKit.ParserCallback{
      public void handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos){
        ... // write the edited line out
    }

  • Problems when adding iTunes to iMovie project

    I recently recorded onto miniDV tape about 15 minutes of rare color film footage from 1938-40, courtesy of the University of Missouri archives. Using iMovie 6.0.1, I made about 15 clips, divided by subject and year and added some titles. I placed them into the clip viewer and previewed the movie. No problems when I previewed it. I also "unchecked" the ambient audio, because the film was silent and the only sound was the sound of the film projector picked up by the Sony TRV-30 digital camcorder. Via the Internet, I found the top songs of the those years and downloaded them from iTunes. I "clicked and dragged" the songs from iTunes into the sound track of the project. Here's where the problem arose. After I added the music, I previewed the movie. The music track played OK, but the video image was extremely "jerky;" in other words, it would appear to stop momentarily, then "jerk" to a start again. It appears that way through the entire project. Any ideas as to why it would be doing this?
    Also, I have another "mystery." The icon for the project is in the "movies" folder. The icon appears as a white "one-dimentional square" with "sideways Vs" a the top and a black star on a white field on the face of the icon. When I click on the icon, the project opens (clips etc.). In previous projects, there is a two-dimentional folder with a blue front and when you open it, there are other sub-folders in it (a "media" folder" and the .mov file etc). Why does my current movie only give me the option of opening the project, and does not show the media folder and .mov file? As always, your assistance is very much appreciated. This forum has been very helpful to me in the past. --Scooper

    Hi scooper,
    ... An answered the second part, I give a try to part one:
    * is the project located on your Mac's local drive or external?
    * is the iTunes library on the Mac's local drive or external?
    * is the "internet" (<<woohoo, bad kharma;-) ) music coded as aac, mp3 or aiff? or, something different, internet "standard", as ogg, wav, whatever?
    your Mac/iM tries to playback in realtime (sure, that makes sense with a movie...), but obviously has too much to do encoding the music...
    in case you own QTpro or a designated audio-app (Garageband, Audacity), try to convert the internet music (<<woohoo, bad kharma... ah, said that) BEFORE import to iM into aiff...
    in case of usage of external harddrives:
    make sure, the drive is "MacOsExtended" formatted, not FAT32... use Disk Utility to accomplish that (any reformatting erases all content!)
    pay the artists//respect local laws//get good kharma

  • N8 - Strange problem when adding an OVI email acco...

    Hi there.
    When adding my GFs OVI email account to her N8 I start the installer which directs me to a page where I can sign up or login.
    I choose login as she's already setup an account. The login succeeds and we get the "readying inbox" or a similar message. Then the browser seems to get stuck at reloading a link and finally gives me an error saying the login name or password was incorrect.
    Login in on a PC works great.
    I didn't have this problem on my N8 but then again I was using email.nokia.com since my previous E52.
    Any one have a clue?
    Thanks.
    Simon
    N8 User.

    Hi pradeepwitu,
    probably this is the result of your excellent
    code
    Instead of
    code
    you could try
    code
    Regards,
    Clemens

  • HTML Tag Problem OnInputProcessing

    Hi!
    Hope anybody can help.
    I have a MVC application. In our views, we can´t use HTMLB controlls. So we must use standard HTML controlls.
    With ?onInputProcessing it is possible to come in the on_handle_event Method in my controller class.
    The HTML statement in the view works fine :
    <a href="?onInputProcessing(NAVIGATION_MAIN_FUNCTIONS|BACK)">
    But in the select HTML Tag the statement doesn´t work.
        <select onchang e="?onInputProcessing(NAVIGATION_MAIN_FUNCTIONS|BACK)">
        <option>1</option>
        <option>2</option>
        <option>3</option>
        <option>4</option>
        <option>5</option>
        <option>6</option>
        </select>
    What`s wrong in the select tag??
    Regards,
    Anton

    Try below code, it will solve the issue
    < script t-ype="text/javascript">
    function triggerevent(event)
         document.getElementById("OnInputProcessing").value = event;
         document.getElementById("MYFORM").submit();  " Change the Form name here
    < / script >
        <select onchang e = "triggerevent_contact_dd('Your_event_name_here')">
        <option>1</option>
        <option>2</option>
        <option>3</option>
        <option>4</option>
        <option>5</option>
        <option>6</option>
        </select>
        <input type="hidden" name="OnInputProcessing" value="value"/>

Maybe you are looking for

  • HT1338 how to make my MacBook pro faster

    I was wondering if there is any software to clean and make my MacBook Pro faster and lighter??? I heard about the MacKeeper but I get some negative feedback about it....

  • Supplier Open Interface

    Dear Gurus, Please help me with the following : I have 2 OU's as follows: AOU BOU I have four suppliers: 1 AAA India, Hyderabad belongs to both the OU 2 BBB India, Calcutta belongs to both the OU 3 CCC Kenya, Nairobi belongs to AOU 4 DDD Ghana, Accra

  • HP Laserjet p2035n Can't set DHCP

    Hello I have a HP Laserjet p2035n connected via a switch to a LAN. The printer had a static IP address configured, and handled print jobs from connected PCs with no problem till yesterday. The printer stopped responding to print jobs sent accross the

  • Cash discount in APP F110

    Hi, When I am processing vendor payment through Automatic payment transaction (F110), system is calculating vendor payment net of cash discount though the payment is overdue. For e.g., due date is 10th July 09, but I am processing payment 15th July,

  • Sending Email When FTP Adapter Errors Out

    Hello everyone, I am developing a very simple interface to grab a file from a directory and ftp it to a partner's server. Now I want to be able to check if an error occurs when I send the file so I can send a notification e-mail to the administrator