Hello community, 

I have a small (I hope) problem. I am using an AjaxEventBehaviour('onclick')
and would like to tell my onEvent method additional information, however, I
don't have a request, like I do with an abstractajaxbehaviour. However an
abstractajaxbehaviour doesn't have an 'onclick' as far as I can tell.

public class ClickAjax extends AjaxEventBehavior {

    public ClickAjax (String action) {
        super(action);
    }

    @Override
    protected void onEvent(AjaxRequestTarget target) {
        //where do i see the parameter?
    }

    @Override
    protected CharSequence getEventHandler() {
        CharSequence callbackUrl= getCallbackUrl();
        StringBuilder javaScript = new StringBuilder();
       
javaScript.append("resetableElementsObject.resetActiveElements();\n");
        javaScript.append("var _contextMenu = new contextMenu();\n");
        javaScript.append("_contextMenu.addMenuItem('Option1', function() {
wicketAjaxGet('" + callbackUrl + "&Parameter=false') });\n");
        javaScript.append("_contextMenu.addMenuItem('Option2', function()
{'" + callbackUrl + "&Parameter=true'});\n");
        javaScript.append("_contextMenu.show();\n");
        return javaScript;
    }
}

I get to the onEvent method when I choose an option in my menu, but I can't
access the parameter, because of the missing request. Is there an accepted
way to do this?

Thanks in advance,

Tom
-- 
View this message in context: 
http://www.nabble.com/AjaxEventBehaviour-with-request-parameters--tp19178005p19178005.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to