Ciao Jeremy!
Good to hear from you again...
On 11/25/06, Jeremy Quinn <[EMAIL PROTECTED]> wrote:
Ciao Gabriele
<snip/>
Your problem lies here, I think :
src/blocks/forms/java/org/apache/cocoon/forms/resources
/js/common.js
in cocoon.forms.buildQueryString line: 109 :
if (input.type == "submit" || input.type == "image" ||
input.type == "button") {
// Skip buttons
continue;
}
Your image-type input is not added to the query string.
Not implemented indeed.
Guess that doing it can be a wise thing anyway, to conform to W3C specs [1],
apart from the fact that I like maps every day more, and it may be useful
for giving cocoon a simple map support.
You could patch this function to output what you need.
Yep, that's exactly the kind of snippet I was looking for ;-)
Alternatively it is possible call cocoon.forms.CFormsForm.submit
(name, params) directly and pass the 'name' of the submitting control
and extra form parameters in 'params' (an associative array).
Probably by now I'll use a quick'n'dirty solution for my project (i.e. pass
the coordinates of the click via the "params" associative array), mainly for
two reasons:
- I'm working on Cocoon 2.1.9 (but on a framework with 2.1.8 forms-styling
xsls)
- I need customer feedback quite urgently :-)
This has changed in 2.1.10-dev, as I re-wrote all of this stuff to
add the ability to send XHR via IframeIO if there are file-type
inputs. I threw the buildQueryString function away and use Dojo's
built-in code for assembling the form.
Ok, then of course the quick'n'dirty solution won't be contributable in the
current trunk, I guess ;-)
HTH
regards Jeremy
PS. Are you sure this will look good though ? If what you are doing
is just re-centering the map on the new coords, I'd be tempted to
write a Dojo WIdget to handle this itself, give you a smooth scroll
to the new centre (everyone is used to Google Maps etc.) rather than
replace the image using BrowserUpdate. (Just my humble opinion ;))
This sounds cool ;-)
I started approaching the dojo/cocoon task recently and particularly this
weekend, so, who knows, I may write (or find ;-) ) a dojo map widget for the
2.1.10 dev. The only concern is that in my case (a WMS/WFS server generating
the map, geoserver) most of the map processing, and actual rendering, is
done (also quite heavily, no tiling) on the server side, and *a singleton*
img url is used as a contract to define the exact image that server must
generate. Writing a dojo widget only for this use case is probably out of my
scope a the moment.
Probably it may be worth to do a generic widget that is configurable with
different services, say gmaps, map24 and a generic opensource map server (
e.g. Geoserver). I'll definitely let you know!
Thanks for all your help
Gab
[1] http://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.1.2.5
-----------------------------------------
Eng. Gabriele Columbro
Consultant at Sourcesense Italy
-----------------------------------------
work: [EMAIL PROTECTED]
private: [EMAIL PROTECTED]
mobile: (0039)3201612846
yahoo: g.columbro
gtalk: [EMAIL PROTECTED]
AIM: gabrielecolumbro
-----------------------------------------
"Keyboard not found.
Press F1 to continue"
-----------------------------------------