Custom Renderers in JTreeTable (or extending JTable)?

I am wondering about what the best approach is to display a table in a Swing component. My table will by default have all rows collapsed (occupying a single line), but someone may click on a row to expand it (so it occupies multiple lines and displays more information). Nothing in the table should be editable.
Example:
(collapsed) 1. data     data     data
(expanded) 2. data     data     data
...more data that wouldn't fit on on one line...
... still more data (additional data doesn't have same column format as collapsed rows)...
(collapsed) 3. data     data     dataSo the additional data displayed when a row is expanded aren't conceptually `children' of the data in the collapsed display. I've looked at JTreeTable, but I'm not sure it's right for this purpose, and it seems complicated.
For one thing, I need some of my columns to have custom renderers--for example, renderers that display a button with text or an image instead of just a label. However, it looks like the JTreeTable approach forces you to declare the JTree (extension) as the renderer of everything in a row, so would that prevent me from specifying custom renderers for other columns, or am I misunderstanding?
Another feature I need is to be able to filter out entire rows from the view (so they don't show up at all). I will also want to add custom sort buttons that can apply four different sorts to each column.
Would I be better off using a JTreeTable for this or somehow using custom renderers or otherwise extending an ordinary JTable to make the column larger and display additional information when the user clicks the expand icon?
Also, how do I specify a different renderer for header rows than for other rows?
Message was edited by:
The.Joy.of.Java

Check how editingStopped is being done. For a ComboBox there is no common operation that one can assume means that the user is done with the editing component. By default JTable leaves it active until the mouse clicks somewhere outside it, then does, essentially, fireEditingStopped() to give the cell back to the renderer. Then a second mouse click is required to start a new cell editor.
If you're using ComboBox as a custom editor, you have to decide what event you want to be final and call fireEditingStopped() yourself. For instance, in your TableCellEditor:
    @Override
    public Component getTableCellEditorComponent(final JTable table,
                                                 final Object value,
                                                 final boolean isSelected,
                                                 final int row,
                                                 final int column) {
...             if( editor.supportsCustomEditor() )  {
                    JComboBox c = (JComboBox)editor.getCustomEditor();
                    c.removeActionListener( this );
                    c.addActionListener( this );
                    return c;
    @Override
    public void actionPerformed ( final ActionEvent ev ) {
        else if( "comboBoxChanged".equals( ev.getActionCommand() ) )  {
            fireEditingStopped();
    }The actionEvent is fired when just about anything happens in the ComboBox, including selection of the currently selected item. But unless you have a more specific requirement, it should be good enough.

Similar Messages

  • Extending JTable

    I'm trying to extend the functionality of JTable (mostly as a way of self study rather than a real application). The main idea is that the "enhanced" table will have a hidden panel which the user can deploy to change many aspects of the table behavior (very much like the JDK demo).
    I already acomplished this using a JSplitPane and putting the JTable on top of it and the Options panel on the bottom. No magic here, I just extended JTable and overide the constructors to create the JSplitPane and so.
    Problem is that this is not a "drop-in" replacement for JTable, because program needs to be modified for this to work.
    Normally you use JTable, something like this:
    JTable table = JTable(data, headers);
    JScrollPane scroll = JScrollPane(table);
    If I use this with my extended component, obviously only the standard JTable gets drawn and all the extra (the splitPane and the options panel) are not drawn. The easy way was to add a method getPanel() that returned the JSplitPane instead of the JTable. so
    JTable table = JTable(data, headers);
    JScrollPane scroll = JScrollPane(table.getPanel());
    works, but as I said I would like I to be completely transparent, meaning no need for a custom method for it to work.
    What I've tried so far:
    1. Override the paint and/or PaintComponent methods in the JTable, problem is that if I do
    public void paintComponent(Graphics g) {
    pnlOptions.paint(g);
    super.paint(g)
    There seems to be a lot of issues with this approach (maybe the whole idea is fundamentaly wrong), because JTable is a child of pnlOptions so it seem to cause some recurrency. I also tried a loop that gets all the components from pnlOptions, identifies the JTable and call super.paints(g). But in all the cases I get wrongly drawn components, and don't get the desired result.
    2. Extend the BasicTableUI overriding the paint method. Now I can control the drawing of the JTable, but when I tried to add other JComponents like the JSplitPane, I run into similar issues as the first approach.
    3. There is always the possibility of "manually" drawing al the requiered extras for the JTable and adding the corresponding event listeners, but this looks like and excessive task.
    I also done a lot of search and found many examples on Custom Components and Custom Drawing, but none of them tried to "encapsulate" a Swing Component into another like I'm trying to do. I should have started saying that I've been self learning (in the time I can spare) Java only for a few months now, so maybe I'm looking at this issue in a completely wrong way.
    Thanks for any suggestions

    Thanks for the reply, I was exactly looking to confirm if this was not the right approach.
    Actually I was trying to push the situation to see if doing such a thing was posible, or better said it was worht the trouble. Now I have a better understanding of what it means to make a component that will be a completely transparent replacement for an existing one, meaning that no code should need to be change, except obviously for the constructor call (with a different name).
    I'll may just follow your advise, however I think I've already achieved more or less the same behavior, by extending JTable and adding a simple method that returns the JPanel which then (as you said) can be included almost anywhere. In this way the new component is subclass of JTable, and the only thing different is the need to include the JPanel instead of the JTable as a component in the application.
    Thanks again.

  • How to map a custom enum list to a custom form property in an extended incident class

    Hi,
    I'm struggeling to understand how to map a custom enum list to a custom form property in an extended incident class.
    Here's what i want to have happen:
    I am going to publish a request offering on my SMPortal for allowing users to submit basic IT incidents. I want the form to include "Whom does this problem affect" (answers(This is the custom enum list): Me, Multiple Users, Whole department or Whole
    company), "What is the problem about", "Description" and "Attachments".
    Here's what i've done:
    In the authoring tool i created a MP for the custom enum list and put only the list in it. I sealed the MP and imported it.
    I created another unsealed MP called TST.Incident.Library for storing incident library customizations and extended the incident class to add an extension class i called ClassExtension_Affected scope with a custom property i called AffectedScope. Then i am trying
    to set the datatype of this property to "list". In the "select a list" dialog i cannot chose my previously sealed MP with the custom enum list in it. Why?
    - Do i need to scratch the sealed MP and put the custom enum list in the latter TST.Incident.Library MP instead?
    - If so, can i do that and keep this MP unsealed, or will i get an error on import saying "Unsealed management packs should not contain type definitions"
    - Should i create one sealed MP for both the custom enum list and the extension class + custom property?

    Hi,
    Authoring Tool simply isn't informed about your list. Open the sealed management pack where you define the root of the list in the Authoring Tool and in the same time open TST.Incident.Library. You will have two opened MPs in the Authoring
    Tool and be able to add a custom list for your custom field.
    Cheers,
    Marat
    Site: www.scutils.com  Twitter:
      LinkedIn:
      Facebook:

  • How to extend JTable's TransferHandler in 1.4.1?

    Has anyone successfully extended a JTable's TransferHandler in 1.4.0 or 1.4.1beta?
    Here is a simple working JTable DnD example but I need to be able to transfer data other than just strings (which is all that this example is designed to do) and the only way I can think of is to extend the TransferHandler (by default, in 1.4.1, JTable BasicTableUI has a TableTranserHandler class with a createTransferable method that is supposed to create a Transferable with various HTML tags but it doesn't seem to get called). I can't seem to do anything with the TransferHandler without clobbering the drag operation -- see bug report at the link shown below:
    http://developer.java.sun.com/developer/bugParade/bugs/4514071.html
    The bug shown above is supposedly fixed and closed but I think the problem still exists. I would appreciate anyone who can shed some light on this subject -- I've assign 5 dukes to this subject but if needed, I can assign more later.
    ;o)
    V.V.
    prog.java
    =========
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.text.*;
    public class AOKabc extends JApplet {
       static myMenu window;
       public void init() {
          initialize();
          window.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
       public void stop() {
          window.dispose();
       public static void main(String[] args) {
          initialize();
          window.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
       private static void initialize() {
          window = new myMenu("AOKabc");
          window.setVisible(true);
       static class myMenu extends JFrame {
          JScrollPane scrollPane;
          public myTable myTbl;
          JFrame frame=new JFrame();
          JPanel panel=new JPanel(new BorderLayout());
          public myMenu(String title) {
             super(title);
             setSize(800,600);
             Container contentPane = getContentPane();
             myTbl=new myTable(800,600);
             scrollPane=new JScrollPane(myTbl);
             panel.add("Center",scrollPane);
             contentPane.add(panel,BorderLayout.CENTER);
    }myTable.java
    ============
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.text.*;
    import java.awt.dnd.*;
    import java.awt.datatransfer.*;
    public class myTable extends JTable implements DropTargetListener {
       public static final int maxCol=26;
       public static final int maxRow=100;
       Object rowData[][]=new Object[maxRow][maxCol];
       Rectangle drawRect;
       private DropTarget dropTarget;
       myTable(int width, int height) {
          setPreferredScrollableViewportSize(new Dimension(width,height));
          TableModel TM=new AbstractTableModel() {
             public Object getValueAt(int row, int col) {
                if (rowData[row][col]==null) return "";
                return rowData[row][col];
             public int getColumnCount() {
                return maxCol;
             public int getRowCount() {
                return maxRow;
             public boolean isCellEditable(int row, int col) {
                return true;
             public void setValueAt(Object value, int row, int col) {
                rowData[row][col]=value;
                fireTableCellUpdated(row, col);
          setModel(TM);
          setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
          setCellSelectionEnabled(true);     // this basically turn off row selection highlighting
          getTableHeader().setReorderingAllowed(false);
          for (int i=0;i<maxCol;i++) getColumnModel().getColumn(i).setMinWidth(50);
          setDragEnabled(true);
    /*** uncomment the next lines and the drag stops working (it won't work even if it's followed by a call to updateUI() ***/
    //      setTransferHandler(new TransferHandler("Text"));
          dropTarget=new DropTarget(this,this);
       public void dropActionChanged(DropTargetDragEvent event) {}
       public void dragEnter(DropTargetDragEvent event) {}
       public void dragExit(DropTargetEvent event) {}
       public void dragOver(DropTargetDragEvent event) {}
       public void drop(DropTargetDropEvent event) {
          Transferable contents=event.getTransferable();
          if (contents!=null) {
             if (contents.isDataFlavorSupported(DataFlavor.stringFlavor)) {
                try {
                   Point p=event.getLocation();
                   int row=rowAtPoint(p);
                   int col=columnAtPoint(p);
                   String line=(String)contents.getTransferData(DataFlavor.stringFlavor);
                   int start=0;
                   int end=line.indexOf("\n");
                   if (end<0) {
                      setValueAt(line,row,col);
                      return;
                   String[] tmp;
                   while (end<=line.length()) {
                      tmp=getStringArray(line.substring(start,end),'\t');
                      for (int j=0;j<tmp.length;j++) setValueAt(tmp[j],row,col+j);
                      row++;
                      start=end+1;
                      if (start>=line.length()) break;
                      end=line.substring(start).indexOf("\n");
                      if (end>=0) end+=start; else end=line.length();
                } catch (Throwable e) {
                   e.printStackTrace();
       private String[] getStringArray(String inStr, char ctkn) {
          String[] x;
          if (inStr.length()==0) {
             x=new String[1];
             x[0]="";
             return x;
          int i=0;
          String tmp="";
          ArrayList AL=new ArrayList(20);
          while (i<inStr.length()) {
             if (inStr.charAt(i)==ctkn) {
                AL.add(new String(tmp));
                tmp="";
             } else tmp+=inStr.charAt(i);
             i++;
          AL.add(new String(tmp));
          x=new String[AL.size()];
          for (i=0;i<AL.size();i++) x=(String)AL.get(i);
    return x;

    Finally revisited this problem and found that it's a matter of putting the horse before the cart....i.e., TransferHandler has to be set before drag is enabled.
    Consider ubject matter closed!
    ;o)
    V.V.

  • TileLists, custom renderers and accessibility

    I have a tile list which implements a custom item renderer for each list item. The renderer contains 3 buttons. I've noticed that I can tab to the tile list itself, then use the cursor keys to move to indvidual items within it, but I can't then navigate to the buttons within each item.
    Is this possible, or a complete non-starter?
    Also I've noticed that there is ListEvent for the item roll over and roll out, but I can'd find anything to provide notification of keyboard-driven highlight as above. I want to change the state of the item on mouse hover or keyboard navigation...
    Cheers

    The ViewHandler, together with the StateManager, takes care of all of this when you save state on the server, so your custom renderers do not need to do anything. The request path includes enough information to figure out which view it's for, and the RI maintains views per session (other implementations are possible), which in turn is identified by a cookie or a session ID encoded in the request path (just as for any Java web application).
    For client-side state saving, the StateManager also uses a ResponseStateManager, which is part of the render kit, to encode and decode the state. It's only if you want to use client-side state and develop renderers for a different markup than HTML that you need to develop a complete render kit, including a ResponseStateManager and a form renderer that interacts with the ViewHandler and StateManager to encode the state in the response.

  • What is custom renderers?

    hello,
    im a little bit in the web area..so forgive me for maybe the obvious question.
    what is renderer?? is that the proccess where the server proceess all written in jsp page and put it as an html and send it back to user?
    also, what is custom renderers?
    thanks in advanced.

    A "component" is some UI widget, like an input text field, or even a date picker that consists of serveral HTML fields. JSF defines a component in at least 2 pieces: 1) a UIComponent subclass; and 2) a Renderer subclass.
    A "Renderer" for a component is responsible for producing some output for a particular markup (like HTML) for a given component. Therefor a "custom renderer" is a modified or user-defined renderer that replaces another renderer.
    The easiest way to define custom components (including the renderer) is with JSFTemplating. It is the only framework (that I know of) that helps create JSF renderers. It does this by allowing you define the renderer in a JSP-like format.
    I hope this answered your question.
    Good luck!
    Ken Paulsen
    https://jsftemplating.dev.java.net

  • Custom table cell renderer in a JTable is not called

    Hello, all,
    I have the following task: I need to select several cells in a column, change the value of those cells, and once the value changes, the color of these cells should change as well. I wrote a custom cell renderer, and registered it for the object type that will use it to render the cell. However, the custom cell renderer is never called. Instead, the class name of the object is displayed in the cell.
    My code snippents are as follows:
    //Declare the table and add custom cell renderer
    JTable table = new JTable (7,7);
    table.setCellSelectionEnabled (true);
    table.setSelectionMode (ListSelectionModel.SINGLE_INTERVAL_SELECTION);
    //Add the custom cell renderer to render objects of type Item
    table.setDefaultRenderer(Item.class, new CustomTableCellRenderer());
    //Get the selected cells and change the object type in those cells
    //This part works, since I see the app entering the for loop in the debugger, and the item.toString() value is displayed in each selected cell
    int rowIndexStart = table.getSelectedRow();
    int rowIndexEnd = table.getSelectionModel().getMaxSelectionIndex();
    int colIndex = table.getSelectedColumn();
    Item item = new Item ();
    for (int i = rowIndexStart; i<=rowIndexEnd; i++){
                  table.setValueAt(item, i, colIndex);
                 //I expect the cell to redraw now using custom cell renderer defined below, but that cell render is never called.  Instead, the item.toString() value is displayed in the cell.   What is wrong?
    //Definition of custom cell renderer. 
    //the getTableCellRendererComponent is never called, since the System.out.println never prints.  I expected this method to be called as soon as the Item object is added to the cell.  Am I wrong in expecting that?
    class CustomTableCellRenderer extends DefaultTableCellRenderer  {
        public Component getTableCellRendererComponent (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
            Component cell = super.getTableCellRendererComponent (table, value, isSelected, hasFocus, row, column);
            System.out.println("value: "+value.getClass()+" isSelected "+isSelected+" hasFocus "+hasFocus+" row "+row+" col "+column);
            if (this.isFocusOwner()) {
            cell.setBackground( Color.red );
            cell.setForeground( Color.white );
            return cell;
    } Please, help,
    Thank you!
    Elana

    The suggestion given above assumes that all the data in a given column is of the same type.
    If you have different types of data in different rows the you should be overriding the getCellRenderer(...) method. Something like:
    public TableCellRenderer getCellRenderer(int row, int column)
        Object o = getValueAt(row, column);
        if (o instanceof Item)
            return yourCustomRenderer
        else
            return super.getCellRenderer(row, column);
    }

  • Customer has not registered their extended Applecare protection and now have a faulty macbook pro, any ideas

    Customer purchased a MacBook Pro last January with 1 year warranty attached.  They also purchased an extended 3 year warranty, which they did not register.  This unit is now faulty, any ideas?

    First enter the serial number here to check if it was registered.
    https://selfsolve.apple.com/agreementWarrantyDynamic.do
    Next contact Apple at 1-800-MY-APPLE

  • Flattening a JTreeTable to a JTable

    Has anybody done something along the following lines...
    Taking a JTreeTable that looks like this:
    Parent 1
                    Child 1
                    Child 2
                    Child 3
    Parent 2
                    Child 4
                    Child 5
    and converting into a JTable that looks like this:
    Parent 1        Child 1
    Parent 1        Child 2
    Parent 1        Child 3
    Parent 2        Child 4
    Parent 2        Child 5

    Hi,
    I need some help regarding the same.I need to show the Jtree in two columns.The first level of the root in one column and the children of these in second column.The nodes in the second column will have their children shown in second column.
    Thanks in Advance

  • Custom renderers

    I have use case where i need to have the custom renderer
    format a LinkButton. I want to pass a function reference/pointer so
    that when the LinkButton is clicked, the method is invoked in the
    parent component. How do I accomplish this? I tried passing it in
    and referring it as {data.functionReference} within the renderer,
    but nothing happens. Is this even possible?
    Thanks for any help!

    This is not a good approach. Renderers need to be data
    driven. For example, is the link button method the same for all
    rows? I'm sure not. So how were you planning to pass a different
    function to each row?
    The best solution is to use events.
    Have a string in your data that indicates what action is to
    take place.
    In the renderer, read this string from data, and set it in a
    public property
    On click of the LinkButton, dispatch and event:
    dispatchEvent(new Event("myLinkButtonClick",true); //the
    'true' makes the event bubble.
    in the parent app, set a listener for "myLinkButtonClick".
    In the handler, use event.target to get a reference to the
    renderer instance that dispatched the event.
    From that reference, get the action string, and then go from
    there.
    Tracy

  • How to create a custom report and include multiple extended CRM database?

    I have created a number of CRM databas extensions and applied all there fields to my contacts and cases.
    I might have for example:
    - Additional address details
    - Business information
    - Quote Details
    - Trade Referees
    I know how to run a custom report and that I can select any one of these extra CRM databases as a filter and included them in the report. Is there a way though to add more than one (preferrably all) of the extra CRM databases to the report?
    The onely ways I can see it work is by either include all fields in one extra CRM database (not ideal) or bu running multiple reports and merge them somehow in Excel.
    Is there another way that I am not aware off?
    Thanks for your help,
    Jerun

    Hi Jerun,
    There's no way to do that. You'll need to run separate reports and merge them in Excel.
    -m

  • Custom evaluation of EL expressions - extend ExpressionEvaluator?

    I have a model class (corresponding to a database table) with some exclusion flags, where the flags indicated that a field should not be displayed on a page where we choose to apply exclusions. For example, a person may request that their username and date of birth not be listed in a directory search, yet we would still want to show the username/birthdate on a page where the user is looking at their own information. For example:
    public class Person {
        private String name;
        private Date birthDate;
        private String username;
        private boolean excludeBirthDate;
        private boolean excludeUsername;
        // getters and setters
    }I want to write a tag such that I can say in my JSP:
    <page:applyExclusions>
        ${person.username} ${person.name} ${person.birthDate}
    </page:applyExclusions>and have only the person's name display (if they have requested that the other fields be excluded).
    Looking at the tags API, it seems like I would want to have my own ExpressionEvaluator whose evaluate method says something like
    public Object evaluate(String expr, Class type, VariableResolver resolver, FunctionMapper mapper) {
        if (type.equals(Person.class) &&
             expr.equals(someExcludedField)) {
             // return empty String or something to say "don't display the actual value"
        else {
            // ok to display value, evaluate like normal
            return super.evaluate(expr, type, resolver, mapper);
    }Not sure if I'm on the right track with my idea or if there's a better way to accomplish this?

    An expression evaluator is exactly that - searches for some variables in scope and performs evaluation on them according to a set of rules.
    IMO you shouldnt be changing this functionality to include your business logic there. You should be writing your own custom tags for such pruposes, something like
    <myTag:applyExclusions username="${userName}" name="${name}" birthDate="${brithDate}/>And in your tag code, you would have
    public int doEndTag() throws JspException {
            try {
                pageContext.getOut().println("UserName "+ userName);
                if(user is viewing the page)//your logic here{
                     pageContext.getOut().println("Name "+ name);
                     pageContext.getOut().println("Birth Date "+ birthDate);
            } catch (IOException exp) {
                throw new JspException(exp);
            return EVAL_PAGE;
    }  where userName, name and birthDate are attribute properties of the tag with get and set methods as evnafets suggested.
    Hope that helps.
    cheers,
    ram.

  • Advanced Data Grid customized renderers interaction

    I created an advancedDataGrid with two customized colums:
    The first has a customized item renderer which is used also
    as the item editor and it is a check box.
    The second has a customized item editor - once the cell is
    clicked, a button appears. When the button is clicked - a popup
    window appears for selection. the selection is the new text of the
    cell.
    Seperatly, they work fine. There is only one scenario where
    the check box disturbs the button - When the check box is clicked
    and without exiting the row, the other customized cell is edited,
    its item rendered does not get updated.
    Here is the grid's colum definition:
    <mx:AdvancedDataGrid id="dataGrid"
    allowDragSelection="false"
    draggableColumns="false"
    editable="true"
    width="100%" height="100%"
    dataProvider="{dataGridSource}"
    defaultLeafIcon="{null}"
    folderClosedIcon="{null}"
    folderOpenIcon="{null}"
    change="onRowSelectionChanged(event)"
    itemEditEnd="onItemEndEdit(event)"
    <mx:columns>
    <mx:AdvancedDataGridColumn dataField="isSelected"
    headerText="" width="20"
    rendererIsEditor="true"
    editorDataField="selected"
    >
    <mx:itemRenderer>
    <mx:Component>
    <mx:CheckBox selectedField="selected"
    change="data.isSelected = selected;
    StatesTable(document).updateDashletState(data)"/>
    </mx:Component>
    </mx:itemRenderer>
    </mx:AdvancedDataGridColumn>
    <mx:AdvancedDataGridColumn id="statesColumn"
    dataField="event"
    headerText="{ResourceManager.getString('state_grid_header')}"
    editable="false" width="150"
    labelFunction="localizeLabelFunction"/>
    <mx:AdvancedDataGridColumn dataField="dashletName"
    headerText="{ResourceManager.getString('dashlet_grid_header')}"
    width="150" editable="false"/>
    <mx:AdvancedDataGridColumn dataField="contentName"
    headerText="{ResourceManager.getString('report_grid_header')}"
    width="180"
    itemEditor="com.documentum.bpm.dashboard.components.configuration.DataGridReportChooser"
    editorDataField="selectedItem"/>
    </mx:columns>
    </mx:AdvancedDataGrid>
    //this code is for preventing default behavior of the item
    editor for the customized item editor for opening a popup window
    instead:
    private function
    onItemEndEdit(event:AdvancedDataGridEvent):void
    var item:Object = dataGridSource.getItemAt(event.rowIndex);
    if (event.dataField == "contentName")
    event.preventDefault();
    Please help

    Thanks, if I do this I get an error: 'HBox' declaration must be contained within the <Declarations> tag since it does not implement
    'mx.core.IUIComponent'.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:AdvancedDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
             xmlns:s="library://ns.adobe.com/flex/spark"
             xmlns:mx="library://ns.adobe.com/flex/halo" width="400" height="300">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                /* override public function set data(value:Object):void
                    var currencyFormatter:CurrencyFormatter=new CurrencyFormatter();
                    currencyFormatter.precision=2;
                    currencyFormatter.currencySymbol='';
                    if (value != null)
                        numberOfItems.text = value.totalTransfers + ' items';
                        notionalAmount.text = currencyFormatter.format(value.totalNotional)+ ' Notional amount';
                        numberUnmatched.text = new Number(value.totalUnmatched) >0? value.totalUnmatched + ' Unmatched':'';
            ]]>
        </fx:Script>
        <mx:HBox  height="18" backgroundColor="#B0D9FF" horizontalScrollPolicy="off">
            <mx:Text text="Text" width="94" id="numberOfItems" color="#000A8A"/>
            <mx:VRule height="100%"/>
            <mx:Text text="Text" width="291" id="notionalAmount" color="#000a8a"/>
            <mx:VRule height="100%"/>
            <mx:Text text="Text" id="numberUnmatched" width="103" color="#000a8a"/>
        </mx:HBox>
    </mx:AdvancedDataGridItemRenderer>

  • Spark datagrid - custom renderers

    In my Spark DG I have a column that serves a purpose of starting and ending an editing session. I use a custom item renderer with a button that when I click on it initiates editing and gets its icon changed.
    When I click on the same button in another row I want to end editing in the first row and flip its button back to original. I am using states for that.
    Everything seems to be working except when I start editing in row #1 from the top and then click on a button in any other row the button in the first row does not change its icon.
    It has been already days of work trying figuring out what is so special in the row #1. No luck. Please help.
    Thank you.

    I am implementing the datagrid that only redraws and refreshed the cells that are updated insted of refreshing the whole datagrid.
    There is already and example  on MX Datagrid which refreshed only particular cells. Here is the link http://blogs.adobe.com/tomsugden/2010/04/optimizing_the_flex_datagrid_f.html . we can test it by launching application, right click on the application and select "Show redraw regions"
    I have the similar requirement (updating only the refreshed cells, insted of whole datagrid) but I want this feature in Spark Datagrid.
    (similar  one on spark is in this link http://hansmuller-flex.blogspot.com/2011/07/high-performance-christmas-tree.html)
    I am using the prepare method, but still the functionality is not working. When I right click and select show redraw regions. The whole daatgrid is redrawn instead of particular cells.
    override public function prepare(hasBeenRecycled:Boolean):void  {

  • BC4J Custom Renderers

    Does JHeadStart support these?
    http://www.oracle.com/technology/products/ids/daily/aug02.html
    I have used them before but when I tried to use them in my JHS project it doesn't seem to pick them up.
    Thanks.

    JHeadstart does not recommend or support Business Components data tags (tags with the jbo: prefix). The reason is that we prefer a sound Model-View-Controller architecture.
    Since JDeveloper 10g the Business Components data tags are deprecated (see http://www.oracle.com/technology/products/jdev/collateral/others/desupport10g.html).
    kind regards,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

Maybe you are looking for

  • LR3.2 import problem on computer with Windows OS

    LR3.2 import problem on Windows OS This is a continuation of a question that I posed on August 22, 2010 in the discussion string "Cannot import CR2".  I have not been able to resolve the issue of importing an image into an existing folder location. 

  • A Series of Unfortunate Audio Related Problems

    I'm having a whole series of issues playing wav's. I've tried 3 methods. The Applet.newAudioClip() method, the javax.sound.sampled.Clip method (Using AudioInputStream and AudioSystem,), and JMF Player. I've attempted to "cache" the objects by either

  • Time Capsule satelite

    I have a family and therefore a family of macbooks. Our timecapsule is in the front of the house, my home office, used sparely is in the back. I have just discovered that we have a concrete shelter masquerading as a bathroom in between (storm shelter

  • ATV2 not sorting correctly

    Has anyone else noticed their ATV2 does not sort TV Shows correctly? Here are a couple of examples - The Colbert Report is under "T" - AppleTV1 listed it under "C" as it should be Multiple seasons of of shows are showing up separately. So instead of

  • Hi! I cant save my document in office. Can anybody help?

    Suddenly it stopped working. I have all recent updates, and my Office is brand new