Solved

struts html:option problem

Posted on 2004-09-23
4
282 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

740 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