How to use logic:interate tag in this case? thanks a lot.

a javabean:
a{
int a;
ArrayList bList (to store some strings);
request.setAttribute("a",a);
then how can I use <logic:iterate> tag to loop to use <bean:write> tag to write out the strings contained by bList?

use getparams and get that attribute(arraylist)
define a bean in jsp with property as this attribute for which u should have a getter method in context
the following is to iterate through arralist of arraylist
<logic:iterate id="accList" name="<%=subAppContextName%>" ="accountsHoldedList">
          <tr>
<logic:iterate id="accList2" name="accList">
<td> <bean:write name="accList2"/> </td>
</logic:iterate>
<td>
<jfp:link styleClass="appNavNext" warn="false" bundle="<%=bundleName%>" key="GiveNotice" paramId="selectedAccount" paramName="accList2" href="javascript:submitMyForm();"></jfp:link>
</td>
</tr>
</logic:iterate>
accountsHoldedList is the one which is set in Context and i am iterating to display it.
bye

Similar Messages

  • How to use logic:present tag in struts el tag

    Hi
    I am trying to use struts el tags in the jsp page.I am struggling with the following exception: Cannot find bean: "result" in any scope.I couldn't understand why this error is coming even i had the property "result" in my ActionForm.
    ActionForm:
    package com.finocus.cam.struts.bean;
    import java.util.List;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionMapping;
    import com.finocus.cam.common.ValidateFormat;
    public class DetailsForm extends org.apache.struts.action.ActionForm {
         private final static String LOG_TAG = DetailsForm.class.getName() + ".";
         private static final long serialVersionUID = 1L;
         // VARIABLES DECLARATION
         private String name = null;
         private String searchField = null;
         private String searchCriteria = null;
         private String phonenumber = "";
         private String email = "";
         private List results = null;
         private String adminUserName = "";
         private String adminUserEmail = "";
         public DetailsForm() {
         // GETTER AND SETTER METHODS
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
         public String getSearchCriteria() {
              return searchCriteria;
         public void setSearchCriteria(String searchCriteria) {
              this.searchCriteria = searchCriteria;
         public String getSearchField() {
              return searchField;
         public void setSearchField(String searchField) {
              this.searchField = searchField;
         public String getEmail() {
              return email;
         public void setEmail(String email) {
              this.email = email;
         public List getResults() {
              return results;
         public void setResults(List results) {
              this.results = results;
         public String getPhonenumber() {
              return phonenumber;
         public void setPhonenumber(String phonenumber) {
              this.phonenumber = phonenumber;
         public String getAdminUserEmail() {
              return adminUserEmail;
         public void setAdminUserEmail(String adminUserEmail) {
              this.adminUserEmail = adminUserEmail;
         public String getAdminUserName() {
              return adminUserName;
         public void setAdminUserName(String adminUserName) {
              this.adminUserName = adminUserName;
         // DUMPING THE VALUES IN THE CONSOLE
         public void dumpValues() {
              StringBuffer sb = new StringBuffer();
              sb.append("Name'");
              sb.append(name);
              sb.append("SearchField");
              sb.append(searchField);
              sb.append("searchCriteria");
              sb.append(searchCriteria);
              sb.append("'");
              sb.append(" ");
              System.out.println(sb.toString());
         // RESET() METHOD IS USED FOR STORE FORM'S CURRENT VARIABLES DECLARATION
         public void reset(ActionMapping actionMapping, HttpServletRequest request) {
              System.out.println("reset() method is called");
              this.email = null;
              this.searchCriteria = null;
              this.searchField = null;
              this.results = null;
         // VALIDATE() METHOD IS USED TO VALIDATE THE FORM DATA
         public ActionErrors validate(ActionMapping actionMapping,
                   HttpServletRequest request) {
              ActionErrors errors = new ActionErrors();
              System.out.println("Validate()is called");
              // Determine if name has been entered.
              if (getName() == null || getName().length() == 0
                        || getName().equals(" ")) {
                   errors.add("accountText", new ActionError("searchText.error"));
              } else if ((getSearchField().equals("name") == true)
                        && (ValidateFormat.isValidText(getName()) == false)) {
                   errors.add("validAccountName", new ActionError("validName.error"));
              if (getSearchField() == null || getSearchField().length() == 0) {
                   errors.add("accountSearchField", new ActionError(
                             "searchField.error"));
              } else if ((getSearchField().equals("email") == true)
                        && (ValidateFormat.isValidEmail(getName()) == false)) {
                   errors
                             .add("validAccountEmail", new ActionError(
                                       "validEmail.error"));
              } else if ((getSearchField().equals("phonenumber") == true)
                        && (ValidateFormat.isValidPhoneNoFormat(getName()) == false)) {
                   errors.add("validPhoneFormat", new ActionError(
                             "validPhoneFormat.error"));
              if ((getSearchField().equals("searchallfields"))
                        && ((ValidateFormat.isValidText(getName()) == false)
                                  && (ValidateFormat.isValidEmail(getName()) == false) && (ValidateFormat
                                  .isValidPhoneNoFormat(getName()) == false))) {
                   errors.add("validNameEmail",
                             new ActionError("validNameEmail.error"));
              return errors;
    Action class:
    package com.finocus.cam.struts.action;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import com.finocus.cam.db.CAMDbAccess;
    import com.finocus.cam.struts.bean.DetailsForm;
    public class DetailsAction extends org.apache.struts.action.Action implements
              com.finocus.cam.common.CAMConstants {
         private final static String LOG_TAG = DetailsAction.class.getName() + ".";
         // Global Forwards
         public static final String GLOBAL_FORWARD_search = "login";
         // Local Forwards
         public static final String SUCCESS_search = "success";
         private boolean dumpRequestParams = true;
         public DetailsAction() {
         public ActionForward execute(ActionMapping mapping, ActionForm form,
                   HttpServletRequest request, HttpServletResponse response)
                   throws Exception {
              System.out.println("SearchAccount execute() is called");
              HttpSession session = request.getSession(true);
              ArrayList results = null;
              DetailsForm search = (DetailsForm) form;
              String name = search.getName();
              String searchField = search.getSearchField();
              String searchCriteria = search.getSearchCriteria();
              // Dumping the values of input patameters
              if (dumpRequestParams == true) {
                   request.setAttribute("SearchCriteria", searchCriteria);
                   request.setAttribute("SearchField", searchField);
                   request.setAttribute("Text", name);
                   search.dumpValues();
              // Perform search based on what criteria and search Field was entered.
              CAMDbAccess dbAccess = CAMDbAccess.getInstance();
              if (null != searchCriteria && searchField != null) {
                   System.out.println("Search Criteria =" + searchCriteria
                             + "Selected Option =" + searchField);
                   if (searchCriteria.equals(Search_Account) && searchField != null) {
                        results = dbAccess.searchByAccountInfo(name, searchCriteria,
                                  searchField);
                        System.out.println(" Search criteria :Exact Match was selected.<BR>");
              // Place search results in SearchForm for access by JSP.
              search.setResults(results);
              // Forward control to this Action's input page.
              return mapping.findForward(SUCCESS_search);
    My jsp page:
    <%@ taglib uri="/WEB-INF/tld/struts-bean" prefix="bean" %>
    <%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic-el" %>
    <%@ taglib uri="/WEB-INF/tld/struts-html" prefix="html" %>
    <html:html>
    <head>
    <title>Search Page</title>
    </head>
    <body colorants="LightGreen">
         <table width="100%" bgcolor="LightGreen">
              <tr>
                   <td align="left"><font color="brown"><h3><b>Search Info</b></h3></font><hr></td>
              </tr>
                   <tr>
              <td align="left"><h4><font color="brown"><b>Search Text:</b></font><%=request.getAttribute("Text")%></h4></td>
                   </tr><tr>
              <td align="left"><h4><font color="brown"><b>Search Field:</b></font><%=request.getAttribute("SearchField")%></h4></td>
              </tr><tr>
                   <td align="left"><h4><font color="brown"><b>Search Criteria:</b></font><%=request.getAttribute("SearchCriteria")%></h4></td>
                   </tr><tr>
                   <html:form action="/results.do">
                        <td><center><html:submit value="AllSearchOptions " /></center></td>
                        </html:form>
                   </tr>
              <tr>
                   <td align="left"><font color="brown"><hr><h2><b>Search Results</b></h2></font></td>
              </tr>
              <tr>
              <td>
              <table border="1" cellspacing="1" cellpadding="3" width="70%"
                   bgcolor="white">
                   <logic:present name="searchbyaccount" property="results">
                   Results exists
                        <c:if test="${size==0 }">
                   <center><font color="red"><b>No Results Found</b></font></center>
                   </c:if>
                   <br>
                        <c:if test="${size>0}">
                        Size is greater than ZERO
                             <table border="1" cellspacing="1" cellpadding="3" width="70%"
                                  bgcolor="white">
                                  <tr>
                                      <th>Customerid</th>
                                       <th>First Name</th>
                                       <th>Last Name</th>
                                       <th>Email</th>
                                       <th>phone Number</th>
                                       <th>Details</th>
                                  </tr>
                                       <c:forEach var="result" items="${results}">
                                        <c:out value="${result}"/>
                                       <tr>
                                            <td><bean:write name="result" property="customerid"></bean:write></td>
                                            <td><bean:write name="result"
                                                 property="accountAdminFirstName"></bean:write></td>
                                            <td><bean:write name="result"
                                                 property="accountAdminLastName" /></td>
                                            <td><bean:write name="result" property="accountability" /></td>
                                            <td><bean:write name="result" property="accountAdminPhone" /></td>
                                            <td><html:form action="/accountDetails.do">
                                                      <html:submit value="Details" />
                                            </html:form></td>
                                       </tr>
                                  </c:forEach>
                             </table>
                        </c:if>
              </logic:present>
              </table>
              </td>
              </tr>
         </table>
    </body>
    </html:html> Please refer me where i done a mistake.Thanks in Advance

    hi all,
    I am doing programs in sturts. My program
    My program purpose is to retrieve data from the
    database.My database is MySql. I know that we can
    write connection code in Action Class, it is ok for
    some less prog's if i want to use the sane connection
    code in more Action Classes it is vasting time and
    so.I don't think it's a good idea to put database code in Action classes. (That's one of the biggest drawbacks of Struts - it's completely tied to Actions, HTTP, and the Web.) Better to move that code into plain old Java objects and let the Actions call them.
    You'll be able to test them without the container or Struts, and you'll be able to reuse those objects in other, non-Web contexts.
    So i want to use <data-sources> tag that is available
    in struts-config.xml. I know that thre is tag withThis is the wrong place to configure a connection pool, too. Struts should have nothing to do with it. What if you change Web frameworks to WebWork or Spring? The connection pool should be configured in the container that hosts your app, not Struts.
    this name, but the problem is i don't know how to use
    this tag. If any budy know how to use this please
    tell me the syntax or any example.
    plese... reply soon..Don't do it. Think about doing it in your container, not Struts.
    %

  • How to use Logic DataBase in WDA?

    Hi Experts,
    The LDBs contain: Selection Screen, Authorization check, Data Retrieval, and it is very useful for writing a report within R3 system.
    I am developing some WDA reports, and really need this kind of features too. Is there anyone know how to use LDB in WDA???
    Thanks a lot.
    Best Regards,
    Guo Guo Qing

    Thanks for your reply.
    Could you tell me if there is some standard function module to handle LDB?
    Best Regards,
    Guo Guo Qing

  • Problem in Iterating using logic:iterate tag

    Hi ,
    I am using <logic:iterate> tag to iterate through a list of contents.
    When the List size is 1222, all the Contents in the List are displaying properly.
    When the size execdes 1223, the JSP is not displaying properly.
    I am not getting any exception also.
    I have added try and catch. Still it is not showing any exception.
    When the size is more than 1300, Some contents are not displaying in JSP.
    Can any one provide some inputs, so that I can crack my issue.
    The JSP code :
              <logic:iterate id="someXXXX" property="someXXX" name="someXXX" indexId="count" scope="request">
              <tr>
    <td><html:text name="someXXXX" property="someXXXX"
                             size="50" maxlength="50" onchange="setDirty()" indexed="true"/> </td>               
    <td height="15" align="center"><html:checkbox property="someXXXX" name="someXXXX" indexed="true" onclick="setCheckboxFlag(this)" />               
                   <td width="4"> </td>               
              </tr>
              <html:hidden property="someXXXX" name="someXXXX" indexed="true" />
              </logic:iterate>
    Thanks,
    RamaKrishna

    get the records and store them in a collection. Store the collection in session. take the first 10 records as a subset and pass it to the iterate tag. use the hidden field to keep the last record number in the jsp. So when you first see the jsp the first 10 records will be shown and when user clicks for next records send the hidden field value to the server and take next 10 records as subset and pass it to iterate tag. This is how you can do this. but if you have thousands of records storing them in the session is not recommended. you can pull them directly from the database.

  • Does anyone know if apple's one-to-one program would be a good way to learn how to use logic pro or am I better off going to school to learn audio engineering or something?

    Of course going to school would be a good option, but I want to know if one-to-one is also a good way to learn how to use logic pro. Has anyone been through the one-to-one program for logic pro and can say that they learned how to use logic pro well because of it?

    For sure, one to one training, if given by a tutor who is capable, will hand you the means to build up self-confidence  and will therefore let you operate the hard/software in an intelligent manner, instead of going for the trial and error method which has its pro's and con's too. Once you've passed this beginners phase you will make your own decisions intelligently and then you will also start to get experience and learn even from your mistakes. Something like that in theory and the rest is up to you!
    Have a nice day

  • How to use the Wire-Tag in Cairngorm 3 Observer Library?

    Dear Observer-Lib coders,
    Maybe I am posting my issue into the wrong forum, see this thread:
    http://forums.adobe.com/thread/756046
    I'd like to know how to use the Wire-Tag mentioned in the Observer-Lib docu, see:
    http://sourceforge.net/adobe/cairngorm/wiki/HowToUseCairngormObserver/
    Please let me know if there is anybody who knows how to use
    this Wire-tag. A small code example would be great, too!
    Thank you,
    masu

    Ok ... I solved it!
    see this thread: http://forums.adobe.com/thread/756046

  • How to use h:selectOneRadio tag  inside h:dataTable tag

    Hi All,
    Can any one tell me how to use <h:selectOneRadio> tag inside <h:dataTable> tag and how to get selected radio button value in bean ?

    JSF<h:selectOneMenu value="#{myBean.selectedItem}">
        <f:selectItems value="#{myBean.selectItems}" />
    </h:selectOneMenu>MyBeanprivate String selectedItem;
    public String getSelectedItem() {
        return selectedItem;
    public void setSelectedItem(String selectedItem) {
        this.selectedItem = selectedItem;
    public List getSelectItems() {
        List selectItems = new ArrayList();
        selectItems.add(new SelectItem("key1", "value1"));
        selectItems.add(new SelectItem("key2", "value2"));
        selectItems.add(new SelectItem("key3", "value3"));
        return selectItems;
    }String selectedItem should contain the key (key1, key2 or key3) when selected. The values (value1, value2 and value3) are the options as shown in the list.

  • Why and how we use Logical Database?

    Can anybody explain with example why and how we use logical database?
    Regards,
    Rajan

    Hello,
    SAP comes loaded with all the extras. Among the extras that are most helpful to IT managers are all the access routines needed to pull any business object that managers can think of out of SAP databases. However, SAP has not thought of everything where your particular applications are concerned. SAP organizes its standard database tables to service business units based on conventional business applications. Itu2019s likely your business requires something new, perhaps even something exotic. In that case, you will need to create a new database, using information from different places. Basically, you need a logical database. You need to create a virtual business data object repository consisting of a new kind of record or table that suits your purposes. In addition, the repository should be composed of information that is actually stored in a number of different locations, none of them necessarily logically associated with one another. Letu2019s take a closer look at creating logical databases.
    A case for a logical database
    Suppose my company manufactures widgets of the most obscure variety, and they are components of other widgets. I sell my widgets as raw material for the more sophisticated widgets built by others, but in some cases I actually partner with other manufacturers in creating yet another class of widget. Now, in my world, I consequently have customers who are also partners. I sell to them and I partner with them in manufacturing and distribution. Also, I need an application that uses both of these dual-use relationships.
    Essentially, I have a customer database and a partner database. Neither contains records that are structured to contain the identifying particulars of the other. Thus, I need a hybrid database that gives me tables detailing these hybrid relationships. What can I do? I can go the long way around and write a new database, pulling information from both and creating new objects with a customized program that I write by hand. However, this process is cumbersome and contains maintenance issues. On the other hand, I can use SAPu2019s logical database facility, create my logical database in a couple of minutes, and have no maintenance issues at all.
    Logical database structures
    There are three defining entities in an SAP logical database. You must be clear on all three in order to create and use one.
    u2022     Table structure: Your logical database includes data from specified tables in SAP. There is a hierarchy among these tables defined by their foreign keys (all known to SAP), and you are going to define a customized relationship between select tables. This structure is unique and must be defined and saved.
    u2022     Data selection: You may not want or need every item in the referenced tables that contributes to your customized database. There is a selection screen that permits you to pick and choose.
    u2022     Database access programming: Once youu2019ve defined your logical database, SAP will generate the access subroutines needed to pull the data in the way you want it pulled.
    Creating your own logical database
    ABAP/4 (Advanced Business Application Programming language, version 4) is the language created by SAP for implementation and customization of its R/3 system. ABAP/4 comes loaded with many predefined logical databases that can construct and table just about any conventional business objects you might need in any canned SAP application. However, you can also create your own logical databases to construct any custom objects you care to define, as your application requires in ABAP/4. Hereu2019s a step-by-step guide:
    1.     Call up transaction SLDB (or transaction SE36). The path you want is Tools | ABAP Workbench | Development | Programming Environment | Logical Databases. This screen is called Logical Database Builder.
    2.     Enter an appropriate name in the logical database name field. You have three options on this screen: Create, Display, and Change. Choose Create.
    3.     Youu2019ll be prompted for a short text description of your new logical database. Enter one. Youu2019ll then be prompted to specify a development class.
    4.     Now comes the fun part! You must specify a root node, or a parent table, as the basis of your logical database structure. You can now place subsequent tables under the root table as needed to assemble the data object you want. You can access this tree from this point forward, to add additional tables, by selecting that root node and following the path Edit | Node | Create. Once youu2019ve saved the structure you define in this step, the system will generate the programming necessary to access your logical database. The best part is you donu2019t have to write a single line of code.
    Regards
    Arindam

  • How to use Logical database in function module?

    I will create a function module in HR.
    but how to use Logical database  in function module ?  Logical database PNP always show screen.in function (RFC) code , it is a matter.

    You cannot attach the LDB to the main program of the function group.
    - So you may [SUBMIT|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=submit&adv=false&sortby=cm_rnd_rankvalue] a report which use the LDB and get back the data (export/import), by default in the syntax of SUBMIT the selection-screen will not be displayed
    - Use [LDB_PROCESS|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=ldb_process&cat=sdn_all], fill a structured table for selection, and get data back in another table
    - Use [HR function modules to read Infotypes|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=hrfunctionmodulestoread+Infotypes&adv=false&sortby=cm_rnd_rankvalue].
    Regards

  • How to use the HTML tags in the reports.

    hi.
    can any one tell me how to use the HTML tags in the reports.
    i m using the forms 10 g rel 2 and reports 10 g rel 2 and application server 10g rel 2.

    Set the Contains HTML Tags property of an object to Yes, then the tags in the object's text (if any) will be used to format the object.

  • How to use "url.openStream()" . What this function does?

    how to use "url.openStream()" . What this function does?
    Edited by: sahil1287 on Apr 16, 2009 10:02 PM

    http://java.sun.com/javase/6/docs/api/java/net/URL.html#openStream()
    http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html

  • HOW TO USE LOGICAL AND OR CONDITION TOGETHER

    Please do not post subject in ALL CAPITALS
    Hi All there,
    How to use logical and or condition together
    I wanted to use logical AND OR condition together in where clause of Select Query.
    eg where xyz and or abc
    Regards
    Sagar
    Edited by: Matt on Mar 17, 2009 1:05 PM
    Edited by: Matt on Mar 17, 2009 1:05 PM

    hi,
      You cannot use the logical and  or condition together at the same time in SQL statement. Sachin is correct while using the and and or in the same condition. You can get the data using or condition in SQL statement, and then use the delete statement of internal table using the end condition. please find the following code for the same.
    select *
      from dtab
    where cond1 eq 'A1'
         or cond2 eq 'A2'.
    if sy-subrc eq 0.
      delete itab where cond1 eq 'A1' and 'A2'.
    endif.
    regards,
    Veeresh

  • HT4623 My iPad 2 has no " software update " when I go to settings/general. How can I get iOS 5 in this case ? Thank you.

    My iPad 2 has no " software update " when I go to settings/general. How can I get iOS 5 in this case ? Thank you.
    <E-mail Edited by Host>

    The option to update without the computer (Over the air) was made available with iOS 5. If your iDevice is using a version of iOS lower than 5, you will need to use iTunes on your syncing computer to perform the upgrade. Use the Apple link below as a guide for the upgrade.
    http://support.apple.com/kb/HT4972
    Also read the instructions from the section entitled "Update your device using iTunes" at the link below.
    http://support.apple.com/kb/HT4623

  • How to use the TCP/IP in Java?Thanks!

    How to use the TCP/IP in Java?Thanks!

    Look at the java.net package, more specifically to classes ServerSocket (The server TPC conection) and Socket (the client TCP conection)
    Abraham

  • I want to reset the login password in mac 10.8.4, but i have selected the "allow user to administer this computer" what can i do in this case. thank you

    i want to reset the password on mac 10.8.4m but i have selected the "allow the user to administer this computer" i have make test with utilities and than terminal... but doesn't work.
    what can i do in this case.
    thank you

    You have to boot to the Recovery HD, Command + r at startup, and from there use Terminal in the Utilities menu item and typ in Resetpassword. A dialog box will open where you can do that.

Maybe you are looking for

  • Can someone help "THIS NU-B" please!!!

    Hey everyone,      After putting of task of getting a new phone (my BB8330) I finally got it and have been tinkering with it.  And ran into several issues. . . . but this is the most important one so far!  Here goes:  Never owning such a cool phone a

  • Please help: installing FP 10.3.183.90 on iMac 10.5.8

    Attempting to download Flash Player 10.3.189.90* on an iMac using Leopard (10.5.8); after multiple tries, have gotten to a point at which clicking the Install icon opens a window asking if I want to install (considering this a victory; something is h

  • Windows 8.1 issues

    We have been using WSUS for about a year.  Our version is 3.2.7600.226.  Everything has been working fine until we added some Windows 8.1 clients.  They will download the updates from WSUS, but don't appear to automatically install them.  I've checke

  • Help Reqd in SQL

    Hi Friends, This may be a dumb question but please bear with me I am not a SQL person. I want to pull all records of table A and matched records of table B. Is following syntax correct: SELECT TABLE1.FIELDA TABLE2.FIELDB FROM TABLE1 LEFT JOIN TABLE2

  • 'Country' Field in Address

    Is the field 'country' in Additional information > Address cannot be identified as an individual field? I cannot find 'country' as a field in 'Lead' record type. How can i get the pick list values of 'country' field?