List of Map objects with html:options collection

Hello All,
I'm trying to get an arraylist of map objects to display dynamically as a dropdown select with html:options collection. I've spent hours on this and I haven't been able to get it working. Any ideas as to how this is done?
Thanks,
James

An arraylist of Map objects?
What is it that you want to show up in the dropdown box - all the name value pairs included in all the maps of the list?
Assuming with a Map the "key" is what you want submitted and the "value" is what to display to the user
Definitely sounds like a double loop structure is required. One to loop through all the maps. Another to generate all the options in each map.
This one does it at the basic level of things
<c:forEach var="map" items="${listOfMaps}">
  <c:forEach var="entry" items="${map}">
    <html:option value="${entry.key}">${entry.value}</html:option>
  </c:forEach>
</c:forEach>The following might also work.
<c:forEach var="map" items="${listOfMaps}">
  <html:options collection="map" property="key" labelProperty="value"/>
</c:forEach>Cheers,
evnafets

Similar Messages

  • Map app with bicycle option

    The default map app on my iPhone 4 doesn't seem to offer the same (beta) option for bicycling directions as Google Maps does in a computer browser.
    Is there another map app with the option for bicycling directions?
    Or an ETA for update of the default map app to include the bicycling option?

    Thanks for the quick response but, none of those really address the core issue, so I'll try to be a little more specific in case anyone else has a suggestion.
    As with Google Maps on my desktop computer, I'm looking for an app which will allow me to specify point A and point B on a map, then calculate suggested route and directions from A to B for bicycling. (Not automobile or walking.)
    Don't need gear calculators or speedometers or timers or race results or tracks of where I've been.
    Just looking for an app like Google Maps to calculate and display recommended bicycling route between my selected points.
    It would be really simple if the existing default map app would add "bicycling" to the existing options, just like on my desktop. Far easier to carry an iPhone on my bike!
    Thanks.

  • Memory leaks in C++(OCCI ) for OTT generated C++ mapping objects with Oracl

    Our application is in C++ which interfaces with Oracle 10g database using OCCI. The mapping objects are created using OTT. The type of these mappisng objects in PersistentObject. Our development machine(Solaris 8) and database machine are different. So we have installed the "instantclient-basiclite-solaris6432-10.2.0.3-20070101.zip" to use OTT and OCCI on development machine. We are running purify in our application, Purify is reporting memory leaks on these OTT generated POObjects (type used is transient Objects), despite the fact that we are deleting these objects appropriately. .

    Since OTT generated code uses the STL data structures vector list etc.
    STL are not standard across platforms and hence you can ignore these warnings.

  • List of Authorization Object with Transaction Code

    Dear All ,
        Does SAP provide  any report to list all the Authorization Object ? and which object is belong to which transaction code ?
    Thanks .

    hi olrang ,
    STEP BY STEP TO CREATE AUTHORIZATION OBJECT:
    STEP1:  goto  SU21 transaction and create a new Authorization Object
    Object Name:  Z.....
    Text:  ...........
    ClassL  SD (YOUR MODULE)
    AUTHOR:  YOUR ID
    STEP2:  Give authorizatin fields as
    ACTION - Action of the Authorization
    Activity -  Document Destribution.
    STEP3:  Basis will create a role using transaction  PFCG and assign this authorization object to that role.
    STEP4:  Call the AUTHORITY-CHECK Object in your code.
    AUTHORITY-CHECK OBJECT <authorization object>
    ID <authority field 1> FIELD <field value 1>.
    ID <authority field 2> FIELD <field value 2>.
    IF sy-subrc 0.
    MESSAGE e000(zzpp) WITH 'No Authorization'.
    ENDIF.
    and it belongs to  SU24 transaction code
    Saurabh Goel

  • Why doesn't Lightroom appear in my list of installed apps, with the option to update it.

    All the other apps appear available to update, but with Lightroom I have to download it and do a fresh install each time.

    Sorry, re-reading the info, the path is correct - but it isn't perhaps as clear as it should be; might I suggest changing the wording to something like 'look for the opm.db file located at
    /AppData/Local/Adobe/OOBE/opm.db
    however - that doesn't solve the issue of Lightroom 5 not being listed in my installed apps!
    Cheers
    Sweens

  • Setting up a new developer account has wrong name listed in personal information with no option to edit

    In the process of setting up a new developer account, getting to step #2 & reviewing the personal information, the first & last name listed for my Apple ID is incorrect, however it is correct on the Apple ID settings page, as well as all of my iTunes billing information. How can this be updated? I don't want to create a developer account and be listed with the wrong name!

    Please read before you post.
    Contact [email protected] to investigate signup issues.

  • How to create ods object with overwrite option

    Hi all,
    I have two ods objects for Billing and Delivery and one cube for Sales.
    Billing and Delivery ODS objects are based on item level data source while sales cube is based on Schedule line level data source.
    Now i want to create a new ODS object which will get the data from these there object and update the ods object.Basically i want all the sales order attributes and billing quantity and delivered quantity from the ODS objects.
    how to update the new ods object in overwrite mode ??/
    Regards,
    Viren.

    HI,
    yes OK but what i mean is that (you might have a perfect reason for this) normally it's nota good idea to have an info cube as a data source (for Performance, look-up reasons etc). If your goal is to load Billing/Delivery/Sales data into one ODS, then make sure that you model this correct.
    If you want to use the ODS'es as data sources I would recommend you to use and ODS as data source also for the Sales data.
    Kind regards
    /martin

  • Best approach to store collection for html:options

    I am using struts to develop my web application. I am trying to figure out the best way to store a Collection for html:options inside a html:select element.
    My JSP page has a html:select statement which lists all the groups in a system. I have a member variable called getGroupNames() in my ActionForm class. When the JSP page is first requested, I populate the groupNames attribute of ActionForm class with a list of names. The html:options reads the groupNames attribute and lists all the group names.
    The problem: Once the user selects a group name and then submits, if there is any validation problems in other fields in the JSP, I build ActionErrors object and forward the request back to the same JSP. However, now I get an error saying the groupNames is NULL.
    Option1: One way to avoid this error is to AGAIN populate the groupNames list if there is a validation problem.
    Option 2: Another way is to store the list of groupnames in a seperate bean (and NOT as an attrib of the ActionForm) and store it in the REQUEST scope. This way I think the I don't have reload the groupName list in case of a validation failure.
    Could someone please help me in deciding which will be the right approach.
    Thanks

    Hi,
    1,2 billion rows and each row of 50 bytes - approximately 56 GB around. Huge segment. As you stated it's an OLTP database, can you check across what is the percentage or maximum number of queries with developers - important column which they are querying across and application dealt with.
    Based on the input of the above question we can check how best we can partition and columns we are dealing. Perhaps you have stated across historical data. From this kindly verify across what is the % of users check or go-back to historical information - based on that we can estimate the number of partitions we can create on segment and looking forward, you must estimate the % of increase of new/incoming data and day/month wise. so that you might be plan what can we do the old historical data.
    HTH
    Note- Part of Performance dealt with writing efficient tuned queries
    - Pavan Kumar N

  • Help Implementing HTML OPTION with HTML

    Hi:
    I have a HTML page with the folowing code:
    </SELECT></TD>
    </TR>
    <TR>
    <TD width="156">Mode</TD>
    <TD width="86"></TD>
    <TD width="206"><SELECT name="mode">
    <OPTION value="regmode" selected>REG Mode</OPTION>
    <OPTION value="testmode">TEST Mode</OPTION>
    <OPTION value="devmode" selected>Dev Mode</OPTION>
    </SELECT></TD>
    I need help to implement the OPTION using JSP and JavaBean,
    For a simple text entry I am using the following code:
    <input size=20 type=text name=userID value=<jsp:getProperty name="_welcomeJSPBean" property="userID"/>>
    I am looking for a similar way to get all the posibles values for the HTML OPTION,
    Thank in Advance.
    Leonardo

    This is why many of the tag libraries and frameworks exist. I use Struts, and it has html taglib that includes tags for automating select/option to a very high degree.
    If the list is dynamic, you can use:
    <html:select property="commtypeno">
      <html:options collection="commtypeList" property="commtypeno" labelProperty="commtype" />
    </html:select>
    Or, if the list is static, you can use:
    <html:select property="commtypeno">
      <html:option value="1">Type 1</html:option>
      <html:option value="2">Type 2</html:option>
      <html:option value="3">Type 3</html:option>
    </html:select>
    Anthony

  • Query returns list of objects with all fields = NULL

    Hi there,
    I must be doing something wrong. I have tried to query for all activities and all contacts using the code pattern shown below (for activities):
    Activity_ServiceLocator serviceLocator = new Activity_ServiceLocator();
    serviceLocator.setActivityEndpointAddress(config.get(CONFIG_KEY_URL) + ";jsessionid=" + sessionId);
    ActivityQuery aq = new ActivityQuery();
    ListOfActivityQuery laq = new ListOfActivityQuery();
    laq.setActivity(aq);
    ActivityQueryPage_Input aqpi = new ActivityQueryPage_Input();
    aqpi.setListOfActivity(laq);
    laq.setPagesize(new BigInteger("100"));
    laq.setStartrownum(new BigInteger("0"));
    ActivityQueryPage_Output aqpo = serviceLocator.getActivity().activityQueryPage(aqpi);
    When I do getListOfActivity() from the ActivityQueryPage object, I get a non-empty list, however, when I loop over the list, it seems that all fields in all the objects are NULL. This, even though I have checked in the system that the activities (appointments) all contain fields with data.
    As mentioned, when I try to query for all contacts using the exact same code pattern, I also get a non-empty list of (contact) objects with non-empty fields .. So, I guess I'm doing a simple mistake (since I have hundreds of contacts in my CRM system), but which?
    Thx in advance

    Okay, I partly found the answer myself. It appears that one has to explicitly set a (empty) query type for the fields that one wants returned from the query .. At least this appears to return the field value of the returned objects .. But is this really the correct way of doing it?
    A few related questions;
    1) What is the purpose of the UseChildAnd? I cannot read this from the documentation!
    2) Is there any more documentation than the Oracle CRM On Demand Release 16? I would like to have some more documentation on
    a) how to make a cross table query, e.g. across activities and contacts (for instance, give me all contact who have an appointment tomorrow), and
    b) how to use the QueryType.
    Any references to something that can enlighten me? :-)

  • How to set selected value in html:options that isusing HasMap Long,String

    So here is my problem
    I have a HashMap<Long,String> where key is the country id and value is the country name. So I am displaying it in the jsp using the below code
    <c-rt:set var="countriesMap" value="<%=countriesMap%>" target="java.util.HashMap<Long,String>"/>
    <html:select size="1" property="countryId" >
    <html:option value="" />
    <html:options collection="countriesMap" property="key" labelProperty="value" />
    </html:select>
    And my Action form has the property countryId.
    So it works fine , it displays all the countries and sets the country ID in the form's property that we set in the property attribute of <html:select>.The form's property is of type Long.
    But suppose if some error occurs in the validate method for some other property then when the page renders back it does not set the selected country in the list box.
    Can anyone please help me out of this.Thanks in advance.
    Edited by: AmitDsm on May 9, 2008 8:01 AM

    Hi,
    I had the same issue. Altho I am using Spring, the solution is the same.
    <select name="expMonth">
         <option value=""></option>
         <c:forEach items="${form.data.months}"
              var="month">
              <c:choose>
                   <c:when test="${form.data.pDet.expDate_month eq month}">
                        <option selected="selected"><c:out value="${month}"/></option>
                   </c:when>
                   <c:otherwise>
                        <option><c:out value="${month}"/></option>
                   </c:otherwise>
              </c:choose>
         </c:forEach>
    </select>Disclaimer: Not sure if this is the correct way to do it, but it works for me
    Edited by: Reegz on 2008/05/12 05:58

  • Html options

    Hi,
    I am using following code to display a drop down in jsp.
    <logic:present name="ALLBRANDS" scope="request">
         <html:select property="selBrand" styleId="brandBox" >
              <html:options collection="ALLBRANDS" property="strBrandDesc"/>
         </html:select>
    </logic:present>     
    ALLBRANDS is of type java.util.ArrayLIst which contains object of type Brand
    Brand has just two properties strBrandId and strBrandDesc.
    I am using property strBrandDesc to display elements in drop down.
    Up to this, every thing is working ok.
    What I want to do is:
    Whenever a user selects some value, on onchange I want to call a java script method and I want to pass strBrandId to java script function.
    I can't use bean write here..I son't want to retrieve strBrandDesc
    I tried different things but couldn't succeed.
    Can any one help me in this?
    Thanks
    nmadhava.

    I am sorry for asking simple question. Anyways I got it now.
    <logic:present name="ALLBRANDS" scope="request">
                                                      <html:select property="selBrand" styleId="brandBox" styleClass="tdDisplayDropDownText">
                                                                <logic:iterate id="brands" name="ALLBRANDS" type="com.archway.core.bean.MFBrand" scope="request">
                                                                     <html:option value=" <%= brands.getStrBrandId()%> ">
                                                                <bean:write name="brands" property="strBrandDesc"/>
                                                      </html:option>
                                                                </logic:iterate>
                                                      </html:select>
                                                      </logic:present>
    From java script we can access it using
    document.form.brandBox.value which gets id value not description.
    nmadhava

  • Scale Object with Panel, but what about inside a Tab control?

    The Scale Object with Panel option works very well for simple UI
    objects.  I like to use it for VIs that display tables or
    multicolumn listboxes, etc.  I am finding a limitation when I use
    the Tab control.  If I have a table or listbox in each tab, I
    would like them to scale with the panel.  I would also like the
    tab to scale.  It should look like an Excel workbook where all
    sheets scale with the window even though they are each on their own
    tab.  If I could only Group the various tables / lists with the
    Tab itself....
    This wouldn't be such an issue if the Bounds property of the
    multicolumn listbox was writable.  I can set the number of rows
    and columns, but column size can be variable and not uniform across all
    columns.  Also, that solution looks and behaves much different
    from the Scale Object with Panel approach.... not to mention the extra
    coding required.
    I'm guessing that this amounts to a feature request, but if anyone has a present-version workaround, I'd love to hear about it.
    See you at NI Week!
    Dan Press
    PrimeTest Automation

    Hi Kalin T,
    Thanks for your prompt reply. I am running version 8.01. My problem is that i cannot select "Scale object with pane" for the controls inside a Tab control if the Tab control "Scale object with pane" is turned on. I want both the Tab control and the controls inside to be scaled, for instance an Waveform graph or an textbox  when i resize my main window.
    Best regards,
    Mattis
    Attachments:
    Scale.vi ‏11 KB

  • Problem retrieving mapped objects after SQL defined readAllQuery

    Working with toplink 9.0.4 I am trying to implement a retrieval mechanism where a number of toplink read queries are created, and are then executed all together in a UnitOfWork. Most of the queries are built up using expression builder or just by getting mapped properties from a base object. However, one of the queries is too complex for expression builder and is therefore defined with raw SQL something like this:
    String theSQL = "SELECT otherPeople.* FROM PEOPLE otherPeople, /* several more tables */ WHERE /*horribly complex where clause */";
    ReadAllQuery formQuery = new ReadAllQuery(Person.class, new SQLCall(theSQL));
    When this query is executed it returns a List of Person objects with the correct primary key (Id) fields.
    The problem is that when an attempt is made to retrieve properties mapped from the Person objects, toplink issues a query which is lacking the foreign key = specific value (e.g. PERSON_ID='437216' ) part of the where clause. This, of course tries to retrieve an entire table ending with an OutOfMemory error.
    My question is how do the objects retrieved by the SQL based ReadAllQuery differ from those retrieved by an expression builder based query, since mapped properties on those work correctly.
    I feel sure that I am missing something quite simple.
    Any thoughts ?
    Mike

    Relationship queries should work correctly when the original object is read through custom SQL.
    My guess would be that either batch reading has been specified with the read all query, or the object has a relationship that has been marked to always be batch read in the mapping. Batch reading is not supported with custom SQL queries, so you must not use batch reading if using custom SQL.
    You can also try contacting Oracle technical support to see if a patch is available that either throws an exception when batch reading with custom SQL is attempted, or ignores the batch setting with custom SQL.

  • Needed help........ html:option problem

    hi all,
    i need to get the selected value from the option element.how can i get it?
    what is the type expresiion in tha value field.....
    this code is not working at all. i am getting the entire string inside the quotes...as selected value...what i want...is vale of that expression in quotes...
    ="<bean:write name="currency" property="key"/>"//// anyone knoe?
    <html:select name="currency"
    property="currencyCode">
    <logic:iterate id="currency" name="currencyList">
    <html:option value="<bean:write name="currency" property="key"/>"><bean:write name="currency" property="key"/> <SELECTED></html:option>
    </logic:iterate> </html:select>

    You can never use tags as attributes for other tags. Only strings, and expressions.
    What you seem to want is this:
    <html:select property="currencyCode">
    <html:options collection="currencyList" property="key"
    </html:select>
    I would recommend you check out the html:options tag
    http://struts.apache.org/userGuide/struts-html.html#options
    It takes a collection of items and generates multiple options for you.
    It also deals with selecting the correct value for you.
    Cheers,
    evnafets

Maybe you are looking for

  • CAF GP...

    Dear Friends,    What is this CAF GP...? Why and How it is used in SAP Netweaver? Regards Santhosh kumar.N

  • Nomad Jukebox - new computer, no install di

    Hi, As the title says - I have an older Jukebox (DAPAG0) that I like, and would like to add new tunes to. I have a new computer (XP), and can't find the old install disks. I've read two older threads, and searched for *ware on the Creative support si

  • C4C Integration with Yammer

    Hi, Can C4C integrate with external collaboration tool such as Yammer. Regards, Roy

  • System status EDEL ESTO active

    Hi A serial number of material is showing system status EDEL ESTO active even though  old delivery note has been deleted from system, due to this  i am not able to assign this serial number to new delivery note regards anupam

  • Im using CloverETL to connec to SharePoint using REST API.

    my team is trying to get the List items in SharePoint using REST api. we are using the CloverETL tool using the REST api URL of the list and the credentials in SharePoint which has full control. Below is the rest command that we used. /_api/web/lists