PDA

View Full Version : Bidirectional data binding and asp .net 2



yelp
08-28-2006, 05:00 PM
Hi all.

I was wondering how the Bidirectional data binding functionallity for web pages has been changed since .NET 2.0. In previous version you had something like that: (from Spring reference):

[Binding("Text", "UserInfo.Email")]
protected TextBox email;

Currently there are no fields like that in the partial class we have access to, because current framework creates the rest of the class at compile time.

My question is, how do we set up data binding now?

Thank you in advance,
yelp

El Gringo
08-29-2006, 02:46 PM
Thats exactly my problem.
You find many examples, informations for other spring parts. But nearly nothing for spring.web .

If anyone knows a good ( I would take even a bad ;) ), I would apriciate it.

Best regards

eg

Bruno Baia
08-29-2006, 03:12 PM
Hi,



Currently there are no fields like that in the partial class we have access to, because current framework creates the rest of the class at compile time.

That's one of the reason why the BindingAttribute has been removed.


Now you need to override InitializeDataBindings method in your page code :


public partial class MyPage : Spring.Web.UI.Page
{
[...]

protected override void InitializeDataBindings()
{
BindingManager.AddBinding("email.Text" , "UserInfo.Email");
}

[...]
}


Currently, there is no official release supporting this, you need to use one of the latest nightly build (http://www.springframework.net/downloads/nightly/) until Spring.NET 1.1 Preview 3 is release.


-Bruno

yelp
08-29-2006, 04:56 PM
Hi,

Any idea when will you release this version of Spring.