I am just working on a view where I want to manage field (tabl-cell)
data entry on a cell by cell clickable basis and was looking for a way
to manage the events without creating a large number of observers and
not adding onclick events to every td cell. In fact I was thinking it
would be nice to be able to alter the action of the event depending
on circumstances. eg. handle a click event differently depending on
whether a cell is already open for editing. I was thinking it should
is open for edit by the fact that it now contains a text box. eg. if
text box class edit exists then make a different remote call,
returning the value of the txt box. If it is not open then make a
call to open a text box in the element clicked.
which to be honest I had not looked into before. It is very appealing
and seems to fit what I am trying to do very well.
I have looked at Low Pro and other sources, but most examples relate
to handling page effects etc. I wondered if you guys might know of a
tutorial or perhaps offer a bit of sample code that would help me
piece it together.
From what I have read so far, it seems to me that an approach might be
to detect the click at the table level (or by td class), then in the
handler find the element that has been clicked.
Get the id for the element and make a remote call.
If there is already an element open for edit (id the text box exists)
then inlclude the id and value of the element that is open for edit.
Now on the server side, I dont need to remember any state
information. If someone clicks away from the current edit box, then
the remote call will contain all the necessary info to allow the
current edit bo to be replaced by a normal td, and the new edit box to
be opened at the td that has been clicked.
I have done something along these lines by manging it server side, but
things can get out of step, and also clicking away from an active
(editable) element can get out of step. Also, there is the handling
of two events, the onchange or blur of the current box and the onclick
event for the new box.
Just seems to me that managing this client side is far safer and
Thnks for any help