Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
PrefixedRequestData needs to be available to property binders
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Bob  
View profile  
 More options Mar 21 2012, 6:09 pm
From: Bob <bob.p...@gmail.com>
Date: Wed, 21 Mar 2012 15:09:50 -0700 (PDT)
Local: Wed, Mar 21 2012 6:09 pm
Subject: PrefixedRequestData needs to be available to property binders
This came up recently with a DateTimePropertyBinder we made to bind a
date based on three inputs coming in.

To provide some context, we have a separate HtmlConvention that spits
out DateTimes as three inputs named like this:
propertyName + "Day"
propertyName + "Month"
propertyName + "Year"

and then the property binder which will look through the request data
for the same in order to bind it back in.

Consider the following example:

public class InputModel
{
    public IList<Person> People { get; set;}

}

public class Person
{
    public DateTime DateOfBirth { get; set;}

}

with some spark markup on page looking like this:
<div each="var person in Model.People">
${ this.InputFor(x => x.People[personIndex].DateOfBirth) }
</div>

**NOTE** this didn't work until quite recently when Jeremy fixed it to
allow access to a variable instead of an int constant like 0

So now in the property binder, we get handed the PropertyInfo and the
IBindingContext in order to make decisions about how to piece this
value back together. For our first attempt we just used the
context.Service<IRequestData> to get access to the request data but
for the collection binding scenario what we really need is the
PrefixedRequestData that sits inside the context, so I figured it
would be ok to expose it unless for property binders to use.

https://github.com/DarthFubuMVC/fubucore/pull/31


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »