I don't see why validating cell editor contents should be any different
from other validators when you want to include server requests. It is
clear that any kind of asynchronous validation is problematic when
validation is seen as inherently synchronous.

I don't think that synchronous server requests are such a bad idea in
your case, depending of course on server availability. The other idea
would be to implement a "pending" validation where your validation
function triggers an asynchronous request, and then sets the cell into
some kind of "pending" state (not-editable, some background color, ...).
The pending state will then be removed by the asynchronous callback when
the server response has arrived, and either turned into a "valid" or
"invalid" state. Shouldn't be too hard.

Maybe Derrell can comment better on this.

T.

On 10/29/2010 04:07 PM, benco wrote:
> 
> Hi,
> 
> I'm trying to affect a validation function to a specific cell editor of a
> table but the problem is that I must do a remote request to a server to get
> the answer and so validate my result (ex: unique value).
> 
> It seems that the current implementation of the celleditors (and by
> extension the scroller class) don't allow such kind of validations. A quick
> fix could be for instance to create a synchronous request but it's not a
> really nice solution... The other solution would be to modify the
> flushEditor() method of the scroller class and all my celleditors'
> getCellEditorValue() methods but it requires much more work...
> 
> Any other idea so far ?
> 
> Best,
> 
> BenoƮt.
> 
>  

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to