html:select : put each collection of country names in each user session?

Hi,
I have different <html:select> elements in my JSP. The options are filled with collections (country list, city list...).
What is the best way to do for country for example? To retrieve all the country name from the database, put it in a arrayList for EACH user session. Or, put it in an application element?

If it's not going to change for users, I'd store it in the application scope. No point to having multiple copies of the same information.

Similar Messages

  • Problem with html:select or html:options tags using struts,jsp and tomcat

    Hi
    I'm updating a Struts-Project to a new layout and therefore rework all jsp Sites.
    I'm also using a new Folder-Structure and update therefore my struts-config file.
    My Problem now is:
    Till now, we had a select-field with a code like this:
    < html:form action="/timetableAction" method="POST">
    < table width="53%" border="0">
    < tr>
    < td>< html:radio property="dauer" value="semester"
    /></ td>
    < html:select property="semester" size="1">
    < htmlptions name="semesterList" />
    </ html:select>
    </ html:form>
    The problem now is, that whenever I use any <html:xy> tag, the tomcat server I use can not show the page, he shows just the headers of the template, but not the
    content.-jsp-File where the form would be in. He stops right in the middle of the html page, when he notices the <html:xy> tags.
    And the funny thing is, that he has no problem to show a page when there is a <html:errors> within it? Why could this be? the struts-html.tld File is well included and teh Tomcat Server shows no exceptions.
    Waiting for you answers and thanks

    Thank you, I already got the answer in another forum

  • Passing collection in JSTL html:select onChange event javascript

    I'm trying to pass an object from the form to a javascript function to change text box values when the value of a select field is changed.
    On the jsp page, I have access to the collection called rows.
    I also have an html:select field that I need to use the onChange event to change other fields on the page. I can certainly call a javascript function on the onChange with no problem. But I need to take it one step further. I need to send the javascript function the collection called rows, so I can set other fields' values on the jsp page to the values of the selected row.
    This (or some facimile) is what I want to do:
    <html:select name="currentForm" property="value(id)" onChange="fillUomForm(this.form,this,rows);">
      <c:forEach var="row" items="${rows}">
          <c:choose>
               <c:when test='${row.id == currentForm.stringValues["id"]}'>
                    <option value="<c:out value='${row.id}'/>" selected>
                         <c:out value="${row.id}"/>
                    </option>
               </c:when>
               <c:otherwise>
                     <option value="<c:out value='${row.id}'/>">
                        <c:out value="${row.id}"/>
                     </option>
               </c:otherwise>
           </c:choose>
        </c:forEach>
    </html:select>Of course, rows is not recognized when I try to run this.
    I have tried replacing rows with
    <c:out value='${rows}'/> but that did not work.
    How can I do this?
    thanks,
    Walter

    sigh.
    Another user mixing up JAVA and javaSCRIPT.
    Java runs on the server. It generates an HTML page, and stops running.
    When the client receives the HTML page it can start running javascript.
    The only way java code is run again is if you make another http request. - ie the next time you click a link or submit a form.
    Most of the time that results in reloading a new page.
    You have two options
    1 - Download all the information you might possibly want/need as part of the JSP page. Then the javascript onclick event can retrieve it from javascript memory.
    2 - Make the onchange event submit an HTTP request, and then pick up the response, and do with it what it will. AJAX is a technology that lets you update the page without refreshing it completely.
    Hope this helps,
    evnafets

  • Change column names when selecting from a collection

    Anyone know how to change C001,C002...etc to readable column names when selecting from a collection? Aliases don't work!
    Paul Platt

    Paul,
    Edit the report attributes and change the column headings by selecting the "Custom" radio button first.
    Sergio

  • SCCM 2012 Hardware Report - Select by Collection ID or Name

    I am trying to get my custom report to prompt for Collection ID or Name. I have the following so far but this brings out all device hardware with a client, I need to be able to select all the data below but only for Devices in a collection:
    SELECT distinct
    CS.Manufacturer0 as 'Manufacturer',
    CS.Model0 as 'Computer Model',
    CASE
    WHEN ES.ChassisTypes0 in ('1') THEN 'Other'
    WHEN ES.ChassisTypes0 in ('2') THEN 'Unknown'
    WHEN ES.ChassisTypes0 in ('3') THEN 'Desktop'
    WHEN ES.ChassisTypes0 in ('4') THEN 'Low Profile Desktop'
    WHEN ES.ChassisTypes0 in ('5') THEN 'Pizza Box'
    WHEN ES.ChassisTypes0 in ('6') THEN 'Mini Tower'
    WHEN ES.ChassisTypes0 in ('7') THEN 'Tower'
    WHEN ES.ChassisTypes0 in ('8') THEN 'Portable'
    WHEN ES.ChassisTypes0 in ('9') THEN 'Laptop'
    WHEN ES.ChassisTypes0 in ('10') THEN 'Notebook'
    WHEN ES.ChassisTypes0 in ('11') THEN 'Hand Held'
    WHEN ES.ChassisTypes0 in ('12') THEN 'Docking Station'
    WHEN ES.ChassisTypes0 in ('13') THEN 'All in One'
    WHEN ES.ChassisTypes0 in ('14') THEN 'Sub Notebook'
    WHEN ES.ChassisTypes0 in ('15') THEN 'Space-Saving'
    WHEN ES.ChassisTypes0 in ('16') THEN 'Lunch Box'
    WHEN ES.ChassisTypes0 in ('17') THEN 'Main System Chassis'
    WHEN ES.ChassisTypes0 in ('18') THEN 'Expansion Chassis'
    WHEN ES.ChassisTypes0 in ('19') THEN 'SubChassis'
    WHEN ES.ChassisTypes0 in ('20') THEN 'Bus Expansion Chassis'
    WHEN ES.ChassisTypes0 in ('21') THEN 'Peripheral Chassis'
    WHEN ES.ChassisTypes0 in ('22') THEN 'Storage Chassis'
    WHEN ES.ChassisTypes0 in ('23') THEN 'Rack Mount Chassis'
    WHEN ES.ChassisTypes0 in ('24') THEN 'Sealed-Case PC'
    END as 'Chassis Type',
    BIOS.SerialNumber0 as 'Bios serial',
    BIOS.ReleaseDate0 as 'Bios Date',
    CS.name0 as 'Computer Name',
    RAM.TotalPhysicalMemory0 as 'Total Memory',
    sum(isnull(LDisk.Size0,'0')) as 'Hardrive Size',
    OS.Caption0 as 'OS',
    CSDVersion0 as 'Service Pack',
    CS.UserName0 as 'User',
    CS.domain0 as 'Domain',
    CPU.Name0 AS 'Processor',
    COUNT(CPU.ResourceID) AS 'Number of CPUs',
    CPU.NumberOfCores0 AS 'Number of Cores per CPU',
    CPU.NumberOfLogicalProcessors0 AS 'Logical CPU Count'
    from
    v_GS_COMPUTER_SYSTEM CS right join v_GS_PC_BIOS BIOS on BIOS.ResourceID = CS.ResourceID
    right join v_GS_SYSTEM SYS on SYS.ResourceID = CS.ResourceID
    right join v_GS_OPERATING_SYSTEM OS on OS.ResourceID = CS.ResourceID
    right join v_GS_Processor CPU on CPU.ResourceID = CS.ResourceID
    right join V_GS_X86_PC_MEMORY RAM on RAM.ResourceID = CS.ResourceID
    right join v_GS_Logical_Disk LDisk on LDisk.ResourceID = CS.ResourceID
    INNER JOIN dbo.v_GS_SYSTEM_ENCLOSURE ES on SYS.ResourceID = ES.ResourceID
    where
    LDisk.DriveType0 =3
    group by
    CS.Manufacturer0,
    CS.Model0,
    ChassisTypes0,
    BIOS.SerialNumber0,
    BIOS.ReleaseDate0,
    CS.Name0,
    RAM.TotalPhysicalMemory0,
    OS.Caption0,
    CSDVersion0,
    CS.Username0,
    CS.domain0,
    CPU.Name0,
    CPU.NumberOfCores0,
    CPU.NumberOfLogicalProcessors0

    This is what I have so far DataSet1
    SELECT distinct
    CS.Manufacturer0 as 'Manufacturer',
    CS.Model0 as 'Computer Model',
    CASE
    WHEN ES.ChassisTypes0 in ('1') THEN 'Other'
    WHEN ES.ChassisTypes0 in ('2') THEN 'Unknown'
    WHEN ES.ChassisTypes0 in ('3') THEN 'Desktop'
    WHEN ES.ChassisTypes0 in ('4') THEN 'Low Profile Desktop'
    WHEN ES.ChassisTypes0 in ('5') THEN 'Pizza Box'
    WHEN ES.ChassisTypes0 in ('6') THEN 'Mini Tower'
    WHEN ES.ChassisTypes0 in ('7') THEN 'Tower'
    WHEN ES.ChassisTypes0 in ('8') THEN 'Portable'
    WHEN ES.ChassisTypes0 in ('9') THEN 'Laptop'
    WHEN ES.ChassisTypes0 in ('10') THEN 'Notebook'
    WHEN ES.ChassisTypes0 in ('11') THEN 'Hand Held'
    WHEN ES.ChassisTypes0 in ('12') THEN 'Docking Station'
    WHEN ES.ChassisTypes0 in ('13') THEN 'All in One'
    WHEN ES.ChassisTypes0 in ('14') THEN 'Sub Notebook'
    WHEN ES.ChassisTypes0 in ('15') THEN 'Space-Saving'
    WHEN ES.ChassisTypes0 in ('16') THEN 'Lunch Box'
    WHEN ES.ChassisTypes0 in ('17') THEN 'Main System Chassis'
    WHEN ES.ChassisTypes0 in ('18') THEN 'Expansion Chassis'
    WHEN ES.ChassisTypes0 in ('19') THEN 'SubChassis'
    WHEN ES.ChassisTypes0 in ('20') THEN 'Bus Expansion Chassis'
    WHEN ES.ChassisTypes0 in ('21') THEN 'Peripheral Chassis'
    WHEN ES.ChassisTypes0 in ('22') THEN 'Storage Chassis'
    WHEN ES.ChassisTypes0 in ('23') THEN 'Rack Mount Chassis'
    WHEN ES.ChassisTypes0 in ('24') THEN 'Sealed-Case PC'
    END as 'Chassis Type',
    BIOS.SerialNumber0 as 'Bios serial',
    BIOS.ReleaseDate0 as 'Bios Date',
    CS.name0 as 'Computer Name',
    RAM.TotalPhysicalMemory0 as 'Total Memory',
    sum(isnull(LDisk.Size0,'0')) as 'Hardrive Size',
    OS.Caption0 as 'OS',
    CSDVersion0 as 'Service Pack',
    CS.UserName0 as 'User',
    CS.domain0 as 'Domain',
    CPU.Name0 AS 'Processor',
    COUNT(CPU.ResourceID) AS 'Number of CPUs',
    CPU.NumberOfCores0 AS 'Number of Cores per CPU',
    CPU.NumberOfLogicalProcessors0 AS 'Logical CPU Count'
    from
    v_GS_COMPUTER_SYSTEM CS right join v_GS_PC_BIOS BIOS on BIOS.ResourceID = CS.ResourceID
    right join v_GS_SYSTEM SYS on SYS.ResourceID = CS.ResourceID
    right join v_GS_OPERATING_SYSTEM OS on OS.ResourceID = CS.ResourceID
    right join v_GS_Processor CPU on CPU.ResourceID = CS.ResourceID
    right join V_GS_X86_PC_MEMORY RAM on RAM.ResourceID = CS.ResourceID
    right join v_GS_Logical_Disk LDisk on LDisk.ResourceID = CS.ResourceID
    INNER JOIN dbo.v_GS_SYSTEM_ENCLOSURE ES on SYS.ResourceID = ES.ResourceID
    JOIN v_FullCollectionMembership fcm on fcm.resourceid=v_r_system.resourceid
    WHERE fcm.Collectionid= @CollectionID
    group by
    CS.Manufacturer0,
    CS.Model0,
    ChassisTypes0,
    BIOS.SerialNumber0,
    BIOS.ReleaseDate0,
    CS.Name0,
    RAM.TotalPhysicalMemory0,
    OS.Caption0,
    CSDVersion0,
    CS.Username0,
    CS.domain0,
    CPU.Name0,
    CPU.NumberOfCores0,
    CPU.NumberOfLogicalProcessors0
    Then DataSet2 is
    select CollectionID, Name from v_Collection Order by Name
    But when I run it I get this error:
    For more information about this error navigate to the report server on the local server machine, or enable remote errors
    Query execution failed for dataset 'DataSet1'. (rsErrorExecutingCommand)
    An error has occurred during report processing. (rsProcessingAborted)
    Thanks so far,  still plugging away.

  • html:select Struts tag problems

    hello
    I've a bean "Profile" in my sessionScope under name "myProfile"
    This bean is defined as
    public class Profile implements java.io.Serializable  {
         private User user;
         private List<Groups> groups;
         private List<Function> function;
         private List<Services> services;
         etc. .-.... getter and setter.....
    }the "services list" is full of data
    now in my jsp I want to print all the services in a select box. I'm using struts so I do
    <html:select property="serviceId">
          <html:options collection="${myProfile.services}" property="idSoc" labelProperty="descrizione" />
                        </html:select>it doesn't works..the console says
    Cannot find bean under name [it.object.Services@16b5518, it.object.Services@19fdafc]
    I've read the documentation.. but I don't understand if in the collection attribute I can put only the name of a bean that identify a collection...
    I can't use EL?
    I try do use a bean:define and to put its name in the collection attribute
    <bean:define id="myBean" value="${myProfile.services}"/>
                   <html:select property="societaId" >
                             <html:options collection="myBean" property="idSoc" labelProperty="descrizione" />
                        </html:select>but it still doesn't work.. it says
    Cannot create iterator for [it.object.Services@16b5518, it.object.Services@19fdafc]
    what the way to solve this problem
    thanks
    martina

    <html:select>
    <html:optionsCollection name = "myProfile"
    property = "services" value ="idSoc" label =
    "descrizione"/>
    /html:select>yes evnafets
    you're right
    this code works!
    but there's a problem. To simplify this post I say I've a bean with a Collection inside that I want to iterate.
    In my real application I've a session bean with another bean inside that contains the Collection. I've one more level (3 levels instead 2)
    whit the code you suggest I can't search inside it...
    I mean over myProfile I've onother bean that contains it and it's in the session
    bean1 -> myProfile -> List of Services
    from the session I can take by name only the "bean1"
    do you know what's the solution in this case?
    I've used some code like this
    <bean:define id="myBean" name="bean1" property="profilo"></bean:define>
    <html:select>
            <html:optionsCollection name = "myBean" property = "services" value ="idSoc" label = "descrizione"/>
    </html:select>it works..as you suggest I can specify only attribute names so I think this is the right way... or?!
    thanks a lot for yor help
    martina

  • Using properties from a propery file (for i18n support) in a html:select

    <Newbie alert!>
    OK, I' d like to be able to put text strings used by my JSP/Struts pages in a properties file so that we can change them for different languages. So I have a file referenced in struts-config.xml as such:
    <message-resources parameter="com.myproject.resources.ApplicationResources"/>
    This works fine and I can use tags like: <bean:message key="prompt.decision"/> in my JSP files.
    I would like to be able to use strings defined in the property file also for a dropdown list like such:
    <html:select name="displayForm" property="scoreFinalDecision" >
         <html:option value="Approved"><bean:message key="option.approved"/></html:option>
         <html:option value="Denied"><bean:message key="option.denied"/></html:option>
    etc etc
    </html:select>
    This works, but I would like the value (i.e. value="Approved") also to be picked up from the
    property file, not hard-coded like above.
    How can I do that? I know that I could pick up the values from a Collection using html:options,
    but I don't understand how that would help me get the values from the property file?
    </Newbie>
    Many thanks,
    Tattersail (who notices that his forum doesn't undertand international characters: ���)

    Well you could use an <html:optionsCollection tag
    Just fetch the content of your property file in your action and then populate a vector with labelvalubean object (comes with the struts package) org.apache.struts.util.LabelValueBean
    labels = new Vector();
    //loop here
    LabelValueBean label = new LabelValueBean("value","label");
    labels.add(label);
    //end loop
    yourForm.setYourOptionCollection(label);
    The in your form you write something like
    <html:select name="displayForm" property="scoreFinalDecision" >
    <html:optionsCollection property="your property here" />
    </html:select>
    it will iterate through your vector and display the options

  • Checkbox Selections into a Collection

    I have been tossing this around for a while now and can’t seem to come up with a solution from examples and docs. I know I'm missing something, but I don't know what. I am hoping one of you can shed some light on what I missing to get me back on track or on a new track if this one is wrong.
    I am trying to select multiple records in a report then go to a second page to add a single status and comment for the group of selected records. The status, comment, and some of the original report data (like primary key) will be merged into a secondary table once I get the collection working. I would do this all on one page but I also have a number of criteria selections on the first page that I think would become too busy if I also added the status and comment fields.
    In order to create this report, I think I need to use a collection to hold the selected records. I can get the PK and associated fields from a simple SQL report into a collection but I can only get the PK from PL/SQL. I can use the PK to pull the data from the database again but I hate the thought of hitting the database again for data I have on the screen. I am using PL/SQL to allow the WHERE clause to dynamically change based upon the criteria selected.
    For the collection, I am using the method from Joel Kallman’s blog (http://joelkallman.blogspot.com/2008/03/preserving-checked-checkboxes-in-report.html) to preserve the rows as they are selected. It works great for the item listed in the apex_item.checkbox item but I can’t find an answer to how to also bring some of the other fields from the report into the collection.
    I have posted a simplified example on OTN for your review/comments. It does not contain the criteria mentioned above to eliminate complexity from the example. I am using APEX version 3.2.0.00.27.
    Workspace: bobs
    Username: guest
    Password: abc123
    Application: Multi Select Edit – 60803
    Page 1 will give you a menu to select the SQL or PL/SQL version of the pages.
    I would also love to be able to have the multi select working at the heading of the checkboxes in the PL/SQL report but I can’t get it to work properly. The boxes will all show as checked but the data doesn't get put into the collection unless the checkbox for each row is individually selected. This feature is not in the example since it is a lower priority.
    The basics of the example PL/SQL report are as follows._
    The report source is:
    DECLARE
    q VARCHAR2(32767); -- query
    BEGIN
    q := 'select apex_item.checkbox(1, empno, ''onclick="f_UpdateCollection(this)"'',a.c001) cbox, '||
    ' "EMPNO", '||
    ' "ENAME", '||
    ' "JOB", '||
    ' "MGR", '||
    ' "SAL", '||
    ' "DEPTNO" '||
    ' from "EMP", apex_collections a '||
    ' where '||
    ' a.c001 (+)= empno '||
    ' and a.collection_name (+)= ''EMP_COLLECTION'' ';
    RETURN q;
    END;
    The HTML Header for the page contains the function that is called from the onclick statement.
    <script type="text/javascript">
    <!--
    function f_UpdateCollection( cb ){
    var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=UpdateCheckboxValue',0);
    get.addParam('x01',cb.value);
    get.GetAsync(function(){return;});
    get = null;
    //-->
    </script>
    And the Application Process that populates the collection is:
    declare
    l_value varchar2(4000);
    l_seq_id number := 0;
    l_collection_name constant varchar2(30) := 'EMP_COLLECTION';
    begin
    -- Get the value of the global which will be set in JavaScript
    l_value := wwv_flow.g_x01;
    -- If our collection named EMP_COLLECTION doesn't exist yet, create it
    if apex_collection.collection_exists( l_collection_name ) = FALSE then
    apex_collection.create_collection( p_collection_name => l_collection_name );
    end if;
    -- See if the specified value is already present in the collection
    for c1 in (select seq_id
    from apex_collections
    where collection_name = l_collection_name
    and c001 = l_value) loop
    l_seq_id := c1.seq_id;
    exit;
    end loop;
    -- If the current value was not found in the collection, add it. Otherwise, delete it from the collection.
    if l_seq_id = 0 then
    apex_collection.add_member(
    p_collection_name => l_collection_name,
    p_c001 => l_value );
    else
    apex_collection.delete_member(
    p_collection_name => l_collection_name,
    p_seq => l_seq_id );
    end if;
    commit;
    end;
    The final report is a simple select from the collection.
    select *
    from apex_collections
    where collection_name = 'EMP_COLLECTION'
    Thank you for your time.
    Bob

    Jeff,
    Thanks for the response. I had tried the apex_item before but I couldn't get it to work. I have changed the SQL to include the apex_item commands then used them to define parameters in the javascript function then added parameters to the Application Process but I get no data found. Am I using the apex_item wrong in the SQL or the apex_application wrong in the javascript?
    Thanks,
    Bob
    SQL:_
    q := 'select apex_item.checkbox(1, empno||''~''||ename||''~''||job||''~''||hiredate, ''onclick="f_UpdateCollection(this)"'',a.c001) cbox, '||
    ' apex_item.display_and_save(2,empno) "EMPNO", '||
    ' apex_item.display_and_save(3,ename) "ENAME", '||
    Javascript:_
    function f_UpdateCollection( cb ){
    var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=UpdateCheckboxValue',0);
    get.addParam('x01',cb.value);
    get.addParam('x02',apex_application.g_f02);
    get.addParam('x03',apex_application.g_f03);
    get.GetAsync(function(){return;});
    get = null;
    Application Process:_
    declare
    l_value varchar2(4000);
    l_empno  varchar2(4000);
    l_ename  varchar2(4000);
    begin
    l_value := wwv_flow.g_x01;
    l_empno := wwv_flow.g_x02;
    l_ename := wwv_flow.g_x03;
    apex_collection.add_member(
    p_collection_name => l_collection_name,
    p_c005            => l_empno,
    p_c006            => l_ename,
    p_c010 => l_value );
    ...

  • How to get the values from html:select? tag..?

    i tried with this, but its not working...
    <html:select styleClass="text" name="querydefs" property="shortcut"
                 onchange="retrieveOptions()" styleId="firstBox" indexed="true">
    <html:options collection="advanced.choices" property="shortcut" labelProperty="label" />
    </html:select>
                        <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>

    <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>This java script is not working at all..its not printing anything in document.write();
    This is code..
    <td class="rowcolor1" width="20%">
    <html:select styleClass="text" name="querydefs" property="shortcut"
                             onchange="retrieveSecondOptions()" styleId="firstBox"
                             indexed="true">
                             <html:options collection="advanced.choices" property="shortcut"
                                  labelProperty="label"  />
                        </html:select>i tried with this also. but no use..i'm not the getting the seleced option...
    function retrieveOptions(){
    firstBox = document.getElementById('firstBox');
                             if(firstBox.selectedIndex==0){
          return;
        selectedOption = firstBox.options[firstBox.selectedIndex].value;
    }actually , how to get the values from <html:select> ...?
    my idea is to know which value is selected from the combo box(<html:select> ) if that value is equal some string i have enable a hyperlink to open a popup window

  • HT1229 How do you transfer photos to external backup and keep the photos in events with event name or with description name. Each time I have tried to transfer them they only transfer with a jpg number so you don't know what photos are what.

    How do you transfer photos to external backup and keep the photos in events with event name or with description name. Each time I have tried to transfer them they only transfer with a jpg number so you don't know what photos are what. When you have several thousand photos it is difficult to determined what is what.
    Why does iPhoto have the ability to put photos in events and to give them descriptions if it doesn't transfer this info with the photo. I want to back my photos up to an external drive.

    The simplest way to achieve what you want is to back up the iPhoto Library. That will get everything.
    You sem to be exporting from iPhoto to the Finder. The Finder does not have the same organisation capabilities as iPhoto. If you're going to do that you need to understand some of the differences between the two.
    Event Name will become  Folder Name.
    'Description Name' I guess is the Title you give the Photo
    Jpeg Number is the File Name assigned by your camera.
    So: File -> Export
    Set your Kind to Jpeg
    Select your preferred Quality
    Check the Boxes at 'Titles and Descriptions' and Location Information
    Under FIlename select 'Use Title'
    Click on Export. In the Next Window choose a New Folder as your export destination and then Name that as you prefer
    Regards
    TD

  • How to display html:select in Edit page using same options as in Add page

    Hi,
    <html:select property="tblAssociateDetailsVisaType">
                <html:option value="H1">H1</html:option>
    </html:select>I want small help -
    I have two functionalities 1.add 2.Update
    In Add i have nearly 10 dropdown lists with average 20 options, when i submit into DB stored a single record.
    Now when i want to Edit that same record , i am just getting the value from DB and displaying as <td><html:text property="tblAssociateDetailsVisaType" value="<%=VisaType_page%>" size="10"/> which is a wrong way!
    But, i am struggling in showing the same dropdown list with all the option with the option retrieved from the DB on top with <html:select ..... selected>!
    Please help me how to do ?
    I would like to make you of .properties file in doing so ! Which avoids recompiling!
    Thanks in advance!
    Edited by: ganeshtyarala on Dec 17, 2007 11:57 AM

    You could store all of the options in a collection and then loop through it and compare it to the value that was returned. (collection contains beans with value and label attribute)
    This is the code I use.. it is using JSTL tags, but you could implement the same using other methods.
    When my application loads I query the database to get the possible values for the drop down and then load them into the the form.
    <div class="fieldSpan">
    <select name="rewardTypeCode" id="rewardTypeCode">
              <c:forEach var="rewardTypeCodes" items="${sessionScope.myActivity.rewardTypeCodeList}">
                   <option <c:if test="${sessionScope.myActivity.rewardTypeCode == rewardTypeCodes.value}">selected</c:if>
                        value="${rewardTypeCodes.value}">${rewardTypeCodes.value} - ${rewardTypeCodes.label}</option></c:forEach></select></div>

  • Is it possible to select multiple clips and create a sequence from each individually?

    Is it possible to select multiple clips and create a sequence from each individually?  If you select multiple clips and select "New Sequence from Clip" it puts all of the clips into one sequence.  Is there an easy way to quickly perform this on multiple selected clips separately? 

    So now I *have* used Butler with PPro, and it works very well, here's an idea of how to do it:
    Import folder of clips
    Ensure first clip selected in bin and sorted by Media Type
    Most of these commands need shortcuts assigning - mine listed below
    Macro:
    To create seq from selected clip:
      ‘New seq from clip’ (Shift+CMD+N)
    To duplicate this seq:
      ‘Reveal Sequence in project’ (Shift+F) - not strictly necessary as it will already be selected
      ‘Window | Project’ (CMD+9)
      ‘Edit | Duplicate’ (Shift+CMD+/)
    To rename the duplicate
      ‘Enter’
      Various keystrokes to rename as required
      ‘Enter’ - to make name stick
      ‘Shift+Enter’ - to reselect that sequence
      ‘Esc’ - to get out of editing name
    To change resolution of duplicate:
      ‘Sequence Settings’ (CMD+5)
      ‘Tab’ x 3 (to get to H Frame Size)
      ‘xxxx’ (to enter frame width)
      ‘Tab’ x 1 (to get to V Frame Size)
      ‘yyyy’ (to enter frame height
      ‘Enter’ x 2 as prompt will say previews will have to be deleted
    To then find next clip ready for macro to run again:
      ‘Open in Timeline’ (Shift+CMD+O)
      ‘Match Frame’ (Shift+Spacebar)
      ‘Reveal in Project’ (Shift+CMD+F)
      ‘Window | Project’ (CMD+9)
      ‘Down Arrow’ - to select next clip
    I tried it with Butler (manytricks.com - free trial, $20 to buy) and it worked a treat, takes about 3 secs per clip
    AHK (for windows) is at autohotkeys.com and is free.
    You could start making multiple macros - that would enable you to do grade / resize in middle of duplication - and then export etc, but I figure you can figure that out ;-)

  • Html:select inside logic:iterate

    hi,
    I am having a string type corresponding to the select attribute in my form bean. Since this select tag is inside the logic:iterate all the names of the select boxes are same. i.e myLabel in this context. So, how can i set the value to select box. do i need to change the data type for labelValue in form bean.
    my form bean is given below:
    here the listTotal is the total of the combo and listValue is the individual combo
         public ArrayList listTotal;
         public Collection getListTotal()
              return (Collection)listTotal;
         public void setListTotal(ArrayList total)
              this.listTotal = total;
         public ArrayList listValues;
         public void setListValues(ArrayList values)
                   this.listValues = values;
         public ArrayList getListValues()
              return  listValues;
                         String myLabel;
         public String getMyLabel()
         return myLabel;
         public void setMyLabel(String myLabel)
         this.myLabel = myLabel;
    And i m setting the values in the action class
              ArrayList listTotal = new ArrayList(1);
              ArrayList listValues = new ArrayList();
              listValues.add(new LabelValueBean("k1", "Value1"));
              listValues.add(new LabelValueBean("k2", "Value2"));
              listValues.add(new LabelValueBean("k3", "value3"));
              listTotal.add(listValues);
              listValues = new ArrayList();
              listValues.add(new LabelValueBean("l1", "Value4"));
              listValues.add(new LabelValueBean("l2", "Value5"));
              listValues.add(new LabelValueBean("l3", "value6"));
              listTotal.add(listValues);
              listValues = new ArrayList();
              listValues.add(new LabelValueBean("m1", "Value7"));
              listValues.add(new LabelValueBean("m2", "Value8"));
              listValues.add(new LabelValueBean("m3", "value9"));
              listTotal.add(listValues);
              employeeForm.setListTotal(listTotal);
    jsp code
    <logic:iterate id="listValues" name="EmployeeForm" property="listTotal" indexId="index">
    <tr><td>
    <html:select property="myLabel" >
    <html:options collection="listValues" labelProperty="label" property="value"/>
    </html:select>
    </logic:iterate>

    hi,
    instead of having it as a array i thought of going for an array list so that the manipulation would be much easier. ok here is my code.
        //This is the array list for names of the drop downs.
        private ArrayList selectedList;
        public ArrayList getSelectedList()
            return selectedList;
        public void setSelectedList(ArrayList pselectedList)
           this.selectedList = pselectedList;
        public ListValueVO getSelected(int index)
           return (ListValueVO) selectedList.get(index);
        }I have already mentioned in my previous posts that i have 3 lists in my form bean. One list for individual combo box. Another list for total number of combo boxes. The third list for the names of the combo boxes. Pls let me know whether i m going in the correct direction or not.

  • Html:select - very confusing

    I am having a lot of difficulty understanding how the html:select works - especially if you're working with different ypes of containers e.g. hashmaps, lists, collections. I'm especially having trouble with lists. Here's what I have (I'm building a struts application):
    Action Class
    List bdates = dbconfig.getBusinessDates();
    httpServletRequest.getSession().setAttribute("BusinessDates", busDates );JSP Page
    <%@ page import "import java.util.List" %>
    <%
    List getBusDates = (List) session.getAttribute("BusinessDates");
    request.setAttribute("busDate", getBusDates);
    %>
    <html:select property="businessdate">
            <html:options collection="busDate" property="bdate"/>
    </html:select>I get an error saying no get property found for bdate in bean. So then I manually go to my ActionForm for this JSP page and add bdate as a string variable and its getter and setter functions. But it still doesnt work.
    Can someone please explain to me how I can use a List with an Html:select and html:option tags in JSP?
    Any assistance much appreciated.

    1) There's no need to pull the collection out of the session and put it in the request...
    <html:options collection="BusinessDates" scope="session" property="bdate" labelProperty="bdateLabel" />
    2) The property and labelProperty values are used to map to fields in the objects that are in the list. It doesn't matter what is in the list, as long as those classes have methods:
    public String getBdate() {
       return ...;
    public String getBdateLabel() {
       return ...;
    }

  • HTML:Select

    Hi,
    I am having a list of names from DB which I should show in the muliselect box. I have a form bean which has a String array with the names to be shown.
    I have written like this...but dont know if im correct
    <html:select name="nameForm" property="nameList"  multiple="true">
    <html:options collection="nameList" property="name" labelProperty="name"/>
    </html:select>                    Now my question is in html select should the attribute property also point to the name of the arraylist. and collection should also point to arralist?
    How it should be written...can you please help...
    Thanks

    In form bean I have
    String[] namesList;
    public String[] getNamesList(){
    xxxxxx ;
    public setNamesList(){
    xxx;
    }in this case the property is also namesList and collections should also point to the list which is namesList. Is this correct?

Maybe you are looking for

  • User Agent in FireFox works but not Safari

    I am trying to log into whstuart.com/clients but it says it requires Internet Explorer 4.0 or higher. This is the only every day task that I can't perform on Safari and would like to not have to use multiple browsers every day. I have been able to lo

  • Printing Smartform on Letterhead Duplex

    Hi, I have a 2 page smartform that I am printing onto a letterhead and the paper is loaded so that the letterhead is aligned. I have now created another 1 page smartform, but when I print it it appears on the reverse of the letterhead. The printer is

  • Itunes installer error anyone???

    whenever i try to install itunes on my windows 7 laptop it just says this... the installer encountered errors before itunes could be configured errors occured during installation. your system has not been modified. i have removed all of itunes and up

  • Deploying custom templates only shows first template

    Hi guys, I'm having an issue deploying custom templates. I have followed the steps outlined here (http://technet.microsoft.com/en-us/library/cc178976.aspx) but when I open up Word/New I see the "CompanyName" under custom templates but when I open it

  • UWL getting all workitems, needs only HR one

    Hi, Please note that i am a HR functional consultant, we have implemented ESS on our project, now there is Universal Work List in which all the workflows should come related to HR processes only. But issue is while we have connected UWL all workflows