Another SL3 Newbie Question...Another SL3 Newbie Question...
Old forum URL: forums.lhotka.net/forums/t/7517.aspx
Gareth posted on Thursday, August 27, 2009
Hi all, bear with me whilst I find my feet with this...
I've switched the code in my Client Side NewProductEdit method from:
var dp = new DataPortal(ProductEdit)(DataPortal.ProxyModes.LocalOnly);
to:
var dp = new DataPortal(ProductEdit)();
My server side code calls the DataPortal.Create(ProductEdit)() method, using the Object factory attribute on the class.
My data access layer is doing the following:
public Business.ProductEdit Create()
{
var result =
(Business.ProductEdit)Activator.CreateInstance(typeof(Business.ProductEdit), true);
using (BypassPropertyChecks(result))
{
result.BasePrice = new Csla.Core.MobileList(Const.PriceCountMAX);
result.SellPrice = new Csla.Core.MobileList(Const.PriceCountMAX);
result.UserDefParam = new Csla.Core.MobileList(Const.ParamCountMAX);
result.UserDefFlag = new Csla.Core.MobileList(Const.FlagCountMAX);
}
CheckRules(result);
MarkNew(result);
return result;
}
My problem is since I changed from ProxyMode.LocalOnly my SAVE and CANCEL buttons are disabled on the product form.
If I put it back to LocalOnly they work, but obviously my dataportal Create code does not fire.
Am I missing a step here?
I've check the sample projects and I can't see what's wrong.
Thanks again,
Gareth.Copyright (c) Marimer LLC