Hello,

        This may be more of a jsp 2.0 question than a html-el tag
library question, but here goes.

        I have a jsp page that has a list of dates that need to be
entered.  I have a custom tag file that displays a date selector using
three html-el: selects (year/month/day.)  It takes as attributes the
form property name and the index.  The dyna form bean, for legacy
reasons, does not contain an array of date objects, but rather three
arrays of integers, one for date, one for month, and one for year.  So
the form bean looks like:

          <form-property name="prop_date" type="java.lang.Integer[]"/>
          <form-property name="prop_month" type="java.lang.Integer[]"/>
          <form-property name="prop_year" type="java.lang.Integer[]"/>

and the tag library looks like (without its header):

        <%@ attribute name="property" required="true" %>
        <%@ attribute name="index"    required="true" %>

        <html-el:select property="${property}_date[${index}]">
           <!-- bunch of options here -->
        </html-el:select>

        <html-el:select property="${property}_month[${index}]">
          <!-- bunch of options here -->
        </html-el:select>

        <html-el:select property="${property}_year[${index}]">
          <!-- bunch of options here -->
        </html-el:select>


The problem I face is that let's say the jsp using the tag does this:

        <c:forEach var="foo" items="${someFoos}" varStatus="status">

                <myTagLib:dateSelect property="prop" index="${status.index}"/>

        </c:forEach>

Then I get:

    javax.servlet.jsp.JspException: Invalid indexed property 
'prop_date[${status'

presumadely from the html-el:select.  I'm assuming that status.index
isn't getting evaluated when invoking the dateSelect tag, and so when
${property}_month[${index}] is evaluated by the html-el:select tag, it
gets 'prop_date[${status.index}]' and doesn't recursively evaluate to
find the value of status.index.  Any suggestions on the correct way to
deal with this?

                        Thanks,
                        -Clint



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

Reply via email to