Solved

struts html:option problem

Posted on 2004-09-23
4
281 Views
Last Modified: 2010-03-31
Hai,

I have:

<html:select property="projects" multiple="" style="width:70%;">
      <logic:iterate name="projekteAndAufgabe" id="projekt">
      <logic:iterate name="projekt" property="aufgabeViews" id="aufgabe">
           <html:option value="test">
                        <bean:write name="projekt" property="projektNummer" />
                       <bean:write name="projekt" property="bezeichnung" /> --
                     <bean:write name="aufgabe" property="nummer" />
                    <bean:write name="aufgabe" property="kurzBeschreibung" />
           </html:option>
      </logic:iterate>
       <logic:iterate>
</html:select>

but i have the option value as "test", i want it to be replaced it with *bean content* which is present inside the option tag.

PS: I cannot use collections here.

Not sure if it is simple, but i go with maximum points since it is urgent. Any ideas ?
0
Comment
Question by:ldbkutty
  • 3
4 Comments
 
LVL 37

Expert Comment

by:zzynx
ID: 12132149
0
 
LVL 37

Accepted Solution

by:
zzynx earned 500 total points
ID: 12132236
0
 
LVL 32

Author Comment

by:ldbkutty
ID: 12132330
>> Does this help?
YES !!! :-)

For future reference, i will post the solution here:

<html:select property="projects" multiple="" style="width:70%;" styleClass="zeiterfassung_data">
                                                                  <logic:iterate name="projekteAndAufgabe" id="projekt">
                                                                        <logic:iterate name="projekt" property="aufgabeViews" id="aufgabe">
                                                                              <html:option value="${projekt.projektNummer} -- ${aufgabe.nummer}">
                                                                              <bean:write name="projekt" property="projektNummer" />
                                                                              <bean:write name="projekt" property="bezeichnung" /> --
                                                                              <bean:write name="aufgabe" property="nummer" />
                                                                              <bean:write name="aufgabe" property="kurzBeschreibung" />
                                                                              </html:option>
                                                                        </logic:iterate>
                                                                  </logic:iterate>
                                                                  
                                                            </html:select>
0
 
LVL 37

Expert Comment

by:zzynx
ID: 12132344
>>>> Does this help?
>>YES !!! :-)

:°)))

Thanks for accepting
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question