You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by quinquin2209 <qu...@yahoo.com.hk> on 2008/01/18 10:54:13 UTC

Problem with loading form control when actionError return

Hi All,

In my web page main.jsp, I have a form defined, which contains a select box
and a list of checkbox. The page works as follow:
1. user checks on the box to select member to be deleted
2. user presses the submit button
3. Member is deleted from DB
4. Return SUCCESS with actionMessage if member can be deleted successfully
5. Return ERROR with actionError if member cannot be deleted
6. main.jsp will be reloaded with the actionMessage/actionError displayed.
The form should be shown for user to further select member to delete

The page works fine if SUCESS returns. But if ERROR occurs, all controls
within the form cannot be loaded. I check the generated source code with
Firefox, it is found that:

For success case:

<form id="deleteMember" name="msgForm" onsubmit="return true;"
action="/app/main/deleteMember.action" method="post">	
				
     <div id="docType_select">
     Doc Type: 
    <select name="currentDocType" id="currentDocType"
onchange="javascript:ajaxFunction()">
        <option value="ALL">ALL</option>
        <option value="PO" selected="selected">PO</option>
    </select>
    ......
</form>

For error case:

<form id="sendExportMessages" name="msgForm" onsubmit="return true;"
action="/jericho/main/sendExportMessages.action" method="post"></form>

Why all form control is missing when error occur? Any one have idea with it?
-- 
View this message in context: http://www.nabble.com/Problem-with-loading-form-control-when-actionError-return-tp14948046p14948046.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problem with loading form control when actionError return

Posted by Laurie Harper <la...@holoweb.net>.
quinquin2209 wrote:
> Hi All,
> 
> In my web page main.jsp, I have a form defined, which contains a select box
> and a list of checkbox. The page works as follow:
> 1. user checks on the box to select member to be deleted
> 2. user presses the submit button
> 3. Member is deleted from DB
> 4. Return SUCCESS with actionMessage if member can be deleted successfully
> 5. Return ERROR with actionError if member cannot be deleted
> 6. main.jsp will be reloaded with the actionMessage/actionError displayed.
> The form should be shown for user to further select member to delete
> 
> The page works fine if SUCESS returns. But if ERROR occurs, all controls
> within the form cannot be loaded. I check the generated source code with
> Firefox, it is found that:
> 
> For success case:
> 
> <form id="deleteMember" name="msgForm" onsubmit="return true;"
> action="/app/main/deleteMember.action" method="post">	
> 				
>      <div id="docType_select">
>      Doc Type: 
>     <select name="currentDocType" id="currentDocType"
> onchange="javascript:ajaxFunction()">
>         <option value="ALL">ALL</option>
>         <option value="PO" selected="selected">PO</option>
>     </select>
>     ......
> </form>
> 
> For error case:
> 
> <form id="sendExportMessages" name="msgForm" onsubmit="return true;"
> action="/jericho/main/sendExportMessages.action" method="post"></form>
> 
> Why all form control is missing when error occur? Any one have idea with it?

Since the form tags differ, I would guess that you have SUCCESS and 
ERROR mapped to different pages. What does your action configuration 
look like?

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org