Copied to clipboard

Flag this post as spam?

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


  • Simon 687 posts 1062 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.

  • Tim Geyssens 6419 posts 15020 karma points MVP 2x c-trib
    Mar 08, 2017 @ 14:24
    Tim Geyssens
    0

    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 687 posts 1062 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

  • Tim Geyssens 6419 posts 15020 karma points MVP 2x c-trib
    Mar 08, 2017 @ 14:29
    Tim Geyssens
    0

    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 687 posts 1062 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.

  • Tim Geyssens 6419 posts 15020 karma points MVP 2x c-trib
    Mar 08, 2017 @ 14:30
  • Simon 687 posts 1062 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 687 posts 1062 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.

  • Tim Geyssens 6419 posts 15020 karma points MVP 2x c-trib
    Mar 08, 2017 @ 16:02
    Tim Geyssens
    0

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

  • Simon 687 posts 1062 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 687 posts 1062 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.

  • Tim Geyssens 6419 posts 15020 karma points MVP 2x c-trib
    Mar 08, 2017 @ 16:21
    Tim Geyssens
    0

    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

  • Tim Geyssens 6419 posts 15020 karma points MVP 2x c-trib
    Mar 08, 2017 @ 16:21
    Tim Geyssens
    0

    Of needs to be Checkboxlist if you need to select multiple

  • Tim Geyssens 6419 posts 15020 karma points MVP 2x c-trib
    Mar 08, 2017 @ 16:25
    Tim Geyssens
    0

    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 687 posts 1062 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; }

  • Tim Geyssens 6419 posts 15020 karma points MVP 2x c-trib
    Mar 08, 2017 @ 16:47
    Tim Geyssens
    0

    Looks like you are missing a ' before delimiter

  • Simon 687 posts 1062 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; }
    
  • Tim Geyssens 6419 posts 15020 karma points MVP 2x c-trib
    Mar 08, 2017 @ 17:03
    Tim Geyssens
    0

    Great :) glad it's solved!

Please Sign in or register to post replies

Write your reply to:

Draft