Hello Itay,

It was just an experiment. I have never actually used it. Its been a long time ago too..
If may suggest, please try Firebug Lite to debug it.

Sorry I can't be of more help.

Regards,
    Erik.



itayh wrote:
Hi Erik,

I used your solution and it works great for ff, while ie seem to have
problems with it. Have you run it also in ie?

Thanks,
  Itay



Erik van Oosten wrote:
I just finished an experiment with something like that. Its still ugly
and very static, but here is my code.

In the HTML header the function you can call from Flash:
function(someValue) {
    var inputEl = document.getElementById('anchor8');
    inputEl.value = someValue;
    eval(inputEl.getAttribute('onclick'));
}

Somewhere in the page:
<form wicket:id="ajaxForm" style="display: none;"><input
wicket:id="myField" type="hidden" value=""/></form>

Note that 'anchor8', the Wicket generated id of the input element, still
needs te be made dynamic. Not sure how yet.


The code:
        Form form = new Form("ajaxForm");
        add(form);
        final HiddenField myField = new HiddenField("myField", new
Model(), String.class);
        form.add(myField);
        myField.add(new AjaxFormSubmitBehavior("onclick") {
            @Override
            protected void onError(AjaxRequestTarget target) {
                throw new RuntimeException("foutje");  // not sure what
to do here
            }

            @Override
            protected void onSubmit(AjaxRequestTarget target) {
                String myValue = (String) myField.getConvertedInput();
                processAjaxRequest(target, myValue);
            }
        });

Improvements are very welcome.

Regards,
    Erik.





--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to