Thank you, Bill and Jeff,
Sorry I didn't include relevant code in my first post.
Here is the relevant code.


Code in J2:(with checkbox)
----------------------------------------------------------------------
<html:form action="/PrepareEditMessage?reply=no"
           onsubmit="return
validateSearchResultForm(this);">


<table border="0" width="100%">

  <tr>
        <td><html:checkbox property="sAll" value="true"
title="Select all" onclick="for( i=0 ;
i<this.form.elements.length;
i++){if(this.form.elements[i].name=='stringMultibox'){this.form.elements[i].checked=this.checked;}}"/></td>
(with other tds)
  </tr>
  <c:forEach var="person" begin="0"
items="${sessionScope.searchResult}">
    <tr>
        <td><html:multibox  property="sMultibox"
value="${person.userID}" /></td> (with other tds)
    </tr>

  </c:forEach>
 
----------------------------------------------------------------------------
  
  
 code in strut-config.xml:

--------------------------------------------------------------------------------

  
       <action    path="/StartSearching"
                  type="javaClasses.SearchAction"
                  name="SearchForm"
                 scope="request"
                 input="search">
                <forward name="success"             
path="/DisplaySearchResult.do"/>
       </action>

       <!--Show search result-->
        <action path="/DisplaySearchResult"
                type="javaClasses.DisplaySearchResultAction"
                name="SearchResultForm"
                scope="request"
                validate="false">
                <forward name="success"             
path="/searchresult.jsp"/>
        </action>
        
---------------------------------------------------------------------------------------

code of form bean:

---------------------------------------------------------------------------------------
        
        public final class SearchResultForm extends
ValidatorForm  {




        private String sMultibox[]= new String[0];
        private boolean sAll=false;




       public String[] getSMultibox(){
          return this.sMultibox;
       }

       public void setSMultibox(String[]
stringMultibox){
          this.sMultibox=sMultibox;
       }

       public boolean getSAll(){
          return this.sAll;
       }

       public void setSAll(boolean sAll){
          this.sAll=sAll;
       }

    public void reset(ActionMapping mapping,
HttpServletRequest request) {

        this.sMultibox=new String[0];
        this.sAll=false;
    }

    public ActionErrors validate(ActionMapping
mapping,
                                 HttpServletRequest
request) {

       
        ActionErrors errors = super.validate(mapping,
request);

        return errors;

    }
}

-----------------------------------------------------------------------------------------------


--- Jeff Beal <[EMAIL PROTECTED]> wrote:

> What's the code in J2 that you use to put the
> checkbox?  Are you using 
> an <html:form/> tag?  If so, does that tag refer to
> yet another action, 
> A3?  If so, which form bean is associated with A3?
> 
> -- Jeff
> 
> t t wrote:
> > Hi, all,
> >  
> > I have JSP file J1 with form F1 inside. It is used
> to
> > accept user's input. And I will display the result
> in
> > JSP file J2 with form F2. And there are a checkbox
> > and multibox in F2.
> > 
> > At first, I didn't associate F2 form bean with
> Action A1 which
> > is triggered in F1. I just associated F1 form bean
> with A1, and
> > forward the result to J2. But the server
> complained
> > that there is no getter method for the checkbox. 
> > So I created another action A2 (to which A1
> forwards), and associate F2  form bean with
> > it, and I use System.out.println to print out the
> > result of the getter method for the checkbox. And
> I
> > did get the result. That means F2 form bean had
> been associated
> > with A2, and the getter method is there, but the
> > server still complains the same problem.
> >  
> > Any help will be appreciated!
> > Tong
> >  
> > 
> > 
> >             
> > ---------------------------------
> > Do you Yahoo!?
> > vote.yahoo.com - Register online to vote today!
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



                
__________________________________
Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now. 
http://messenger.yahoo.com

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

Reply via email to