Hi Jake,

Your first sample looks good.
I've just tried it and it works.

What version of MR are you using?

Cheers
John




________________________________
From: jake <[email protected]>
To: Castle Project Users <[email protected]>
Sent: Mon, 12 July, 2010 11:58:41 PM
Subject: radio button binding

I'm having an issue binding my radio button in the controller.  Here's
my code:
$Form.formtag("%{action='DoSomething'}")
#foreach($item in $collection)
$item.Name
$Form.RadioField("selected", "$item.ID") <br/>

#end
$Form.EndFormTag()


I've also tried this:
$Form.formtag("%{action='DoSomething'}")
#foreach($item in $collection)
$item.Name
<input name="selected" value = "$item.ID" type="radio">$item.Name</
input><br/>

#end
$Form.EndFormTag()

My controller looks like this:

public void DoSomething(string selected) {
}

Selected always comes up null, it's not even in the the Form
collection of the controller. What am I doing wrong?

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.


      

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to