Topic
5 replies Latest Post - ‏2013-04-26T19:03:45Z by damorris
Alessandro.Damiani
Alessandro.Damiani
58 Posts
ACCEPTED ANSWER

Pinned topic [ICN 2.0.1] - Overriding existing widgets and modules

‏2013-04-24T15:28:30Z |

Hello all,

I am trying to understand how to implement my own widgets and replace the ones that are there by default.

In particular, I would be interested in replacing the ecm.widget.dialog.AddContentItemDialog widget with one I develop, for a specific desktop.

I understand that there is a way to override modules and widgets by using a plugin, but I can't find samples or information within the documentation.

In particular, I need to know how to package such widgets for ICN to use them instead of the default ones.

All help will be greatly appreciated!

 

Thanks in advance,

 

Alessandro

  • damorris
    damorris
    765 Posts
    ACCEPTED ANSWER

    Re: [ICN 2.0.1] - Overriding existing widgets and modules

    ‏2013-04-26T15:15:59Z  in response to Alessandro.Damiani

    HI,

    So generally you'd create a plugin and name it how you want, for example, maybe you'd call it "my.custom.CustomAddContentItemDialog".  You'd be basically creating a new Action.  Once your plugin registers that new action, then you'd add the action to a custom menu definition and assign it to a desktop.

    • Alessandro.Damiani
      Alessandro.Damiani
      58 Posts
      ACCEPTED ANSWER

      Re: [ICN 2.0.1] - Overriding existing widgets and modules

      ‏2013-04-26T15:33:19Z  in response to damorris

      Hi Dana,

      this is not what I was referring to. I have developed several plugins so far, and some are Action plugins, providing my ICN interface with new buttons to add to toolbars, context menus, and such, and providing dialogs for the user to interact with...

      For example, if I wanted to use the whole "Add Document" front-end part, but prevent the user from choosing the Document Class to create, which I want to be pre-selected, I could still use the widget parts where I can choose the folder to create the document in, and the portion with the properties form. What I would want then is that the "Add Document" action would open up my modified dialog, not the default one.

      I believe I asked the question too generically in my opening post. I am not looking for a way to replace the built-in buttons with custom buttons that invoke my custom widgets, but more a way to have the built-in actions use my widgets instead of built.in ones. I guess I got misled by the expression "overriding widgets" there...

      The reason for this question, which might seem a bit weird, is that there might be (there are, actually) companies that have policies the span across all software solutions implemented in their systems (which in ICN could be read as "in every desktop, teamspace, etc.., that is currently defined and will ever be defined), and thus it would be useful to be able to change the default behavior of ICN, for current running configurations but also for future ones.

      This said, the button association to menus and link to desktops also works, obviously!

       

      • damorris
        damorris
        765 Posts
        ACCEPTED ANSWER

        Re: [ICN 2.0.1] - Overriding existing widgets and modules

        ‏2013-04-26T15:44:02Z  in response to Alessandro.Damiani

        Your scenario begs the question of why you wouldn't just solve that with Entry Templates and EDS?  We want to make sure we use the right solution for the problem and not jump straight to writing new code.

        I'll admit that I'm not sure I understand what the issue is so that's probably a big part of the problem.  We want to be careful that we're not re-inventing security and other things at the application tier that the repository already provides.

        • Alessandro.Damiani
          Alessandro.Damiani
          58 Posts
          ACCEPTED ANSWER

          Re: [ICN 2.0.1] - Overriding existing widgets and modules

          ‏2013-04-26T16:06:47Z  in response to damorris

          It's not as much an "issue" I was describing as a possibility. We are currently trying to introduce ICN on several customer sites, and it's the first time that a product has the necessary flexibility to allow us to do that, without having to actually write a completely new solution. I guess I am just trying to completely understand the possibilities it offers, in order to pick the right path when faced with a problem.

          I realize my example was not totally fitting, since the operation of document addition offers many alternatives. I'm sorry I haven't been able to give a clearer idea of my question, but I believe you have answered it nevertheless. By reading of widgets overriding and extension in other posts, I had got the wrong impression that you could make modified versions of the built-in widgets and "plug" them into ICN's default functionality, a bit like you do by writing a request/response filter plugin that gets invoked in the middle of default ICN actions execution.

           

           

          • damorris
            damorris
            765 Posts
            ACCEPTED ANSWER

            Re: [ICN 2.0.1] - Overriding existing widgets and modules

            ‏2013-04-26T19:03:45Z  in response to Alessandro.Damiani

            Fair enough.  So, let me provide a more complete response to our strategy here.  First, you can make modified versions of existing widgets, if we provide the necessary hooks for you to do so.  A good example would be the content list - you can easily customize how it's rendered and what things are active or inactive through the modules and decorators.  For the right hand properties pane, we've added extension points so you could easily add your own custom properties section without rewriting your own properties pane.

            In the case you mention with the Add document dialog, what we're seeing an awful lot of is requests to add additional buttons or capabilities that are added on top of the default add document.  We will look in to how we can make it easier to customize the 'toolbar' for the add dialog so you can just easily add your own buttons without overriding the whole dialog.

            Basically, we haven't yet addressed every extension point.  We can't possibly think of everything, so we've started with obvious ones that we've encountered just through other IBM ECM products trying to leverage the ICN framework for developing ECM product UI's.  I have absolutely no doubt that IBM Business Partners, services, and customers will come up with requests repeatedly in other areas that will drive us to make it easier and easier for you to extend ICN without redoing things.

            You can technically do anything with a plugin, it's simply a matter of how hard or easy it would be to do.  Over time, we want to make 80% of the use-cases easy to do.  Right now I'd say we're probably only 50%.  If you or anyone else on this forum come across areas where it "feels" like things are harder than they need to be, then we want to hear about those real world use-cases so we can look at how we can make it easier.