I seem to be having troubles with the isSet method from the velocity field.
According to the code below, if the item is not set, the default MAIL option
should be selected, otherwise, the database item is the selected item in the
list.  The strange thing is that the HTML has two items selected in the
list.  To me this indicates that isSet() is returning false for this item
even though it clearly has a value.  

Has any one noticed this behaviour?  Hopefully It's just a logic issue on my
part...


VTL:
  <select name="$eventGroup.PreferredCommunicationCode.key" size="1">
     #foreach ( $method in $methods )
       #if ( (!$eventGroup.PreferredCommunicationCode.isSet() ) && (
$method.getPreferredCommunicationCode().toString() == "MAIL") )
         <option selected
value="$method.getPreferredCommunicationCode()">$method.getDescription()</op
tion>
       #else
         #if ( $method.getPreferredCommunicationCode().toString() ==
$eventGroup.PreferredCommunicationCode.toString())
           <option selected
value="$method.getPreferredCommunicationCode()">$method.getDescription()</op
tion>
         #else
            <option
value="$method.getPreferredCommunicationCode()">$method.getDescription()</op
tion>
         #end
       #end
     #end
  </select>

HTML:
        <select name="EventGroupKey_0EventPreferredCommunicationKey"
size="1">
<option value="EMAL">E-mail</option>
<option value="FAX">Fax</option>
<option value="INTR">Internet</option>
<option selected value="MAIL">Mail</option>
<option selected value="PHON">Phone</option>
<option value="PRSN">In Person</option>
        </select>


Mark Lybarger
[EMAIL PROTECTED]
CBC Companies
614.442.3741

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.435 / Virus Database: 244 - Release Date: 12/30/2002
 

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

Reply via email to