editable table cells

Hi,I am trying to implement the functionality of editing table cells when clicked/doubleclicked on it. Is there any sample code I can refer to? The tutorials contain sample code but with an edit checkbox to make the cells editable. Any help is highly
[299 byte] By [spotineni] at [2007-11-26 8:38:49]
# 1

To make table cells editable, use "Text Field" components instead of "Static Text" in Table Layout window for corresponding columns. Detailed example can be found in this tutorial: http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/ins erts_updates_deletes.html

Specifically, see "Changing the Column Components" section of part 1 of tutorial.

Thanks, Misha

(Creator team)

Mikhail_Matveev at 2007-7-6 22:13:10 > top of Java-index,Development Tools,Java Tools...
# 2
Hi, Thanks for the reply. But I am trying to make the cells editable(textboxes and dropdown lists) only after clicking/double clicking them. It should display static text otherwise. Any sample code I can refer to. Please help.Thanks,S
spotineni at 2007-7-6 22:13:10 > top of Java-index,Development Tools,Java Tools...
# 3
Hi,This seems to be slightly strange functionality for me. Well, I see following way: you can use text field components with disabled=true flag. When it's clicked (JavaScript onClick event), enable it using JavaScript.Thanks, Misha(Creator team)
Mikhail_Matveev at 2007-7-6 22:13:10 > top of Java-index,Development Tools,Java Tools...
# 4

> Hi,

> Thanks for the reply. But I am trying to make the

> cells editable(textboxes and dropdown lists) only

> after clicking/double clicking them. It should

> display static text otherwise. Any sample code I can

> refer to.

One thing to keep in (which you might already know) is that, unlike desktop applications, web pages are synchronous. That is, the code in the page bean does not get called until after you submit the page.

If you want any asynchronous interaction on the web page, you have to do it using JavaScript (or AJAX). What you want to do is modify the onClick property or onDblClick property of the text field to enable/disable or set readonly.

I do not myself know how to do that, as I don't know much about JavaScript. I am afraid I can't even recommend a JavaScript site to get code from. I do know there are lots out there.

jetsons at 2007-7-6 22:13:10 > top of Java-index,Development Tools,Java Tools...