Question

I've got an s:form with sj:submit and s:submit inside, sj:submit works properly but s:submit buttons doesn't works. Nothing happens when I click on s:submit buttons.

I tried to use sj:submit button outside the form and linking that to s:form with formIds parameter.

Was it helpful?

Solution 2

I solved using:

<s:submit onClick="overrideSubmit('this_action')"/>

and

function overrideSubmit(actionName) {
        document.forms['configurationForm'].action = actionName + '.action';
        document.forms['configurationForm'].submit();
    }

OTHER TIPS

Problem here is the e.PreventDefault() to prevent a normal submit on press enter inside of an form textfield.

See: http://code.google.com/p/struts2-jquery/source/browse/trunk/struts2-jquery-plugin/src/main/resources/template/js/struts2/jquery.struts2.js#947

What about using an normal Link instead of an button?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top