Hi Wolfgang

Currently there is no such API on ULCTable. You need to write a simple extension
for this. The following snippet shows how implement such an extension (there is
no need to have a client-side extension):

  public class MyULCTable extends ULCTable {
    public void editCellAt(int row, int column) {
      invokeUI("editCellAt", new Object[]{
               new Integer(row), new Integer(column)});
    }
  }

Please note two things, however:

a) Calling editCellAt() before the widget has been uploaded has no effect.

b) Lazy loading might interfere with this "editCellAt". If the value of the cell
or the editor component has not yet been loaded, the "editCellAt" call will be
ignored for this cell. If you encounter this problem, you will to need to first
scroll to the cell and - in a second rountrip to the server - call editCellAt().
This will ensure that the data/editor is loaded. You can use a ULCPollingTimer
to achieve this behaviour:

  fTable.scrollCellToVisible(row, column);

  ULCPollingTimer timer = new ULCPollingTimer(0, new IActionListener() {
    public void actionPerformed(ActionEvent event) {
      fTable.editCellAt(row, column);
      fTable.requestFocus();
    }
  });
  timer.setRepeats(false);
  timer.start();

The code inside the actionPerformed is executed in a second roundtrip.

I hope this helps.

Cheers
Rolf

**************************************
Rolf Pfenninger
Canoo Engineering AG
Kirschgartenstrasse 7
CH-4051 Basel
Tel +41 61 228 9444
Fax +41 61 228 9449
mailto:[EMAIL PROTECTED]
http://www.canoo.com

ULC - Rich Clients for J2EE
http://www.canoo.com/ulc
**************************************



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Wolfgang Haid
Sent: Mittwoch, 20. Dezember 2006 16:35
To: [EMAIL PROTECTED]
Subject: [ULC-developer] editCellAt() for ULCTable


Hello,

we are trying to set a specific cell of an ULCTable in edit mode so that the
editor of the cell is visible.
The behaviour should be the same as with the metod JTable.editCellAt().

How can we achieve this in ULC ?

Kind regards,
Wolfgang Haid

--

Würth Phoenix S.r.l.
Wolfgang Haid
Manager Product Development (CIS)
Via Kravogl 4
I-39100 Bolzano

Direct:   +39 0471 564063
Fax:      +39 0471 564122
Mobile:   +39 335 38 07 35
E-Mail:   [EMAIL PROTECTED]
Website:  www.wuerth-phoenix.com

_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to