hi list

I have a problem with a macro that should build a ht ml select element.

The macro is as follows:

-- CODE --
#macro( selectionbox $class $name $selection $list )
<select class="$class" name="$name" size="1">
#foreach( $entry in $list )
#if( $entry.getId() == $selection )
<option value="$entry.getId()" selected>$entry.getValue()</option>
#else
<option value="$entry.getId()">$entry.getValue()</option>
#end
#end
</select>
#end
-- CODE --

$list is a list of torque objects
$selection is an int value representing the current selected item of the
list

The problem is, that the line
#if( $entry.getId() == $value )
never returns true and there is  no selected item in the selectionbox
(the box always shows the first element)

I do not understand the reason for this behavior.
What did I miss?

thx for help
Mark



-- 
 Mark Wassermann            @: [EMAIL PROTECTED]


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

Reply via email to