You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Scott Tavares <st...@cox.net> on 2004/05/20 03:17:08 UTC

ActionForm does not work in InternetExplorer...

... but works in Mozilla.

Hi all,

I posted this in the user list and not get a responce so I'm trying 
here(sorry if this causes a problem).


I'm trying to implement the 'Value List Handler or Page by Page 
Iterator' design pattern in Struts.
I'm hoping to use one Action to do scrollFirst, scrollLast, scrollNext, 
and scrollBack by sending
which direction to 'scroll' in by passing a value into a FormBean based 
on which form image inputtype
was clicked by the user.

here is the source of the form:

<form:form action="/scrollInmateList.do" scope='request'>

   <form:hidden name="security" property="securityId"/>
   <form:hidden name="securityStatus" property="statusCode"/>

   <center>
   <table align='middle' cellpadding='0' cellspacing='0' width='100%'>
       <tr>
           <td abbr='middle' width='100%'>
               <table align='middle' cellpadding='0' cellspacing='2' 
width='80px'>
                   <tr 
align='middle'>                                                                                        

                       <td width='20px' height='20px'>
                           <form:image 
property='securityStatusFormBean.direction' value='first' 
onclick='submit' src="../../../images/VCRBegin.png"/>
                       </td>
                       <td width='20px' height='20px'>
                           <form:image 
property='securityStatusFormBean.direction' value='back' 
onclick='submit' src="../../../images/VCRBack.png"/>
                       </td>
                       <td width='20px' height='20px'>
                           <form:image 
property='securityStatusFormBean.direction' value='forward' 
onclick='submit' src="../../../images/VCRForward.png"/>
                       </td>
                       <td width='20px' height='20px'>
                           <form:image 
property='securityStatusFormBean.direction' value='last' 
onclick='submit' src="../../../images/VCREnd.png"/>
                       
</td>                                                                                        

                   
</tr>                                                                        

               </table>
           </td>
       </tr>
   </table>
   </center>
</form:form>

in struts-config i have this

<form-beans>
    <form-bean      name="securityStatusFormBean"
               
type="gov.us.state.ri.doc.infacts.struts.beans.SecurityStatusFormBean"/>
</form-beans>

<action path="/scrollInmateList"
       
type="gov.us.state.ri.doc.infacts.struts.action.ScrollInmateListAction"
       name="securityStatusFormBean" scope="request" 
input="/ui/tiles/pages/securityDetail.jsp">
                 <forward name="Success"  
path="/ui/tiles/pages/securityDetail.jsp"/>
                      </action>

and the bean 
gov.us.state.ri.doc.infacts.struts.beans.SecurityStatusFormBean has 
three properities: securityId, statusCode and direction

So in the action execute method of the action object I can do this:

String direction = 
request.getParameter("securityStatusFormBean.direction");

and get the value I'm looking for.

This _does_ work in Mozilla but _NOT_
in IE. In IE the 
request.getParameter("securityStatusFormBean.direction"); just returns 
null.

Anyone know why? Have suggestion for a better way of doing this?

TIA,

-ScottTavares-

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