cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a new context menu option to KM

Former Member
0 Kudos

I want to add a new menu option to KM that appears when a user clicks the context menu of an xmlform generated xml file.

From reading the forums it appears I need to edit an existing UI Command Group, adding a newly created Command that points to a Java class containing a handler class that implements ICommand?

-How do I know which command group to add my command to?

-Can I make the new command appear only for xml files generated by xmlforms?

Cheers,

Steve

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Steve,

<b>-How do I know which command group to add my command to?</b>

You have to know what layout set is used in the navigation iView. If you do not know this, you have can add your user to the Debugging Settings list (KM Configuration -> Content Management -> User Interface -> Debugging Settings) and click on the Rendering Information link in the iView.

After that you can go to the Layout Set settings ((KM Configuration -> Content Management -> User Interface -> Settings -> Layout Set) and check the settings of the Resource Renderer in use. For example if use the AdminExplorer LayoutSet you'll have to take a look at AdminResourceRenderer configuration. There you can see the Command Group used for Resources (Resource Command Group).

This is the group you have to edit.

<b>-Can I make the new command appear only for xml files generated by xmlforms?</b>

Unfortunately you can only use different groups for Resources, Folders and Links but not for different type of Resources.

Hope this helps,

Robert

Former Member
0 Kudos

Robert,

Thanks that was really useful. Im ultimately trying to add a custom edit option that uses HTMLB controls to allow the user to edit HTML inside some of the elements of an XML file in KM.

Is this possible? Ive read 'Implementing Flexible UI One-Step-Screenflow' but I dont understand quite how the UI stuff works and what is possible. I anticipate needing a single JspDynPage or DynPage with a bunch of htmlb components on which are defaulted to the contents of the XML documents contents, including a save and cancel button of which the form then writes the edited content back to KM.

I think I could do this via JSpDynPage in a PageProcessorComponent but in the 'Implementing Flexible UI One-Step-Screenflow' example the UI components seem to be set inside a OneStepScreenflow object containing a ConfirmComponent amongst other things.

I couldnt find any documentation detail on what is possible using this method or whether it is possible to link to a JSpDynPage in a .par file?

Cheers,

Steve

detlev_beutner
Active Contributor
0 Kudos

Hi Steve,

Robert comes from the configuration side (the ones who push buttons and turn wheels)

So he was totally right, there is only one info missing:

> - Can I make the new command appear

> only for xml files generated by xmlforms?

> Unfortunately you can only use different groups

> for Resources, Folders and Links but not

> for different type of Resources.

And fortunately, there is the method "isExecutable" in IExecCommand, which is designed for such uses. Just check if the resource in question has the correct resource type, return true if this is the case, otherwise false. By this, the command only will appear if the resource is of the correct type.

Hope it helps

Detlev

Former Member
0 Kudos

Hi Detlev,

I've been trying to do something similar.

Quick question :what needs to be added as an option in the context menu if i want to view the "custom properties" for a particular resource(doc in my case) in KM ,can it be configured(rather is it available already)?

Thanks in advance,

Anupama.