Copied to clipboard

Flag this post as spam?

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


  • Stefan Bohlin 46 posts 168 karma points
    Jun 21, 2012 @ 11:18
    Stefan Bohlin
    0

    uComponents in Contour

    Hey

    How do i add a MultiNodeTreePicker to a Contour form?

    Thanks

  • Stefan Bohlin 46 posts 168 karma points
    Jun 22, 2012 @ 09:56
    Stefan Bohlin
    0

    Anyone?

  • Douglas Ludlow 210 posts 366 karma points
    Jun 26, 2012 @ 04:50
    Douglas Ludlow
    1

    You can't. Contour uses it's own data types, only they're called field types. You can write your own field types, but they aren't as flexible as data types are. For more information on writing field types, refer to the Contour documentation (page 11). You can also take a look at how the current field types were written as HQ released the source code for the Contour Providers. The Contour Contrib project is open source and also has a few field types that you can take a look at and see how they were coded.

  • Stefan Bohlin 46 posts 168 karma points
    Jun 26, 2012 @ 13:33
    Stefan Bohlin
    0

    Thanks for your anwser.

    I know about field types and how to make them. The problem is how to implement a uComponent into a field type.

    I guess it's not possible :(

  • Tom Smith 98 posts 172 karma points
    Jun 26, 2012 @ 13:57
    Tom Smith
    1

    Hi Stefan,

    I've hit this one before and managed to come up with a solution that uses a custom field type and a jquery plugin called chosen to aproximate a multinode tree picker.

    Basically the custom field type renders an asp list box with its selection mode set to multiple. (I wrapped the list box in a custom web control so I could do validation of the number of items selected)

    The jquery plugin transforms the multiple select into something like a multinode tree picker. (See here http://harvesthq.github.com/chosen/ specifically the multiple select example for a demo of the plugin's functionality) 

    The field type works with contour prevalue sources (which can come from umbraco nodes) and saves the selected node id's as a csv. It can therefore be used to populate any multinode tree picker datatype that stores its data as CSV.

    If you think it could do what you need, I could look at packaging up my code and releasing it at some point over the next couple of days.

    Tom

  • Stefan Bohlin 46 posts 168 karma points
    Jun 26, 2012 @ 14:02
    Stefan Bohlin
    0

    It sounds exactly like what I need. I you don't mind I would love to try it out.

    Thanks a lot!!

  • Tom Smith 98 posts 172 karma points
    Jun 26, 2012 @ 14:05
    Tom Smith
    0

    Hi Stefan, OK - I'll package it up and post again here once it's released. Should have it done in 48 hrs max :)

  • Stefan Bohlin 46 posts 168 karma points
    Jun 26, 2012 @ 14:06
    Stefan Bohlin
    0

    Awesome! I owe you!

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jun 26, 2012 @ 14:32
    Tom Fulton
    0

    Sounds awesome!  Any chance you might want to include it in Contour Contrib or are you wanting to release it standalone?

  • Tom Smith 98 posts 172 karma points
    Jun 27, 2012 @ 13:41
    Tom Smith
    0

    Hi All,

    OK; here it is http://our.umbraco.org/projects/backoffice-extensions/cogworks-multi-node-tree-picker-style-field-type-for-contour

    After it's been used by a few people and any bugs that I've missed have been ironed out it might be worth looking at putting it in the contrib. For now I've marked it down as a beta until some more people have used it and it's had a chance to prove itself / fall over! :)

    Many Thanks,

    Tom

  • Stefan Bohlin 46 posts 168 karma points
    Jun 27, 2012 @ 13:52
    Stefan Bohlin
    0

    Thanks a lot!

    This really helped me :)

  • Tom Smith 98 posts 172 karma points
    Jun 27, 2012 @ 17:40
    Tom Smith
    0

    Hi Stefan,

    No worries, I've just noticed and fixed a bug in the validation that caused it to fail after 1 postback,

    You may wish to uninstall the package, download version 1.1 from the link above and install,

    Apologies,

    Tom

  • Stefan Bohlin 46 posts 168 karma points
    Jun 28, 2012 @ 15:42
    Stefan Bohlin
    0

    For some reason i can't get the multipicker to show at all.

    It's like it doesn't get rendered since not even the ListBox gets rendered.

    It just shows like this:

    <div>     
    <!-- The data entry control -->                          

    </div>

    It works in the backend just not on the actual form :/

  • Tom Smith 98 posts 172 karma points
    Jun 28, 2012 @ 16:05
    Tom Smith
    0

    Hi Stefan, 

    Apologies, what version of Umbraco / Contour are you using?

    I'll see if I can replicate at this end,

    Tom

     

  • Stefan Bohlin 46 posts 168 karma points
    Jun 28, 2012 @ 16:07
    Stefan Bohlin
    0

    All newest.

    Umbraco 4.7.2
    Contour 1.1.12

  • Tom Smith 98 posts 172 karma points
    Jun 28, 2012 @ 16:25
    Tom Smith
    0

    Hi Stefan,

    Aha! Think I've spotted it - it's an issue when no default value is selected. Apologies. Fixed in version 1.2 available from the package page. Also includes missing icons. If you uninstall the package and then reinstall the latest version it should sort it. Let me know?

    Tom

  • Stefan Bohlin 46 posts 168 karma points
    Jun 28, 2012 @ 16:45
    Stefan Bohlin
    0

    Works like a charm :)

    Thanks !

Please Sign in or register to post replies

Write your reply to:

Draft