Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Marshall Penn 23 posts 123 karma points
    Jun 13, 2017 @ 09:03
    Marshall Penn
    0

    UIOMatic dropdown - Value and sort column not populated

    I am using Umbraco 7.6.3 and UI-O-Matic seems to works fine so far - however when I choose "UIOMatic dropdown" for a Document Type Property, the "Value property" and "Column to sort on" do not populate with any of the objects fields when I am in the Document Type Dialog. They do show up if I go to Developer - Property Types.

    However when i select a Person, when i am on a page the person is not saved - What am i doing wrong, do you think?

    Here is my Person class:

    [UIOMatic("people", "People", "Person", FolderIcon = "icon-users", ItemIcon = "icon-user", RenderType = UIOMaticRenderType.List)]
    [TableName("People")]
    public class Person {
        [PrimaryKeyColumn(AutoIncrement = true)]
        public int Id { get; set; }
    
        [Required]
        [UIOMaticListViewField(Name = "First name", View = UIOMatic.Constants.FieldViews.Label)]
        [UIOMaticField(Name = "First name", Description = "Enter the persons first name", View = UIOMatic.Constants.FieldEditors.Textfield)]
        public string FirstName { get; set; }
    
        [Required]
        [UIOMaticListViewField(Name = "Last name", View = UIOMatic.Constants.FieldViews.Label)]
        [UIOMaticField(Name = "Last name", Description = "Enter the persons last name", View = UIOMatic.Constants.FieldEditors.Textfield)]
        public string LastName { get; set; }
    
        [UIOMaticField(Name = "Picture", Description = "Select a picture", View = UIOMatic.Constants.FieldEditors.File)]
        public string Picture { get; set; }
    
        [UIOMaticField(Name = "Biog", Description = "Enter the persons biography", View = UIOMatic.Constants.FieldEditors.Rte)]
        public string Biog { get; set; }
    
        [UIOMaticListViewField(Name = "Job title", View = UIOMatic.Constants.FieldViews.Label)]
        [UIOMaticField(Name = "Job title", Description = "Enter the persons job title", View = UIOMatic.Constants.FieldEditors.Dropdown, Config = "{'typeAlias': 'titles','valueColumn': 'Id','sortColumn': 'Name','textTemplate' : '{{Name}}'}")]
        public int JobTitle { get; set; }
    
        public override string ToString() {
            return FirstName + " " + LastName;
        }
    
    }
    
Please Sign in or register to post replies

Write your reply to:

Draft