You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Craig Tataryn <ne...@computer-programmer.org> on 2004/03/22 01:12:54 UTC

Validation Question with Indexed Properties

Hi, I have the following definition in my validation.xml file:

<formset>
	<form name="MarketAddressForm">
		<field
			property="provStateId"
			indexedListProperty="address"
			depends="required">
				<arg0 key="Listing.formError.streetProvState"/>
		</field>
	</form>
</formset>

I then have a form that is built like so:
<% addressIndex = "address(" + region.getKey() + ")"; %>
<html:select styleClass="Field" property='<%=addressIndex + ".provStateId"%>'>
.
.
.
</html:select>

This generates HTML that looks like:

<select name="address(355).provStateId" class="Field">
.
.
.
</select>

However, if I look at the javascript generated by <html:javascript formName="addressForm">, I find:

     var bCancel = false; 

    function validateMarketAddressForm(form) {                                                      
            
        if (bCancel) 
      return true; 
        else 
       return validateRequired(form); 
   } 

    function required () { 
    } 

So does this mean that indexed properties for the validator do not work in javascript?  Or am I
doing something wrong?

Thanks,

Craig
<tataryn:craig/>

<tataryn:craig/>

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org