Copied to clipboard

Flag this post as spam?

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


  • Simon 692 posts 1068 karma points
    Mar 08, 2017 @ 14:12
    Simon
    0

    No Interface IUIOMaticModel

    Hi Guys,

    I have just installed the UIOMatic through nuget but when comes to inherting from IUIOMaticModel, there is no such interface.

    I have just download the latest one.

    I need this to include the validation.

    any help would be much appreciated.

  • Comment author was deleted

    Mar 08, 2017 @ 14:24

    Hey, you are probably looking at the docs for v1 (and installed v2).

    For v2 docs check out http://uiomatic.readthedocs.io/en/stable/

    No more interface we are just using data annotatation to do the validation

  • Simon 692 posts 1068 karma points
    Mar 08, 2017 @ 14:27
    Simon
    0

    Oh thank you.

    Erm,, how I can find the Muli node pocker? A content picker but can choose more than one?

    Kind regards

  • Comment author was deleted

    Mar 08, 2017 @ 14:29

    Don't think it's available out of the box so you'll need to create a custom editor view http://uiomatic.readthedocs.io/en/stable/03.CustomEditorViews/

    But I think with the recent directives in the Umbraco core it should be pretty straight forward

  • Simon 692 posts 1068 karma points
    Mar 08, 2017 @ 14:29
    Simon
    0

    AS Umbraco.MultiNodeTreePicker?

    I want for my poco to select from a list of umbraco nodes.

  • Comment author was deleted

    Mar 08, 2017 @ 14:30
  • Simon 692 posts 1068 karma points
    Mar 08, 2017 @ 14:35
    Simon
    0

    Hi Tim,

    I'm quite stuck how to implement it.

    Can you please help me out, how I can get a multinode picker?

    Thank you

    Kind Regards

  • Simon 692 posts 1068 karma points
    Mar 08, 2017 @ 15:55
    Simon
    0

    Hi Tim,

    I am using something like this:

    angular.module("umbraco").controller("MultiPicker.BusinessFeatures", function ($scope, $http) {

        $http.get("backoffice/UIOMaticMultiPickers/MultiPickers/GetAllBusinessFeatures")
        .success(function (data) {
            $scope.thing = data;
            $scope.properties = [
                {
                    view: 'contentpicker',
                    config: {
                        multiPicker: "1",
                        entityType: "Document",
                        filter: "",
                        minNumber: 0,
                        maxNumber: 5
                    },
                    value: $scope.thing.properties
                }
            ];
        })
        .error(function () {
            notificationsService.error("Error", "The Thing could not be retrieved");
        });
    

    });

    but when selecting nodes, the ids are not saving. Poco is ok because I tried with a dropdown and it is ok.

    any help would be much appreciated.

  • Comment author was deleted

    Mar 08, 2017 @ 16:02

    How does your view look, in that you need to control the property.value

  • Simon 692 posts 1068 karma points
    Mar 08, 2017 @ 16:06
    Simon
    0

    Hi Tim

    Are there an example how I can use the multinode picker to select more than one and the values will be stored as comma seperated?

    Even when you edit, then, the nodes will be pres elected, getting the ids from the database.

    Something basic like this, I assume that is quite straight forward.

    As I cannot get it working.

  • Simon 692 posts 1068 karma points
    Mar 08, 2017 @ 16:08
    Simon
    0

    Basically, I would prefer getting the list from my poco custom table rather from nodes in Umbraco. But again, I don't know how I can allow the user to select from the list, where the list is coming from another poco table.

    thank you in advance for your help.

  • Comment author was deleted

    Mar 08, 2017 @ 16:21

    If it's coming form another poco table you need to use the Radiobuttonlist field editor check the docs here http://uiomatic.readthedocs.io/en/stable/02.DefaultEditorViews/ basicly you need to set the view on your property and then add some config options, let me know if the example in the docs make sense

  • Comment author was deleted

    Mar 08, 2017 @ 16:21

    Of needs to be Checkboxlist if you need to select multiple

  • Comment author was deleted

    Mar 08, 2017 @ 16:25

    And if you want to have a selector of your poco as a property on content/media/member check out http://uiomatic.readthedocs.io/en/stable/08.PropertyEditors/

  • Simon 692 posts 1068 karma points
    Mar 08, 2017 @ 16:34
    Simon
    0

    I am getting the below error:

    Invalid JavaScript property identifier character: '. Path 'sortColumn', line 1, position 115.
    

    this is my code

    [Column("Features")] [UIOMaticField(Name = "Features", Description = "Choose business features", View = UIOMatic.Constants.FieldEditors.CheckBoxList, Config = "{'typeAlias': 'BusinessFeature', 'valueColumn': 'Id', 'textTemplate' : '{{Name}}', 'sortColumn' : 'Name', delimiter' : ';'}")] public string Features { get; set; }

  • Comment author was deleted

    Mar 08, 2017 @ 16:47

    Looks like you are missing a ' before delimiter

  • Simon 692 posts 1068 karma points
    Mar 08, 2017 @ 16:47
    Simon
    0

    Solved.

    There are an apostrophe missing for the start of the delimiter, int the documentation:

     [Column("Features")]
            [UIOMaticField(Description = "Example checkboxlist property", View = UIOMatic.Constants.FieldEditors.CheckBoxList,
             Config = "{'typeAlias': 'businessFeature', 'valueColumn': 'Id', 'textTemplate' : '{{Name}}', 'sortColumn' : 'Name', 'delimiter' : ';'}")]
            public string Checkboxlist { get; set; }
    
  • Comment author was deleted

    Mar 08, 2017 @ 17:03

    Great :) glad it's solved!

Please Sign in or register to post replies

Write your reply to:

Draft