Hello,
I've just installed Struts 2.1.6, and I'm converting a form to use Ajax
validation. It's mostly working nicely, except that the input fields
and errors don't clear after a submission. (Ideally, errors should
always clear, and input fields should clear if validation succeeds.)
The errors show up properly; they just don't go away when the user tries
submitting again.
Is there some parameter I haven't found that will make this work, or do
I need to set things up differently? Everything else works so smoothly,
I hope maybe I'm just missing something small... relevant snippets of
code below.
Thanks,
Chris
[researchers.jsp]
<head>
<sx:head/>
</head>
<!-- This is the form that gets validated -->
<s:form action="addResearcher">
<table>
<s:textfield name="name" label="Name" />
<s:textfield name="email" label="E-mail" />
</table>
<sx:submit value="Add researcher" align="left" validate="true"
ajaxAfterValidation="true" targets="researcherlist" id="add_submit" />
</s:form>
<!-- Produce a table with the current list of researchers -->
<s:url id="researcherTableURL" action="researcherTable" />
<sx:div href="%{#researcherTableURL}" id="researcherlist" preload="true"
loadingText="Loading researchers...">
</sx:div>
[struts.xml]
<action name="addResearcher" class="mypackage.ResearcherTable"
method="addResearcher">
<result>/jsp/ajax/researcherTable.jsp</result>
<interceptor-ref name="jsonValidationWorkflowStack"/>
</action>
<action name="researcherTable" class="mypackage.ResearcherTable">
<result>/jsp/ajax/researcherTable.jsp</result>
</action>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org