struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff_Casw...@bcbstx.com
Subject Re: How to display vectors / beans data inside JSP using tags?
Date Thu, 30 Dec 2004 17:47:15 GMT




You probably want something like this:

JSP:

<logic:iterate id="col" name="MyForm" property="fooName" indexId="i">

 <tr>
   <td>
    <html:text name="capRunControlForm" size="16" styleClass="inputbox"
               property='<%="fooName[" + i + "]"%>'/>
   </td>

   <td>
    <html:text name="MyForm" size="16" styleClass="inputbox"
               property='<%="minText[" + i + "]"%>'/>
   </td>
   <td>
   <html:text name="MyForm" size="16" styleClass="inputbox"
              property='<%="maxText[" + i + "]"%>'/>
 </td>
 </tr>
</logic:iterate>

FormBean:

public class MyForm extends ValidatorForm{

      private String [] fooName =  {"","","","","",""};
      private String [] barText = {"","","","","",""};
      private String [] bazText = {"","","","","",""};
:
:
}

Hope this helps,

Jeff C.


                                                                                         
                        
                      "Manisha Sathe"                                                    
                        
                      <manisha_msathe@y        To:       user@struts.apache.org       
                           
                      ahoo.com>                cc:                                    
                           
                                               Subject:  How to display vectors / beans data
inside JSP using     
                      12/30/2004 02:56          tags?                                    
                        
                      AM                                                                 
                        
                      Please respond to                                                  
                        
                      "Struts Users                                                      
                        
                      Mailing List"                                                      
                        
                                                                                         
                        




I want to display bean data on JSP which has vectors as one element.







------------------------------------------------------------------------------
**********
The information contained in this communication is confidential, private, proprietary, or
otherwise privileged and is intended only for the use of the addressee.  Unauthorized use,
disclosure, distribution or copying is strictly prohibited and may be unlawful.  If you have
received this communication in error, please notify the sender immediately at (312)653-6000
in Illinois; (972)766-6900 in Texas; or (800)835-8699 in New Mexico.
**********
==============================================================================


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


Mime
View raw message