Gerald Müllan schrieb:
> Hi Werner,
> 
>> As I said, I am fairly new to dojo as well, my knowledge grows with its
>> usage every day. So I cannot give precise answers currently ;-).
>> But something is there, it does not seem to be ajax, but definitely
>> input validation ;-)
> 
> Yes, definitely. Really nice examples, but it seems to be only client
> side validation without ajax.
> 
> Going to the server to validate the input, like it is in the inputAjax
> component, let us do many things in a quite easy manner.
> 

Actually to my knowledge dojo does not have anything in this regard, and
I cannot see how, because this is heavy jsf specific in how to do
things, but it is possible to do it anyway, and dojo can help in certain
areas. First the whole ajax calling structure can be simplified and made
protocol agnostic:

dojo.io.bind({
    url: "http://foo.bar.com/sampleData.js";,
    load: function(type, evaldObj){ /* do something */ },
    mimetype: "text/plain", // get plain text, don't eval()
    transport: "XMLHTTPTransport"
});

theoretically you can get away with that one:

dojo.io.bind({
    url: "http://foo.bar.com/sampleData.txt";,
    load: function(type, data, evt){ /*do something w/ the data */ },
    mimetype: "text/plain"
});

thats all and you have an ajax request with a defined callback and error
handler and a defined transport (you can leave that one free and dojo
takes care of that), mo messing around with return states anymore, in
the future you probably can move the transport from xmlhttp to iframe
and other callback structures within a switch etc...

You also can move the returned content from xml, to html and to json and
dojo can take care of some aspects of dealing with it.

But no, as far as I have an overlook of the framework no dedicated
server side ajaxed validation yet, but I will ask the devs the next days
(I maybe have missed it)





Reply via email to