JFXtras 2 CalendarTextField with Picker in a TableView Cell

I would like to use the new jfxtras 2 CalendarTextField in a tableview cell, so each cell in a column has its own date picker popup.
Could someone provide sample code on how to do this.

Hi Gregory,
try it with the following:
CREATE OBJECT lcl_bee_table.
lcl_bee_table->add( lcl_link ).
lcl_bee_table->add_html( html = `<br>` ).
lcl_bee_table->add( lcl_bsp_element ).
p_replacement_bee = lcl_bee_table.
instead of the 'concatenate' line
Regards,
Rainer

Similar Messages

  • Date Field in Tableview Cell

    Hi,
    I want to insert a Input field with date picker in the tableview cell. I know I have to use the Renderer class for this. But I need some code samples. Please help me in this regard.
    Regards,
    Purushothaman.

    Hi puroshotam, Saliam
    I m trying htmlb table for the first time. I am not able to add elements onto table cell.. My code is as follows
    dynpage:
    package com.linde.myaccounts.paymyaccountprelogin.dynpage;
    import com.sapportals.htmlb.event.Event;
    import java.io.IOException;
    import javax.naming.Context;
    import com.linde.myaccounts.util.TableBean;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.prt.component.IPortalComponentProfile;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    public class PayMyAccountPreLoginDynpage extends PageProcessorComponent {
      public DynPage getPage(){
         return new PayMyAccountPreLoginDynpageDynPage();
      public static class PayMyAccountPreLoginDynpageDynPage extends JSPDynPage{
         private TableBean myBean = null;
         public void doInitialization(){
              IPortalComponentResponse response = (IPortalComponentResponse) this.getResponse();
           IPortalComponentProfile profile = ((IPortalComponentRequest)getRequest()).getComponentContext().getProfile();
           Object o = profile.getValue("myBean");
           if(o==null || !(o instanceof TableBean)){
              myBean = new TableBean();
              myBean.createData();
              profile.putValue("myBean",myBean);
           } else {
               myBean = (TableBean) o;
           // fill your bean with data here...
           IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
           //doJca(request);
         public void doProcessAfterInput() throws PageException {
         public void doProcessBeforeOutput() throws PageException {
           this.setJspName("PayMyAccountPreLoginStep1.jsp");
         public void onInstruction(Event event)
         public void onClearScreen(Event event)
         public void onPayment(Event event)
    jsp
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <%@ page import="com.linde.myaccounts.util.MainCellRenderer"%>
    <jsp:useBean id="myBean" scope="application" class="com.linde.myaccounts.util.TableBean" />
    <hbj:content id="myContext">
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId">
    <hbj:tableView id="myTableView1"
                          model="myBean.model"
                          design="ALTERNATING"
                          headerVisible="false"
                          footerVisible="false"
                          fillUpEmptyRows="true"
                          visibleFirstRow="1"
                          visibleRowCount="5"
                          width="500 px" >
      <%mytableView1.setUserTypeCellRenderer(new MainCellRenderer());%>
    </hbj:tableView>
    </hbj:form>
      </hbj:page>
    </hbj:content>
    tableBean
    Created on Nov 21, 2007
    To change the template for this generated file go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    package com.linde.myaccounts.util;
    @author zm46187
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    import java.io.Serializable;
    import java.util.Vector;
    import com.sapportals.htmlb.table.DefaultTableViewModel;
    import com.sapportals.htmlb.table.TableViewModel;
    public class TableBean implements Serializable {
         public DefaultTableViewModel model;
         public TableBean(){
         model = new DefaultTableViewModel();
         public TableViewModel getModel() {
              return this.model;
         public void setModel(DefaultTableViewModel model) {
              this.model = model;
         public void createData() {
              //this is your column names
              Vector column = new Vector();
       column.addElement("invoice number:");
       column.addElement("show balance");
      column.addElement("balance");
      column.addElement("pay balance:");
      column.addElement("other amount");
              //all this logic is for the data part.
              Vector rVector = new Vector();
              try {
                   for(int i=0;i<3;i++) {
                        Vector data = new Vector();
                        data.addElement("invoice number:"+ i);
                        data.addElement("show balance" + i);
                        data.addElement("balance" + i);
                        data.addElement("pay balance:" + i);
                        data.addElement("other amount" + i);
                        rVector.addElement(data);
              } catch (Exception e) {
                   e.printStackTrace();
              //this is where you create the model
              this.setModel(new DefaultTableViewModel(column));
    //          this.setModel(new DefaultTableViewModel(rVector, column));
    MainCellRenderer ( I have created a new class in my package and imported in the jsp)
    Created on Nov 23, 2007
    To change the template for this generated file go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    package com.linde.myaccounts.util;
    @author zm46187
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    import com.sapportals.htmlb.Link;
    import com.sapportals.htmlb.rendering.IPageContext;
    import com.sapportals.htmlb.table.ICellRenderer;
    import com.sapportals.htmlb.table.TableView;
    public class MainCellRenderer implements ICellRenderer {
    The class, which renders the user type. In the bean we declared column 1 and 3 as type USER
    For the 2 columns we define a cell renderer. In column 1 we set a drop down listbox
    and in the column 3 we set an input field with the field type DATE and showHelp="TRUE"
    This will bring up a help button at the end of the input field. When the user clicks the
    button the date navigator comes on and the date can be selected from the calender.
    See the HTMLB Reference for details on inputField.
    public void renderCell(int row, int column, TableView tableView, IPageContext rendererContext) {
    System.out.println("===table VIEW cell renderer called===");
    if (column == 1) {
    Link link = new Link("myLink");
    //link.setOnClick("GetDetails");
    link.addText(tableView.getValueAt(row,column).toString());
    link.render(rendererContext);
    I am getting a error during rendering of jsp component. Is this <%mytableView1.setUserTypeCellRenderer(new MainCellRenderer());%> wrong? Bcoz when I remove this line I am able to see a empty table. Kindly help!! this is very urgent issue..Please help
    Regards,
    Priyanka

  • TableView cells gobble up my memory

    Does anyone know how to re-use a tableview cell renderer? I have a table with 50 visible rows and 20 visible columns so fx creates 50*20=1000 instances of TableCell,
    each is around 488b shallow size and around 4030 bytes retained size (as profiler told me) so that makes my table, just the table not counting my data to use over 4 Mb !
    And I need 10 tables in my app.
    Does anyone have any ideas how to reuse cell/renderer or minimize memory usage?
    Any help is greatly appreciated!
    Here is a sample of how I create factory and renderers.
    TableColumn column = new TableColumn(name);
    column.setMinWidth(20);
    column.setCellValueFactory(new PropertyValueFactory<Person, String>(propertyName));
    column.setCellFactory(new MyCellFactory());
    class MyCellRenderer extends TableCell<Person, String>
    public MyCellRenderer()
    super();
    protected void updateItem(String value, boolean empty)
    super.updateItem(value, empty);
    if (!empty)
    setText(value + " *");//this is instead of my real sophisticated operation
    class MyCellFactory implements Callback<TableColumn, TableCell>
    public MyCellFactory()
    public TableCell call(TableColumn p)
    return new MyCellRenderer();
    }

    Completely uninstall Norton Antivirus.
    Norton antivirus is a known source of problems and issues for Macs running OS X.
    Also, you are wrong about your RAM.
    Your 2008 model iMac can take up to 6 GBs of RAM.
    I noticed you have upgraded to OS X 10,8 Mountain Lion
    Unfortunately, both OS X 10.7 Lion and OS X 10.8 Mountain Lion use more CPU, GPU,RAM and hard drive resources.
    OS X, by itself, can use between and up to  2-4 GBs of RAM to run smoothly, quickly and efficiently.
    That leaves very little precious RAM for other applications to run with.
    You can replace one of your 2 Gb RAM modules with a 4 GB module to,give your iMac a total max. RAM of 6 GBs.
    Correct and reliable Mac RAM can be purchased from online Mac RAM source OWC (macsales.com).
    http://eshop.macsales.com/shop/memory/iMac/Intel_Core_2_Duo_PC2-6400
    Good Luck!

  • How to read vales from dropdownlistbox placed in tableView Cells

    Hi,
      Thanks for reply.. I got problem of reading values from Dropdownlist box placed in tableView Cells. Please correct me or give some sample to read vales from dropdownlistbox placed in tableView Cells.
    TableView column defined as
            <htmlb:tableViewColumn columnName = "OT_REASON_CODE"
                                   title      = "OT Reason"
                                   type       = "User"
                                   width = "6"
                                   edit       = "true" >
              <htmlb:dropdownListBox id                = "rcode"
                                     table             = "<%= I_YH008 %>"
                                     nameOfKeyColumn   = "OT_REASON_CODE"
                                     nameOfValueColumn = "OT_REASON_DESC" />
            </htmlb:tableViewColumn>
    OnInput processing I am trying to read dorpdown list values selected.
              W_YH022-ENDUZ = TABLE_EVENT->GET_CELL_VALUE(
              ROW_INDEX = SY-TABIX
              COLUMN_INDEX = 3 ).  " Get time
    DATA: data TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX.
    DATA: value type string.
         value = TABLE_EVENT->GET_CELL_ID( row_index    = SY-TABIX
                                      column_index = '7').  " get Cell ID
    data ?= CL_HTMLB_MANAGER=>GET_DATA(
                                     request = runtime->server->request
                                     name    = 'dropdownlistbox'
                                     id      = value
    IF data IS NOT INITIAL.
    W_YH022-OT_REASON_CODE = data->selection. " +Cell Values...I am not getting cell values here+
    endif.

    Hi:
    Do like this
    Layout
          <htmlb:dropdownListBox id="mydropdownlist" >
            <htmlb:listBoxItem key   = "bpno"
                               value = "Business Partner Details" />
            <htmlb:listBoxItem key   = "bpaddress"
                               value = "Business Partner Address" />
          </htmlb:dropdownListBox>
    OnInpurProcessing event - >
    DATA: lcl_dropdown TYPE REF TO cl_htmlb_dropdownlistbox.
    data : selection2 type string.
    lcl_dropdown ?= cl_htmlb_manager=>get_data(
        request = runtime->server->request
        name    = 'dropdownListBox'
        id      = 'mydropdownlist' ).   
    IF NOT lcl_dropdown->selection IS INITIAL.
      selection2 = lcl_dropdown->selection.
    ENDIF.
    Regards
    Shshi

  • BAPI For Create Goods Issue for Sales order with picked quantity

    Hi friends,
            Is there any BAPI available to create Goods issue For sales order with picked quantity...............?
    we hv used BAPI_OUTB_DELIVERY_CREATE_SLS
    with sales order .......its creating delivery order but not doing goods issue with piked quantity........

    pls,reply its argent

  • Cfspeadsheet not picking up data from cells using excel function indirect

    I am receiving data from comany executive in a sreadsheet and trying to post selected data to a company intranet by reading the data using cfspreadsheet.  for the most part, cfspeadsheet works, however, this speadsheet is rather complicated.  The spreadsheet uses the excel indirect function to determine which data to post.  When I read this cell, or any cell dependent on it, with SpreadsheetGetCellValue, if get the cell formula instead or the calculated value for the cell.  Is this function not supported by cold fusion?
    Is there any way around this?
    Is the a list somewhere of which Excel functions are or are not supported?

    Thanks for your reply...
    it is now displaying data in independent cells , but is it possible to add multiple headings in that excel sheet.
    ex
    Heading 1
    heading 2
    Column Headings-------
    Is it possible to do that way?? for column headings i think we need to pass in fields parameter of Tables...
    can we include multiple headings???
    Thanks for help..

  • I meet a lot of 3G signal when a call signal disappears 3G! I read the manuals and anything I find the problem! I do so with other brands and other cell does not, the same goes when I receive a call!

    I meet a lot of 3G signal when a call signal disappears 3G! I read the manuals and anything I find the problem! I do so with other brands and other cell does not, the same goes when I receive a call!

    Who is your carrier?  Are you actually on 3G?
    Do you have 3G turned on or off?  Settings > General > Network > Enable 3G

  • Possible bug with Pick flag and Collections

    Odd behaviours in v3.3  (Windows) with pick flags in Collections:
    Create (or use) a Collection Set which contains a number of different collections
    Assign Pick plag to one photo in each collection
    Bug 1: Highlight Collection Set and note that none of the images shows the Pick Flag in the thumbnail view. Also Filtering this view with Pick flag fails to pick up the Flagged images
    Now return to one of the Collections within the Set and create a Virtual Copy of one of the images that has a Pick flag. (Note virtual copy does not have a flag - which seems logical). Return to Collection Set and (Bug 2) note that Pick flag has disappeared from original image and now appears on Virtual copy.
    Something wrong here somewhere I suspect.

    lightshop wrote:
    Odd behaviours in v3.3  (Windows) with pick flags in Collections:
    Create (or use) a Collection Set which contains a number of different collections
    Assign Pick plag to one photo in each collection
    Bug 1: Highlight Collection Set and note that none of the images shows the Pick Flag in the thumbnail view. Also Filtering this view with Pick flag fails to pick up the Flagged images
    Now return to one of the Collections within the Set and create a Virtual Copy of one of the images that has a Pick flag. (Note virtual copy does not have a flag - which seems logical). Return to Collection Set and (Bug 2) note that Pick flag has disappeared from original image and now appears on Virtual copy.
    Something wrong here somewhere I suspect.
    I could partially repeat bug 2.
    I have Collection Set (Test) which contain to collections: "Collection 1" and "Collection 2". Both Collections contain 4 images.
    I selected "Collection 1" and applied Pick flag to all those images. When I select Test (Collection Set) I got 8 images shown,  which none had flags. Ok, this works as expected. I selected "Collection 1" and then selected 1 image and made Virtual copy from it. Lr show me now 4 images with Flag and 1 virtual copy without. Again, works as expected. I now select Test (Collection Set) and I get 9 images (as expected), but one of them, the virtual copy, has pick flag applied. Not as expected. If I go back to "Collection 1" I get four images with Pick flags and one virtual copy without. (as expected.)

  • Setting the footer with the value of a cell - Excel 2010-2013

    Hi,
    is it possible to set the footer of a workbook with the value of a cell without using VBA code or macro?
    Thanks

    No; it is not possible to enter a formula that refers to cells in the header or footer. A VBA macro is the only way to set the header or footer to the value of a cell.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • What is the difference between sales order with picking and without picking

    hi friends,
    i would like to know what is the difference between sales order with picking and without picking.
    thanks
    skrishnan

    Hello,
    Picking refers to preparing the right quantity and quality of goods for shipping on schedule as required by the customer.
    Once picking is configured, SAP Sd automatically generates picking lists and picking labels which can be tagged to the relevant goods. SAP can be configured to ensure that picked quantity is confirmed before goods are issued. This can be done using transaction code VSTK. In T-code VSTK, picking confirmations can be set, which ensure that goods picked for delivery are in accordance with picking slips.
    Picking thus helps in monitoring each item using the picking status. Picking is normally done in SAP SD by a shipping clerk.
    Prase

  • How to bind tableview cell co-ordinate with line

    Hello,
    i have two tableview controls in one group say LeftTable and Righttable. Now i want to achieve functionality as below.
    every time Line should draw from where user drag mouse on any row of Lefttable and drop it on any RightTable.
    i was not able to get selected cell co-ordinate but i have achieve this functionality manually by calculating StartX, StartY, EndX and EndY of line as below
    Line.setStartX(LeftTable.getLayoutX()+LeftTable.getWidth())
    Line.setStartY(event.getSceneY())
    Line.setEndX(RightTable.getLayoutX())
    Line.setEndY(event.getSceneY())
    see screen shot at http://www.pixhost.org/show/1991/11613025_arrow.png
    Now what i want to achieve is when i scroll any table then related lines should automatically move according to their link. [http://www.pixhost.org/show/1991/11613025_arrow.png]

    Hello,
    i have two tableview controls in one group say LeftTable and Righttable. Now i want to achieve functionality as below.
    every time Line should draw from where user drag mouse on any row of Lefttable and drop it on any RightTable.
    i was not able to get selected cell co-ordinate but i have achieve this functionality manually by calculating StartX, StartY, EndX and EndY of line as below
    Line.setStartX(LeftTable.getLayoutX()+LeftTable.getWidth())
    Line.setStartY(event.getSceneY())
    Line.setEndX(RightTable.getLayoutX())
    Line.setEndY(event.getSceneY())
    see screen shot at http://www.pixhost.org/show/1991/11613025_arrow.png
    Now what i want to achieve is when i scroll any table then related lines should automatically move according to their link. [http://www.pixhost.org/show/1991/11613025_arrow.png]

  • Help with creating a custom table cell editor?

    hi, i was reading up on various tutorials and trying to write codes that pops up a simple calendar when clicked on text of the Date class in a table, so far, i can't seem to get my classes working.. the following is some classes i've written for this task (note, there are alot of commented out lines, those are the modifications done to the tutorial classes in http://java.sun.com/docs/books/tutorial/)
    any help would be appreciated :D
    thanks in advance!
    What i have done so far:
    /** BASIC TABLE CLASS FOR DEMONSTRATION*/
    //import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    public class TableBasic extends JFrame
         public TableBasic()
              String[] columnNames = { "Date", "String", "Integer", "Boolean" };
              Object[][] data =
                   {  { new Date(), "A", new Integer(1), Boolean.TRUE },
                        {new Date(), "B", new Integer(2), Boolean.FALSE },
                        {new Date(), "C", new Integer(9), Boolean.TRUE },
                        {new Date(), "D", new Integer(4), Boolean.FALSE}
              JTable table = new JTable(data, columnNames)
                   //Returning the Class of each column will allow different
                   //renderers to be used based on Class
                   public Class getColumnClass(int column)
                        return getValueAt(0, column).getClass();
              table.setDefaultRenderer(Date.class, new CalendarRenderer(true));
              table.setDefaultEditor(Date.class, new CalendarEditor());
              table.setPreferredScrollableViewportSize(table.getPreferredSize());
              JScrollPane scrollPane = new JScrollPane(table);
              getContentPane().add(scrollPane);
         public static void main(String[] args)
              TableBasic frame = new TableBasic();
              frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
              frame.pack();
              //frame.setLocationRelativeTo(null);
              frame.setVisible(true);
    * CLASS BASED ON ColorRenderer.java at http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/ColorRenderer.java
    import javax.swing.BorderFactory;
    import javax.swing.JLabel;
    import javax.swing.JTable;
    import javax.swing.border.Border;
    import javax.swing.table.TableCellRenderer;
    //import java.awt.Color;
    import java.awt.Component;
    public class CalendarRenderer
         extends JLabel
         implements TableCellRenderer
         Border unselectedBorder = null;
         Border selectedBorder = null;
         boolean isBordered = true;
         public CalendarRenderer(boolean isBordered)
              this.isBordered = isBordered; setOpaque(true);
              //MUST do this for background to show up.
         public Component getTableCellRendererComponent(JTable table,
                                                                     Object color,
                                                                     boolean isSelected,
                                                                     boolean hasFocus,
                                                                     int row,
                                                                     int column)
              String newDate = (String)color;
              setText(newDate);
              if (isBordered)
                   if (isSelected)
                        if (selectedBorder == null)
                             selectedBorder = BorderFactory.createMatteBorder(2,5,2,5, table.getSelectionBackground());
                        setBorder(selectedBorder);
                   else
                        if (unselectedBorder == null)
                             unselectedBorder = BorderFactory.createMatteBorder(2,5,2,5, table.getBackground());
                        setBorder(unselectedBorder);
              //setToolTipText("RGB value: " + newColor.getRed() + ", " + newColor.getGreen() + ", " + newColor.getBlue());
              return this;
    * the editor based on ColorEditor.java at http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/ColorEditor.java
    import javax.swing.AbstractCellEditor;
    import javax.swing.table.TableCellEditor;
    import javax.swing.JButton;
    import javax.swing.JColorChooser;
    import javax.swing.JDialog;
    import javax.swing.JTable;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    public class ColorEditor
         extends AbstractCellEditor
         implements TableCellEditor, ActionListener
         Color currentColor;
         JButton button;
         JColorChooser colorChooser;
         JDialog dialog;
         protected static final String EDIT = "edit";
         public ColorEditor()
              //Set up the editor (from the table's point of view),
              //which is a button.
              //This button brings up the color chooser dialog,
              //which is the editor from the user's point of view.
              button = new JButton();
              button.setActionCommand(EDIT);
              button.addActionListener(this);
              button.setBorderPainted(false);
              //Set up the dialog that the button brings up.
              colorChooser = new JColorChooser();
              dialog = JColorChooser.createDialog(button,
                   "Pick a Color",
                   true, //modal
                   colorChooser,
                   this, //OK button handler
                   null); //no CANCEL button handler
          * Handles events from the editor button and from
          * the dialog's OK button.
         public void actionPerformed(ActionEvent e)
              if (EDIT.equals(e.getActionCommand()))
                   //The user has clicked the cell, so
                   //bring up the dialog.
                   button.setBackground(currentColor);
                   colorChooser.setColor(currentColor);
                   dialog.setVisible(true); //Make the renderer reappear.
                   fireEditingStopped();
              else
                   //User pressed dialog's "OK" button.
                   currentColor = colorChooser.getColor();
         //Implement the one CellEditor method that AbstractCellEditor doesn't.
         public Object getCellEditorValue()
              return currentColor;
         //Implement the one method defined by TableCellEditor.
         public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
              currentColor = (Color)value; return button;
    /** THE SIMPLE CALENDAR WRITTEN TALIORED TO WORK WITH DIALOGS*/
    import javax.swing.*;
    import java.util.Calendar;
    import java.awt.*;
    import java.awt.event.*;
    import java.text.SimpleDateFormat;
    //import java.beans.*; //property change stuff
    public class CalendarDialog
         extends JDialog
         //implements PropertyChangeListener
         private JButton[] btn = new JButton[49];
         private int month = Calendar.getInstance().get(Calendar.MONTH);
         private int year = Calendar.getInstance().get(Calendar.YEAR);
         private JLabel lbl = new JLabel("", JLabel.CENTER);
         private JOptionPane optionPane;
         private String curDate = null;
         private JTextArea output = new JTextArea(curDate, 1, 20);
         private String btnString1 = "Enter";
         private String btnString2 = "Cancel";
         public CalendarDialog()
              //super(aFrame, true);
              setContentPane(buildGUI());
              setDates();
         public JPanel buildGUI()
              JPanel panel = new JPanel();
              String[] header = { "Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat" };
              JPanel midPanel = new JPanel(new GridLayout(7, 7));
              for (int x = 0; x < btn.length; x++)
                   final int selection = x;
                   btn[x] = new JButton();
                   btn[x].setFocusPainted(false);
                   if (x < 7)
                        JLabel lbl = new JLabel(header[x], JLabel.CENTER);
                        lbl.setFont(new Font("Lucida", Font.PLAIN, 10));
                        midPanel.add(lbl);
                   else
                        btn[x].addActionListener(new ActionListener()
                             public void actionPerformed(ActionEvent ae)
                                  displayDatePicked(btn[selection].getActionCommand());
                        midPanel.add(btn[x]);
              JPanel lowPanel = new JPanel(new GridLayout(1, 3));
              JButton prevBtn = new JButton("<< Previous");
              prevBtn.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        month--;
                        setDates();
              lowPanel.add(prevBtn);
              lowPanel.add(lbl);
              lowPanel.add(output);
              JButton nextBtn = new JButton("Next >>");
              nextBtn.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        month++;
                        setDates();
              lowPanel.add(nextBtn);
              JPanel outputPanel = new JPanel();
              Object[] options = { btnString1, btnString2 };
              optionPane =
                   new JOptionPane(
                        output,
                        JOptionPane.QUESTION_MESSAGE,
                        JOptionPane.YES_NO_OPTION,
                        null,
                        options,
                        options[0]);
              outputPanel.add(optionPane);
              panel.setLayout(new BorderLayout());
              panel.add(lowPanel, BorderLayout.NORTH);
              panel.add(midPanel, BorderLayout.CENTER);
              panel.add(outputPanel, BorderLayout.SOUTH);
              return panel;
         public void setDates()
              for (int x = 7; x < btn.length; x++)
                   btn[x].setText("");
              SimpleDateFormat sdf = new SimpleDateFormat("MMMM yyyy");
              Calendar cal = Calendar.getInstance();
              cal.set(year, month, 1);
              int dayOfWeek = cal.get(java.util.Calendar.DAY_OF_WEEK);
              int daysInMonth = cal.getActualMaximum(java.util.Calendar.DAY_OF_MONTH);
              for (int x = 6 + dayOfWeek, day = 1; day <= daysInMonth; x++, day++)
                   btn[x].setText("" + day);
              lbl.setText(sdf.format(cal.getTime()));
         public void displayDatePicked(String day)
              if (day.equals("") == false)
                   SimpleDateFormat sdf = new SimpleDateFormat("EEEE d MMMM, yyyy");
                   Calendar cal = Calendar.getInstance();
                   cal.set(year, month, Integer.parseInt(day));
                   curDate = sdf.format(cal.getTime());
                   //JOptionPane.showMessageDialog(this, "You picked " + sdf.format(cal.getTime()));
                   output.setText(sdf.format(cal.getTime()));
         public String getDate()
              return curDate;
         public void setDate(String date)
              curDate = date;
    }

    well, i have indeed narrowed down my problem after some digging around.. one thing i discovered that i don't need CalendarRenderer.java.. and i found out i don't really know what does
    //Implement the one method defined by TableCellEditor.
         public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
              curDate = (String)value; return button;
         }do, as it seems to be the problem:
    java.lang.ClassCastException
         at CalendarEditor.getTableCellEditorComponent(CalendarEditor.java:78)
         at javax.swing.JTable.prepareEditor(JTable.java:3786)
         at javax.swing.JTable.editCellAt(JTable.java:2531)
         at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.adjustFocusAndSelection(BasicTableUI.java:510)
         at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.mousePressed(BasicTableUI.java:494)
         at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:222)
         at java.awt.Component.processMouseEvent(Component.java:5097)
         at java.awt.Component.processEvent(Component.java:4897)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3195)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
         at java.awt.Container.dispatchEventImpl(Container.java:1613)
         at java.awt.Window.dispatchEventImpl(Window.java:1606)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    mmm.. does anyone know what i should modify for that to work?

  • Horizontal Scroll in TableView cell

    Hi,
    I'm creating an app where I will be displaying data in a tableview. I need to be able to show a variable amount of data which is stored in a mutable array (I was thinking in the forms of labels) and have it all in one cell. The table itself also needs to scroll vertically. I currently am loading the cells from a nib file but I can change that if need be. Any suggestions on how to implement some kind of horizontal scrolling or how to display the data would be really appreciated.
    Thanks,
    Erin

    Hey Erin - Thanks for posting your solution!! Do you think you could help with this thread: [http://discussions.apple.com/thread.jspa?threadID=2127252&tstart=0]?
    \- Ray

  • Tableview Cell - setting the font and background colors

    Hi,
    I am developing a BSP with a Tableview. The user asked me about displaying a row with a diferent color (font or background) when some data changes on this table.
    I am thinking about using a Tableview Iterator to evaluate the content of a cell... but I dont know if I can change the look and feel of the row on where this cell is.
    Has someone dealed with this? Can you tell me how?
    thanks
    Ariel

    Actually this is the whole purpose of the Iterator.
    I would suggest you take a look at the SBSEXT_HTMLB and SBSEXT_TABLE BSP Application as well as the following weblogs.
    /people/thomas.jung3/blog/2004/09/15/bsp-150-a-developer146s-journal-part-xi--table-view-iterators
    /people/sap.user72/blog/2004/09/07/bsp-howto-exploring-bsp-development-and-the-miniwas-620
    /people/sap.user72/blog/2004/08/27/bsp-howto-tableview-iterator--column-header-graphics
    /people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator
    In those examples you'll see how easy it is to alter the content of the current cell or a cell with a specific value and output anything from graphics to input fields or dropdown boxes or even just change the text, color and styles of the content.

  • How to get TableView cell values

    Hi All,
    I'm new to PDK.
    I have a TableView which set to Single Selection (the table has a column of radio buttons).
    When the user selects a row I want to get the cells' values of the row from the client side.
    I can get the row's number by using the following code:
    tvModel.setOnClientRowSelection("generateNumber(htmlbevent)");
    function generateNumber(myEvent) {
    alert(myEvent.obj.clickedRow.toString());
    Is there a function like getValueAt(row,col)?
    How can I solve this?
    Thanks,
    Omri

    Hi
    There is a function getValueAt(row,col) to get a value at particular row and column.
    Please go through the followin forum thread which is related to your problem:
    Using OnCellClick with TableView to get cell value
    Hope this helps you.
    Regards
    Victoria

Maybe you are looking for

  • HT4356 Pages printed from Notes to air printer have very large font and no margins

    How can i reduce the size of the print when printing from Ipad "Notes" to an air printer.  I can only find a way to increase the font but not decrease it.  Also how can I adjust the margins

  • Acces denied when installing windows 8.1 adk on windows 7

    I am trying to install the windows 8.1 adk on my windows 7 workstation but when i run the setup it keeps giving me access denied error. I am running as administrator and I cannt see the setup.log. when i click on it nothing happens

  • Word to PDF export - seeing dots within underlines

    When I export our Company financial statements from Word to PDF, dots are appearing on the PDF in all instances where there are double underlines within the document. The weird thing is these dots do not appear on a prinout of the PDF, nor when I mag

  • Regarding the summarization in infocube

    Hi Gurus, I loaded the data from r/3 into ods with key fields(fiscyear,companycode,document number,sixfigure lineitem ledger and ledger in general ledger) and data fields(four amount fields).But when i moved into cube,i need only fiscyear,company cod

  • Import to iPhoto results in empty Album

    I am trying to follow the instructions on a "MacBreak" video to build a workflow that downloads the linked URL photos off a web thumbnail page. I have compared it to what the video shows and it is identical: 1. Get Current page from Safari 2. Get Ima