Search Results

Search found 574 results on 23 pages for 'ria'.

Page 10/23 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Silverlight using WCF Ria with POCOS gives edit operation error

    - by JD
    Hi, I have converted an Entity framework project to use POCO objects by removing the entity data model and the domain service and meta data classes. My silverlight project works as it is showing a datagrid of Employee objects. I have not added a DataForm and when I modify the "name" property of one of my Employee objects, I get the error: This EntitySet of type 'TestEmployeesApp.Web.Employee' does not support the 'Edit' operation. The error occurs on validatingProperty() on the class Entity on the client side. I checked the metadata on the server side, and all my properties have the attribute Editable(true). I am using Silverlight 3 with VS2008. JD

    Read the article

  • IEditableCollectionView.AddNew() Throwing ArgumentNullException

    - by Eugarps
    In the context of Silverlight RIA using DomainContext and, the code as follows: private void AddProductButton_Click(object sender, RoutedEventArgs e) { var target = (Web.LocatorProduct)((IEditableCollectionView)ProductSource.DataView).AddNew(); target.Locator = LocatorID; target.Product = NewProduct.Text.ToUpper(); ((IEditableCollectionView)ProductSource.DataView).CommitNew(); } Is throwing ArgumentNullException in AddNew(), CreateIdentity() further up on the stack (a generated method) due to product being null. Product and LocatorID are, in combination, the primary key. I'm guessing that EF is not allowing me to generate a new item without meeting database contraints? How does this make sense if I need to obtain a primary key from the user? I have control over all tiers of the application, so suggestions on database design if needed are also welcomed.

    Read the article

  • Silverlight and WCF Ria Services

    - by Flex_Addicted
    Hi guys, I've created a new Silverlight 3 Business Application with VS 2008. The creation has completed correctly. When I try to open the xaml, it opens but in meanwhile this error is shown: Failed to load metadata assembly System.Windows.Controls.Data.Input.Design, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Exception message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.. Stack Trace: at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark) at System.Reflection.Assembly.GetTypes() at MS.Internal.Package.MetadataLoader.RegisterDesignTimeMetadata(Assembly assembly, LogCallback logger)An exception of type ArgumentNullException was caught when calling IRegisterMetadata on type System.Windows.Controls.Data.Input.VisualStudio.Design.MetadataRegistration. Exception Message: Value cannot be null. Parameter name: type. Stack Trace: at Microsoft.Windows.Design.Metadata.AttributeTableBuilder.AddCallback(Type type, AttributeCallback callback) at System.Windows.Controls.Data.Input.VisualStudio.Design.MetadataRegistration.AddAttributes(AttributeTableBuilder builder) at System.Windows.Controls.Design.Common.MetadataRegistrationBase.BuildAttributeTable() at System.Windows.Controls.Data.Input.VisualStudio.Design.MetadataRegistration.Register() at MS.Internal.Package.MetadataLoader.RegisterDesignTimeMetadata(Assembly assembly, LogCallback logger)Failed to load metadata assembly System.Windows.Controls.Design, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Exception message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.. Stack Trace: at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark) at System.Reflection.Assembly.GetTypes() at MS.Internal.Package.MetadataLoader.RegisterDesignTimeMetadata(Assembly assembly, LogCallback logger)Failed to load metadata assembly System.Windows.Controls.Navigation.Design, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Exception message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.. Stack Trace: at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark) at System.Reflection.Assembly.GetTypes() at MS.Internal.Package.MetadataLoader.RegisterDesignTimeMetadata(Assembly assembly, LogCallback logger) Why? Any solutions? Thank you in advance.

    Read the article

  • Custom RIA Authentication

    - by cmaduro
    Following the steps in this post: http://forums.silverlight.net/forums/t/177042.aspx Where/How do I add the [Key] attribute on the Name property of the IAuthentication where User is one of my ADO.Net Entity objects? My options so far seem to be: In the designer codebehind of me ADO.Net Entity Model. Create a partial User class and add it there In the AuthenticationService.metadata.cs partial User class. It just does not seem to work no matter where I place the [Key] attribute.

    Read the article

  • Removing entity bug

    - by Greg
    hello, I am trying out the ria services and I am experiencing this problem that seems very strange to me. I am creating a new entity of type "House" and add it to context without saving the context so the id of the new entity is 0, after i remove this entity and add another new entity of type "House" again and again without saving the context, here comes the weird part, now I have an entity of type "City" which holds entityset of all "Houses" in that city, so to put the newly created entity "House" into the city i do something like this - house.City = city, where house is type "House" and city is type "City", afte this step a check the context and suddenly there are 2 entities of type "House" with id 0, one of them is the one I have deleted at the beginning. Any idea what is causing this and how to fix it?? thank you Greg

    Read the article

  • How to implement a lazy loaded Silverlight data grid without using paging

    - by Marc Wittke
    Using the Business Application template from the brand new released RIA Services, you can see lots of examples using the data grid on top of a DomainDataSource in combination with a DataPager. The properties PageSize and LoadSize can be used to adjust the amount of data to be displayed in one page and the data that is prefetched in the background. Now I'd like to have a data grid with a scrollbar and no pager. The underlying DomainDataSource should load only the data that is diplayed in the grid. It should trigger another load, when the user scrolls down to items that are not yet in the data context. Is there any sample implementation how to do this?

    Read the article

  • Silverlight dataGrid binding with ria Service doesn' work

    - by Abdulrhman
    hi every one i'm new to Silverlight and it's totally driving me crazy !! i'm using SL4 and trying to bind datagrid with a Domain Service Query: what i did exactly is i generate an ado.net entity model from my database, then create a domain Service class from this model. then in my page i put Datagrid & button. in the click event for this button i write this code: RRDomainContext rr = new RRDomainContext(); this.dataGrid1.ItemsSource = rr.Rooms; this.rr.Load(this.rr.GetRoomsQuery()); when this method executed the nothing changed at the datagrid. can anyone help me with this ?

    Read the article

  • Entity Framework insert error ("The Version field is required.")

    - by Graham
    I am using Silverlight 4 and RIA services. When I try to insert into my database, I get the following error: "Submit operation failed validation. Please inspect Entity.ValidationErrors for each entity in EntitiesInError for more information." Upon inspecting the ValidationErrors, I see: "The Version field is required." Isn't the Version field updated and maintained by the framework? If so, why is it null? If not, how am I supposed to set it?

    Read the article

  • FlashBuilder4 RIA on GAE

    - by user330195
    I've read/watched most of your blog/tuts and it seems you are the "beautiful front-ends for Java based back-ends" guru ;) That (sucking up ;) said, I want to build a highly scalable "facebook for business" and after much testing am pretty set on FlashBuilder4 (Flex) with Google App Engine (GAE). What are your thoughts on the need/advisability of also using Spring/Cairngorm/etc frameworks? Frankly I don't have extensive experience coding, however feel the "MVC utopia" universally aspired to becomes convoluting when duplicating between front and back ends as envisioned above (i.e. Flex/ActionScript and GAE/Java respectively).

    Read the article

  • Why is it so hard to share resource files (resx) with my Silverlight client?

    - by Jordan
    I'm trying to share a resource file (.resx file) from my web (RIA Service?Silverlight Host) to client (Silverlight) by linking the resource file into my client. When I try to access resources using the ResourceManager object I get the following error: System.Resources.MissingManifestResourceException was caught Message=Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "PPCa.Modules.ProjectManager.Client.ViewModels.ResourceStrings.resources" was correctly embedded or linked into assembly "PPCa.Modules.ProjectManager.Client" at compile time, or that all the satellite assemblies required are loadable and fully signed. StackTrace: at System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(String fileName) at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark) at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark) at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) at System.Resources.ResourceManager.GetString(String name, CultureInfo culture) at System.Resources.ResourceManager.GetString(String name) at PPCa.Modules.ProjectManager.Web.Helpers.ResourceHelper.GetEnumText[TResource](ProjectStatus a_projectStatus) InnerException: Edit: When I say I was linking the resource file, I mean I am using the 'Add as Link' option when adding the existing resx file to my project.

    Read the article

  • Touch Screen Product Catalog for Retail Store

    - by Patrick
    I am a UI/UX designer and I would like to create kiosk type of app that would be a product catalog (help/suggestor) for customers in a retail store using a touch screen monitor (and computer). Something as simple as this: http://www.youtube.com/watch?v=aoH0u6YTTK4 This is what I would like it to do: 1st Screen (Main Menu): Pick a type of category (For example: Dog, Cat, Small Animal) 2nd Screen pick a sub-category of a main category (For example: Puppy, Adult, Senior - DOG) 3rd Screen pick a sub-category of previous sub-category (For example: Food, Healthy, Toys) Then it will display a list of all products with a picture, small description, and price. Thats it. So the point of the kiosk is to help customers find certain products that match their pet criteria. (Dog Puppy Healthy Dog Food) I am wondering what is the best solution: RIA (Flex/Air or Silveright) or flash/action script. I am not sure what is the best technology to use for the following benefits: user-experience (smoothness of touch screen actions) and fast development.

    Read the article

  • Using Linq to filter parents by their children

    - by Nick L
    Having some problems with my Silverlight app (with RIA services) filtering my results. The idea is on the client I set up the EntityQuery and its filters and call load. However this isn't working for me. Heres my code. public void FireQuery(string filterValue) { EntityQuery<Parent> query = m_ParentDomainContext.GetParentQuery(); query = query.Where(p => p.Children.Any(c => c.Name.Contains(filterValue))); m_ParentDomainContext.Load(query, Query_Completed, null); } Compiles just fine, however, runtime I get "Query operator 'Any' is not supported." Exception. Does anyone know of a good way to filter like this? Again, I'm looking for a way to set this up on the client.

    Read the article

  • The "CreateRiaClientFilesTask" task failed unexpectedly.

    - by Mohammadreza
    Hi guys. I've VS 2010 and recently installed WCF RIA Services V1.0. For testing I have created a new Silverligh Business project but now every now and then when I rebuild the solution I receive the following error: Does anybody know why I get this? Thanks Error 1 The "CreateRiaClientFilesTask" task failed unexpectedly. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ServiceModel.DomainServices.Tools, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.ServiceModel.DomainServices.Tools, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) at System.Type.GetType(String typeName, Boolean throwOnError) at System.Web.Hosting.HostingEnvironment.CreateWellKnownObjectInstance(String assemblyQualifiedName, Boolean failIfExists) at System.Web.Hosting.HostingEnvironment.CreateWellKnownObjectInstance(String assemblyQualifiedName, Boolean failIfExists) at System.Web.Hosting.ApplicationManager.CreateObjectInternal(String appId, Type type, IApplicationHost appHost, Boolean failIfExists, HostingEnvironmentParameters hostingParameters) at System.Web.Hosting.ApplicationManager.CreateObjectInternal(String appId, Type type, IApplicationHost appHost, Boolean failIfExists) at System.Web.Compilation.ClientBuildManager.CreateObject(Type type, Boolean failIfExists) at Microsoft.ServiceModel.DomainServices.Tools.CreateRiaClientFilesTask.CreateSharedTypeService(ClientBuildManager clientBuildManager, IEnumerable`1 serverAssemblies, ILogger logger) at Microsoft.ServiceModel.DomainServices.Tools.CreateRiaClientFilesTask.GenerateClientProxies() at Microsoft.ServiceModel.DomainServices.Tools.CreateRiaClientFilesTask.ExecuteInternal() at Microsoft.ServiceModel.DomainServices.Tools.RiaClientFilesTask.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. BusinessApplication2

    Read the article

  • How do I use DomainContext.Load in my ViewModel?

    - by kristian
    I'm trying to use RIA services to provide data to my Silverlight application by calling DomainContext.Load to retrieve a collection of widgets. I want to expose this collection through a property of the ViewModel so I can bind a control to the collection in my page. I think my approach must be fundamentally wrong because Load is called asynchronously and is therefore not available when my page loads and the control tried to bind. Can someone please show me the right way to do this? My Silverlight page has the following XAML: <navigation:Page x:Class="Demo.UI.Pages.WidgetPage" // the usual xmlns stuff here... xmlns:local="clr-namespace:Demo.UI.Pages" mc:Ignorable="d" xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" d:DataContext="{d:DesignInstance Type=local:WidgetPageModel, IsDesignTimeCreatable=False}" d:DesignWidth="640" d:DesignHeight="480" Title="Widget Page"> <Canvas x:Name="LayoutRoot"> <ListBox ItemsSource="{Binding RedWidgets}" Width="150" Height="500" /> </Canvas> </navigation:Page> My ViewModel looks like this: public class WidgetPageModel { private WidgetDomainContext WidgetContext { get; set; } public WidgetPageModel() { this.WidgetContext = new WidgetDomainContext(); WidgetContext.Load(WidgetContext.GetAllWidgetsQuery(), false); } public IEnumerable<Widget> RedWidgets { get { return this.WidgetContext.Widgets.Where(w => w.Colour == "Red"); } } }

    Read the article

  • should I use Entity Framework instead of raw ADO.NET

    - by user110182
    I am new to CSLA and Entity Framework. I am creating a new CSLA / Silverlight application that will replace a 12 year old Win32 C++ system. The old system uses a custom DCOM business object library and uses ODBC to get to SQL Server. The new system will not immediately replace the old system -- they must coexist against the same database for years to come. At first I thought EF was the way to go since it is the latest and greatest. After making a small EF model and only 2 CSLA editable root objects (I will eventually have hundreds of objects as my DB has 800+ tables) I am seriously questioning the use of EF. In the current system I have the need many times to do fine detail performance tuning of the queries which I can do because of 100% control of generated SQL. But it seems in EF that so much happens behind the scenes that I lose that control. Article like http://toomanylayers.blogspot.com/2009/01/entity-framework-and-linq-to-sql.html don't help my impression of EF. People seem to like EF because of LINQ to EF but since my criteria is passed between client and server as criteria object it seems like I could build queries just as easily without LINQ. I understand in WCF RIA that there is query projection (or something like that) where I can do client side LINQ which does move to the server before translation into actual SQL so in that case I can see the benefit of EF, but not in CSLA. If I use raw ADO.NET, will I regret my decision 5 years from now? Has anyone else made this choice recently and which way did you go?

    Read the article

  • IDataServiceMetadataProvider - Entities dont show up in $metadata.

    - by TomTom
    I am trying to write our own RIA services provider to expose data from a server that I access via ODBC. I follow th eguidelines set out at http://blogs.msdn.com/alexj/archive/2010/03/02/creating-a-data-service-provider-part-9-un-typed.aspx I have written our own IDataServiceMetadataProvider / IDataServiceQueryProvider pair and get no errors on what i do. I am putting in a resource set like this: ResourceType tableType = new ResourceType( typeof(Dictionary<string, object>), ResourceTypeKind.EntityType, null, "Martini", table_name, false ); tableType.CanReflectOnInstanceType = false; var prodKey = new ResourceProperty( "Key", ResourcePropertyKind.Key | ResourcePropertyKind.Primitive, ResourceType.GetPrimitiveResourceType(typeof(int)) ); prodKey.CanReflectOnInstanceTypeProperty = false; tableType.AddProperty(prodKey); var prodName = new ResourceProperty( "Name", ResourcePropertyKind.Primitive, ResourceType.GetPrimitiveResourceType(typeof(string)) ); prodName.CanReflectOnInstanceTypeProperty = false; tableType.AddProperty(prodName); _MetaDataProvider.AddResourceType(tableType); _MetaDataProvider.AddResourceSet(new ResourceSet(table_name, tableType)); I see the requests coming in for enumerating the resource sets. I check them there in a breakpoint, and the resource set and the type is there, with all properties. Still, the output I get is: <?xml version="1.0" encoding="utf-8" standalone="yes" ?> - <service xml:base="http://localhost:2377/MartiniData.svc/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app"> - <workspace> <atom:title>Default</atom:title> </workspace> </service> And for the $metadata version: <?xml version="1.0" encoding="utf-8" standalone="yes" ?> - <edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"> - <edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:DataServiceVersion="1.0"> - <Schema Namespace="Martini" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://schemas.microsoft.com/ado/2007/05/edm"> <EntityContainer Name="Martini" m:IsDefaultEntityContainer="true" /> </Schema> </edmx:DataServices> </edmx:Edmx> The actual metadata for the types never shows up, no error is shown. pretty frustrating. Anyone any idea?

    Read the article

  • View bound to paged collection view not updating all of the time.

    - by Thomas
    I new to silverlight and trying to make a business application using the mvvm pattern and ria services. I have a view model class that contains a PagedCollectoinView and it is set to the item source of a datagrid. When I update the PagedCollectionView the datagrid is only updated the first time then after that subsequent changes to the data to not reflect in the view until after another edit. Things seem to be delayed one edit. Below is a summarized example of my xaml and code behind. This is the code for my view model public class CustomerContactLinks : INotifyPropertyChanged { private ObservableCollection<CustomerContactLink> _CustomerContact; public ObservableCollection<CustomerContactLink> CustomerContact { get { if (_CustomerContact == null) _CustomerContact = new ObservableCollection<CustomerContactLink>(); return _CustomerContact; } set { _CustomerContact = value; } } private PagedCollectionView _CustomerContactPaged; public PagedCollectionView CustomerContactPaged { get { if (_CustomerContactPaged == null) _CustomerContactPaged = new PagedCollectionView(CustomerContact); return _CustomerContactPaged; } } private TicketSystemDataContext _ctx; public TicketSystemDataContext ctx { get { if (_ctx == null) _ctx = new TicketSystemDataContext(); return _ctx; } } public void GetAll() { ctx.Load(ctx.GetCustomerContactInfoQuery(), LoadCustomerContactsComplete, null); } private void LoadCustomerContactsComplete(LoadOperation<CustomerContactLink> lo) { foreach (var entity in lo.Entities) { CustomerContact.Add(entity as CustomerContactLink); } } #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; private void RaisePropertyChanged(string propertyName) { if (PropertyChanged != null) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } #endregion } Here is the basics of my XAML <Data:DataGrid x:Name="GridCustomers" MinHeight="100" MaxWidth="1000" IsReadOnly="True" AutoGenerateColumns="False"> <Data:DataGrid.Columns> <Data:DataGridTextColumn Header="First Name" Binding="{Binding Customer.FirstName}" Width="105" /> <Data:DataGridTextColumn Header="MI" Binding="{Binding Customer.MiddleName}" Width="35" /> <Data:DataGridTextColumn Header="Last Name" Binding="{Binding Customer.LastName}" Width="105"/> <Data:DataGridTextColumn Header="Address1" Binding="{Binding Contact.Address1}" Width="130"/> <Data:DataGridTextColumn Header="Address2" Binding="{Binding Contact.Address2}" Width="130"/> <Data:DataGridTextColumn Header="City" Binding="{Binding Contact.City}" Width="110"/> <Data:DataGridTextColumn Header="State" Binding="{Binding Contact.State}" Width="50"/> <Data:DataGridTextColumn Header="Zip" Binding="{Binding Contact.Zip}" Width="45"/> <Data:DataGridTextColumn Header="Home" Binding="{Binding Contact.PhoneHome}" Width="85"/> <Data:DataGridTextColumn Header="Cell" Binding="{Binding Contact.PhoneCell}" Width="85"/> <Data:DataGridTextColumn Header="Email" Binding="{Binding Contact.Email}" Width="118"/> </Data:DataGrid.Columns> </Data:DataGrid> <DataForm:DataForm x:Name="CustomerDetails" Header="Customer Details" AutoGenerateFields="False" AutoEdit="False" AutoCommit="False" CommandButtonsVisibility="Edit" Width="1000" Margin="0,5,0,0"> <DataForm:DataForm.EditTemplate> </DataForm:DataForm.EditTemplate> </DataForm:DataForm> And here is my code behind public Customers() { InitializeComponent(); BusyDialogIndicator.IsBusy = true; Loaded += new RoutedEventHandler(Customers_Loaded); CustomerDetails.BeginningEdit += new EventHandler(CustomerDetails_BeginningEdit); } void CustomerDetails_BeginningEdit(object sender, System.ComponentModel.CancelEventArgs e) { CustomerContacts.CustomerContactPaged.EditItem(CustomerDetails.CurrentItem); } private void Customers_Loaded(object sender, RoutedEventArgs e) { CustomerContacts = new CustomerContactLinks(); CustomerContacts.GetAll(); GridCustomers.ItemsSource = CustomerContacts.CustomerContactPaged; GridCustomerPager.Source = CustomerContacts.CustomerContactPaged; GridCustomers.SelectionChanged += new SelectionChangedEventHandler(GridCustomers_SelectionChanged); BusyDialogIndicator.IsBusy = false; } void GridCustomers_SelectionChanged(object sender, SelectionChangedEventArgs e) { CustomerDetails.CurrentItem = GridCustomers.SelectedItem as CustomerContactLink; } private void SaveChanges_Click(object sender, RoutedEventArgs e) { if (WebContext.Current.User.IsAuthenticated) { bool commited = CustomerDetails.CommitEdit(); if (commited && (!CustomerDetails.IsItemChanged && CustomerDetails.IsItemValid)) { CustomerContacts.Update(CustomerDetails.CurrentItem as CustomerContactLink); CustomerContacts.ctx.SubmitChanges(); CustomerContacts.CustomerContactPaged.CommitEdit(); CustomerContacts.CustomerContactPaged.Refresh(); (GridCustomers.ItemsSource as PagedCollectionView).Refresh(); } } }

    Read the article

  • Tests unitaires d'un DomainService WCF RIA : pattern Repository, un tutoriel de Kyle McClellan, traduit par Deepin Prayag

    Citation: Étant donné que WCF RIA Services emploie un « pipeline pattern » pour invoquer vos opérations DomainService, il n'est pas toujours évident de savoir comment les tester. Dans cette série d'articles nous allons voir un petit DomainService et comment le tester. Entre autres nous allons voir comment implémenter une IDomainServiceFactory personnalisée, comment implémenter le pattern Repository, et comment utiliser la DomainServiceTestHos...

    Read the article

  • GWT (Google Web Toolkit) - Développez des Applications Internet Riches (RIA) en Java de Damien Picard, critique par Benwit

    Je viens de lire le 3° ouvrage sur GWT en français, celui de Damien PICARD aux éditions ENI. [IMG]http://images-eu.amazon.com/images/P/2746058308.08.LZZZZZZZ.jpg[/IMG] Citation: Ce livre sur GWT (Google Web Toolkit) s'adresse aux développeurs Java souhaitant créer des applications RIA sans passer par JavaScript ou aux développeurs web confirmés (JavaScript/XHTML/CSS) désireux de disposer d'un framework décuplant leur productiv...

    Read the article

  • Silverlight 4 Overriding the DataForm Autogenerate to insert Combo Boxes bound to Converters.

    - by kmacmahon
    I've been working towards a solution for some time and could use a little help. I know I've seen an example of this before, but tonight I cannot find anything close to what I need. I have a service that provides me all my DropDownLists, either from Cache or from the DomainService. They are presented as IEnumerable, and are requested from the a repository with GetLookup(LookupId). I have created a custom attribute that I have decorated my MetaDataClass that looks something like this: [Lookup(Lookup.Products)] public Guid ProductId I have created a custom Data Form that is set to AutoGenerateFields and I am intercepting the autogenerate fields. I am checking for my CustomAttribute and that works. Given this code in my CustomDataForm (standard comments removed for brevity), what is the next step to override the field generation and place a bound combobox in its place? public class CustomDataForm : DataForm { private Dictionary<string, DataField> fields = new Dictionary<string, DataField>(); public Dictionary<string, DataField> Fields { get { return this.fields; } } protected override void OnAutoGeneratingField(DataFormAutoGeneratingFieldEventArgs e) { PropertyInfo propertyInfo = this.CurrentItem.GetType().GetProperty(e.PropertyName); foreach (Attribute attribute in propertyInfo.GetCustomAttributes(true)) { LookupFieldAttribute lookupFieldAttribute = attribute as LookupFieldAttribute; if (lookupFieldAttribute != null) { // Create a combo box. // Bind it to my Lookup IEnumerable // Set the selected item to my Field's Value // Set the binding two way } } this.fields[e.PropertyName] = e.Field; base.OnAutoGeneratingField(e); } } Any cited working examples for SL4/VS2010 would be appreciated. Thanks

    Read the article

  • Need help understanding Generics, How To Abstract Types Question.

    - by kmacmahon
    I could use some really good links that explain Generics and how to use them. But I also have a very specific question, relater to working on a current project. Given this class constructor: public class SecuredDomainViewModel<TDomainContext, TEntity> : DomainViewModel<TDomainContext, TEntity> where TDomainContext : DomainContext, new() where TEntity : Entity, new() And its creation this way: DomainViewModel d; d = new SecuredDomainViewModel<MyContext, MyEntityType>(this.context, selectedProtectedItem); Assuming I have 20 EntityTypes within MyContext, is there any easier way to call the constructor without a large switch statement? Also, since d is DomainViewModel and I want to access methods for SecuredDomainViewModel, it seems I need to do this: if (((SecuredDomainViewModel<MyContext, MyEntityType>)d).IsBusy) But again "MyEntityType" could actually be one of 20 types. Is there anyway to write these types of statements where MyEntityType is returned from some sort of Reflection?

    Read the article

  • Need help understanding Generics, How To Abstract Types Question.

    - by kmacmahon
    I could use some really good links that explain Generics and how to use them. But I also have a very specific question, relater to working on a current project. Given this class constructor: public class SecuredDomainViewModel<TDomainContext, TEntity> : DomainViewModel<TDomainContext, TEntity> where TDomainContext : DomainContext, new() where TEntity : Entity, new() public SecuredDomainViewModel(TDomainContext domainContext, ProtectedItem protectedItem) : base(domainContext) { this.protectedItem = protectedItem; } And its creation this way: DomainViewModel d; d = new SecuredDomainViewModel<MyContext, MyEntityType>(this.context, selectedProtectedItem); Assuming I have 20 different EntityTypes within MyContext, is there any easier way to call the constructor without a large switch statement? Also, since d is DomainViewModel and I later need to access methods from SecuredDomainViewModel, it seems I need to do this: if (((SecuredDomainViewModel<MyContext, MyEntityType>)d).CanEditEntity) But again "MyEntityType" could actually be one of 20 diffent types. Is there anyway to write these types of statements where MyEntityType is returned from some sort of Reflection?

    Read the article

  • FileReference.load() does not as excepted

    - by Yang Bo
    I used Flash player 10, and Flex SDK 3.4. The code as followings: // Following comes callbacks function imageLoadOpenCallback(evt:Event):void { trace("in--open"); } function imageLoadCompleteCallback(evt:Event):void { trace("in--load"); var fr:FileReference = evt.target as FileReference; trace(fr.data); } function imageLoadErrorCallback(evt:IOErrorEvent):void { trace("in--ioerror"); } function imageSelectCancelCallback(evt:Event):void { trace("in cancel"); } function imageSelectCallback(evt:Event):void { trace("in -- select"); for (var i:int=0; i<frl.fileList.length; i++) { frl.fileList[i].addEventListener(Event.OPEN, imageLoadOpenCallback); frl.fileList[i].addEventListener(Event.COMPLETE, imageLoadCompleteCallback); frl.fileList[i].addEventListener(IOErrorEvent.IO_ERROR, imageLoadErrorCallback); frl.fileList[i].load(); trace(frl.fileList[i]); trace(frl.fileList[i].creationDate); trace(frl.fileList[i].creator); trace(frl.fileList[i].data); trace(frl.fileList[i].name); } } // Following comes UI handlers function onAddPictures():void { var imageFilter:FileFilter = new FileFilter("Images", "*.jpg;*.png"); frl.addEventListener(Event.SELECT, imageSelectCallback); frl.addEventListener(Event.CANCEL, imageSelectCancelCallback); frl.browse([imageFilter]); } Only the imageSelectCancelCallback handler get called when I select some files in the dialog. But no load/open/io_error handler get called at all. I have Google some code example, in which it used FileReference instead of FileReferenceList. I don't know the reason, could you please help me?

    Read the article

  • Silverlight 4 race condition with DataGrid master details control

    - by Simon_Weaver
    Basically I want a DataGrid (master) and details (textbox), where DataGrid is disabled during edit of details (forcing people to save/cancel)... Here's what I have... I have a DataGrid which serves as my master data. <data:DataGrid IsEnabled="{Binding CanLoad,ElementName=dsReminders}" ItemsSource="{Binding Data, ElementName=dsReminders}" > Its data comes from a DomainDataSource: <riaControls:DomainDataSource Name="dsReminders" AutoLoad="True" ... I have a bound Textbox which is the 'details' (very simple right now). There are buttons (Save/Cancel) which should be enabled when user tries to edit the text. Unfortunately Silverlight doesn't support UpdateSourceTrigger=PropertyChanged so I have to raise an event: <TextBox Text="{Binding SelectedItem.AcknowledgedNote, Mode=TwoWay, UpdateSourceTrigger=Explicit, ElementName=gridReminders}" TextChanged="txtAcknowledgedNote_TextChanged"/> The event to handle this calls BindingExpression.UpdateSource to update the source immediately: private void txtAcknowledgedNote_TextChanged(object sender, TextChangedEventArgs e) { BindingExpression be = txtAcknowledgedNote.GetBindingExpression(TextBox.TextProperty); be.UpdateSource(); } IN other words - typing in the textbox causes CanLoad of the DomainDataSource to become False (because we're editing). This in turn disables the DataGrid (IsEnabled is bound to it) and enables 'Cancel' and 'Save' buttons. However I'm running up against a race condition if I move quickly through rows in the DataGrid (just clicking random rows). The TextChanged presumably is being called on the textbox and confusing the DomainDataSource which then thinks there's been a change. So how should I disable the DataGrid while editing without having the race condition? One obvious solution would be to use KeyDown events to trigger the call to UpdateSource but I always hate having to do that.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >