Search Results

Search found 97 results on 4 pages for 'nigel aston'.

Page 2/4 | < Previous Page | 1 2 3 4  | Next Page >

  • Server side Xforms form validation and integration into ASP.NET

    - by Nigel
    I have recently been investigating methods of creating web-based forms for an ASP.NET web application that can be edited and managed at runtime. For example an administrator might wish to add a new validation rule or a new set of fields. The holy grail would provide a means of specifying a form along with (potentially very complex) arbitrary validation rules, and allocation of data sources for each field. The specification would then be used to update the deployed form in the web application which would then validate submissions both on the client side and on the server side. My investigations led me to Xforms and a number of technologies that support it. One solution appears to be IBM Lotus Forms, but this requires a very large investment in terms of infrastructure, which makes it infeasible, although the forms designer may be useful as a stand-alone tool for creating the forms. I have also discounted browser plug-ins as the form must be publicly visible and cross-browser compliant. I have noticed that there are numerous javascript libraries that provide client side implementations given an Xforms schema. These would provide a partial solution but server side validation is still a requirement. Another option seems to involve the use of server side solutions such as the Java application Orbeon. Orbeon provides a tool for specifying the forms (although not as rich as Lotus Forms Designer), but the most interesting point is that it can translate an XForms schema into an XHTML form complete with validation. The fact that it is written in Java is not a big problem if it is possible to integrate with the existing ASP.NET application. So my question is whether anyone has done this before. It sounds like a problem that should have been solved but is inherently very complex. It seems possible to use an off-the-shelf tool to design the form and export it to an Xforms schema and xhtml form, and it seems possible to take that xforms schema and form and publish it using a client side library. What seems to be difficult is providing a means of validating the form submission on the server side and integrating the process nicely with .NET (although it seems the .NET community doesn't involve themselves with XForms; please correct me if I'm wrong on this count). I would be more than happy if a product provided something simple like a web service that could validate a submission against a schema. Maybe Orbeon does this but I'd be grateful if somebody in the know could point me in the right direction before I research it further. Many thanks.

    Read the article

  • Workflows for User Profile properties

    - by Nigel
    Hi Guys, I have a requirement from a client with regards to user profile properties. The requirement is as follows: We would like to setup custom user profile properties such that these values are editable by individuals via their my site. When a user edits this user profile property value, it should not be immediately visible to other users that happen to go to the individual's my site, but rather go through an approval workflow. If the value submitted is approved the user profile property value is updated. As far as I know this is not possible. I do have a work around for this but I want to ensure that I haven't missed anything before going down this path. Thanks in Advance

    Read the article

  • Polymorphic NHibernate mappings

    - by Ben Aston
    I have an interface IUserLocation and a concrete type UserLocation. When I use ICriteria, specifying the interface IUserLocation, I want NHibernate to instantiate a collection of the concrete UserLocation type. I have created an HBM mapping file using the table per concrete type strategy (shown below). However, when I query NHibernate using ICriteria I get: NHibernate cannot instantiate abstract class or interface MyNamespace.IUserLocation Can anyone see why this is? (source code for the relevant bit of NHibernate here (I think)) My ICriteria: var filter = DetachedCriteria.For<IUserLocation>() .Add(Restrictions.Eq("UserId", userId)); return filter.GetExecutableCriteria(UoW.Session) .List<IUserLocation>(); My mapping file: <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="true"> <class xmlns="urn:nhibernate-mapping-2.2" name="MyNamespace.IUserLocation,MyAssembly" abstract="true" table="IUserLocations"> <composite-id> <key-property name="UserId" column="UserId" type="System.Guid"></key-property> <key-many-to-one name="Location" column="LocationId" class="MyNamespace.ILocation,MyAssembly"></key-many-to-one> </composite-id> <union-subclass table="UserLocations" name="MyNamespace2.UserLocation,MyAssembly2"> <property name="IsAdmin" /> </union-subclass> </class> </hibernate-mapping>

    Read the article

  • How to make an IDisposable object a class variable?

    - by Ben Aston
    I am working with Active Directory using C#. Instantiating the PrincipalContext object seems to be expensive, so I'd like to store one in a class variable. When using PrincipalContext as a local variable, I can use the convenient using syntax. When storing an IDisposable object in a static variable, how do I ensure the object is properly disposed of?

    Read the article

  • Entity Relationship Diagramming

    - by Ben Aston
    I'd like to improve my understanding of cardinality constraints in ER diagrams. I have two entities: User Location But, I want the relationship between these two entities to be many-to-many (a user can be in many locations and a location can have many users). To do this I need to introduce an association class UserLocation. Is it correct to say I now have 3 entities? If I were to draw an ER diagam of the above, would I draw in the UserLocation entity, and would the cardinality look like this? User 1 ------ * User Location * ------ 1 Location

    Read the article

  • What happens when I subscribe to a message using NServiceBus?

    - by Ben Aston
    When I subscribe as the recipient of a certain type of message using NServiceBus Bus.Subscribe<MyMessage>() What am I actually doing? Am I specifying that a particular method on the recipient type will be invoked upon message receipt? If so, within what context does the method run - in a static context, or within the context of a new'd-up parent class instance (and if so, how does NServiceBus know what constructor to use)?

    Read the article

  • Object initializer with explicit interface in C#

    - by Ben Aston
    How can I use an object initializer with an explicit interface implementation in C#? public interface IType { string Property1 { get; set; } } public class Type1 : IType { string IType.Property1() { get; set; } } ... //doesn't work var v = new Type1 { IType.Property1 = "myString" };

    Read the article

  • ASP.NET MVC 2: Custom client side validation rule for dropdowns

    - by Nigel
    I have some custom validation that I need to perform that involves checking the selected option of a dropdown and flagging it as invalid should the user select a specific option. I am using ASP.NET MVC 2 and have a custom Validator and custom server side and client side validation rules as described in this blog article. The server side validation is working fine, however, the client side validation is failing. Here is the javascript validation rule: Sys.Mvc.ValidatorRegistry.validators["badValue"] = function(rule) { var badValue = rule.ValidationParameters["badValue"]; return function(value, context) { if (value != badValue) { return true; } return rule.ErrorMessage; }; }; The rule is being applied to the dropdowns successfully, and placing a breakpoint within the returned function confirms that the validation is firing, and that the 'badValue' is being correctly set. However, 'value' is always null, and so the check always fails. What am I doing wrong?

    Read the article

  • ASP MVC: Submitting a form with nested user controls

    - by Nigel
    I'm fairly new to ASP MVC so go easy :). I have a form that contains a number of user controls (partial views, as in System.Web.Mvc.ViewUserControl), each with their own view models, and some of those user controls have nested user controls within them. I intended to reuse these user controls so I built up the form using a hierarchy in this way and pass the form a parent view model that contains all the user controls' view models within it. For example: Parent Page (with form and ParentViewModel) -->ChildControl1 (uses ViewModel1 which is passed from ParentViewModel.ViewModel1 property) -->ChildControl2 (uses ViewModel2 which is passed from ParentViewModel.ViewModel2 property) -->ChildControl3 (uses ViewModel3 which is passed from ViewModel2.ViewModel3 property) I hope this makes sense... My question is how do I retrieve the view data when the form is submitted? It seems the view data cannot bind to the ParentViewModel: public string Save(ParentViewModel viewData)... as viewData.ViewModel1 and viewData.ViewModel2 are always null. Is there a way I can perform a custom binding? Ultimately I need the form to be able to cope with a dynamic number of user controls and perform an asynchronous submission without postback. I'll cross those bridges when I come to them but I mention it now so any answer won't preclude this functionality. Many thanks.

    Read the article

  • What's going to replace HTML & CSS & JS?

    - by Nigel Thorne
    HTML and CSS are showing their age. SASS generates CSS (because CSS isn't clean enough). Graphic Designers don't work in HTML, they work in graphics tools then have to translate it to HTML/CSS. JavaScript has to have abstractions like jQuery, and CSS has a bunch of hacks to even start approaching consistent predictable user experience. It feels like people are doing some wonderful things despite the technologies, not because of them. Surely there is a better way?!? Something more closely aligned with the task at hand.. of providing a fluid intuitive (consistent) user experience to let users achieve their goals. Thoughts?

    Read the article

  • How to treat an instance variable as an instance of another type in C#

    - by Ben Aston
    I have a simple inheritance heirarchy with MyType2 inheriting from MyType1. I have an instance of MyType1, arg, passed in as an argument to a method. If arg is an instance of MyType2, then I'd like to perform some logic, transforming the instance. My code looks something like the code below. Having to create a new local variable b feels inelegant - is there a way of achieving the same behavior without the additional local variable? public MyType1 MyMethod(MyType1 arg) { if(arg is MyType2) { MyType2 b = arg as MyType2; //use b (which modifies "arg" as "b" is a reference to it)... } return arg; }

    Read the article

  • Alternatives to web.config files in ASP.NET

    - by Ben Aston
    In my experience, web.config files are widely reviled. In particular, I have found them difficult to manage when you have multiple environments to support, and fiddly to update due to the lack of validation at update-time and the verbosity of XML. What are the alternatives?

    Read the article

  • Sql server table can be queried but not updated

    - by Nigel
    i have a table which was always updatable before, but then suddenly i can no longer update the any of the columns in the table. i can still query the whole table and the results come back very fast, but the moment i try to update a column in the table, the update query simply stalls and does nothing. i tried using select req_transactionUOW from master..syslockinfo where req_spid = -2 to see if some orphaned transaction was locking the table, but it returns no results. i can't seems to find signs of my table being locked, but simply cannot update it. any clues as to how to fix the table or whatever state it is in?

    Read the article

  • When should I stub out a type by manually creating a "stub" version, rather than using a mocking fra

    - by Ben Aston
    Are there any circumstances where it is favourable to manually create a stub type, as opposed to using a mocking framework (such as Rhino Mocks) at the point of test. We take both these approaches in our projects. My gut feel when I look at the long list of stub versions of objects is that it will add maintenance overhead, and moves the implementation of the stub away from the point of test.

    Read the article

  • Will the following NHibernate interface mapping work?

    - by Ben Aston
    I'd like to program against interfaces when working with NHibernate due to type dependency issues within the solution I am working with. SO questions such as this indicate it is possible. I have an ILocation interface and a concrete Location type. Will the following work? HBM mapping: <class name="ILocation" abstract="true" table="ILocation"> <id name="Id" type="System.Guid" unsaved-value="00000000-0000-0000-0000-000000000000"> <column name="LocationId" /> <generator class="guid" /> </id> <union-subclass table="Location" name="Location"> <property name="Name" type="System.String"/> </union-subclass> </class> Detached criteria usage using the interface: var criteria = DetachedCriteria.For<ILocation>().Add(Restrictions.Eq("Name", "blah")); var locations = criteria.GetExecutableCriteria(UoW.Session).List<ILocation>(); Are there any issues with not using the hilo ID generator and/or with this approach in general?

    Read the article

  • Why does Microsoft Windows' performance appear to degrade over time?

    - by Ben Aston
    Windows XP/2k3 and earlier (can't attest to Vista, but suspect it's the same) all appear to become more sluggish over time as applications are installed and uninstalled. This is not a scientifically tested observation, but more of a learned-through-experience piece of wisdom. (I've always suspected the registry as being behind the issue.) Does anyone have any concrete evidence of this degradation occurring, or it just an invalid perception of mine?

    Read the article

  • ASP MVC 2 : Custom display of a required form element based on ModelMetaData

    - by Nigel
    I have an MVC 2 application that utilises forms. The required fields within the form are set using attributes that update the model metadata. The form fields are created using the MVC HtmlHelper method : Html.EditorFor. This works fine so far as validation is concerned, but it seems that by default the required fields are not displayed to the user (for example by appending a * to the control). If I wanted to provide some custom means of displaying this fact to the user (lets immagine I want to change the background colour of the edit control for example), where is the best place to do it. Would I need to create a custom html helper to replace EditorFor? I tried but it seemed difficult to gain access to the metadata for the correct property. I already have a custom ModelMetaDataProvider so there is no problem adding it there if that is the correct place.

    Read the article

< Previous Page | 1 2 3 4  | Next Page >