Hail gurus, especially Robert Taylor at mulework.com, who,
in spite of his claims not to be a guru, set me right on
my last easy beginner question (as did my friend and former
colleague Ciaran Kenny back in Boulder - the same answer
came in from both gurus within an hour of each other).

Here's this week's abuse of this valuable resource:

There's a database back there somewhere, and it stores
autogenerated primary keys and FSK ratings (little bitty
strings representing ratings for stuff shown in movie
theatres, the German equiv to "G", "PG-13", "R" etc.,
for my fellow Yanks at home and abroad). These FSK ratings
get attached to chunks of content our system keeps track
of. There's an FskRatingAction that populates a LabelValueBean
with the DB ids as values, and the little strings as labels.
Works great for adding and editing stuff that has an FSK rating,
e.g.,

Format: <html:text property="format"/><BR>
FSK Rating: <html:select property="fskRating">
            <html:options collection="fskRatingOptionBean"    
                property="value" labelProperty="label"/>
            </html:select><BR>
Play Length: <html:text property="playLength"/><BR>

What I'm trying to figure out is this: When I'm trying to display
a bunch of things that have FSK ratings, is there some combination
of logic and bean tags that will allow me to pull in the FSK rating
to the display, i.e., replacing

<td><bean:write name="collectionElement" property="format"/></td>
<td><bean:write name="collectionElement" property="fskRating"/></td>
<td><bean:write name="collectionElement" property="playLength"/></td>
 
which displays the (not particularly human-useful) Id, with

<td><bean:write name="collectionElement" property="format"/></td>
<td><whatever:whatever bean="fskRatingOptionBean"
                        whatever="getLabelForValueThatComesFromCollElt"
                        /></td>
<td><bean:write name="collectionElement" property="playLength"/></td>

Or do I need to set up a separate method in the FskRatingAction to
create a per-row bean that I can pull in with bean:include? Seems
kind of performance-ugly, if so, and much cooler to keep it in
the .jsp file.

Any tips, like last time and always, hugely appreciated.

Tim

[EMAIL PROTECTED]
www.cinedavis.com
Dresden, Germany





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

Reply via email to