I am toying around with a simple test application. In one page user creates a new record, and picks the artist for that record with a select pulldown. My artist object has a first name and a last name separately. Initially I displayed only last name:

<html-el:select property="artistId">
<html-el:optionsCollection property="allArtists" value="id" label="lastName"/>
</html-el:select>


Quite nice and compact. When I wanted to include also the last name, best I could come up with was:

     <html-el:select property="artistId">
       <c:forEach var="artist" items="${recordForm.allArtists}">
         <html-el:option value="${artist.id}">
           <c:out value="${artist.firstName} ${artist.lastName}"/>
         </html-el:option>
       </c:forEach>
     </html-el:select>

It seems quite complicated - is there any way to use EL and optionsCollectionTag, for example, to achieve a simpler structure?

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to