Escolar Documentos
Profissional Documentos
Cultura Documentos
Technical Guide
By:
Himanshu Durgapal
Table of Contents
Introduction................................................................................................................ 3
hmc.xml.................................................................................................................. 4
Customizing Toolbar................................................................................................ 4
Customizing Explorer Tree....................................................................................... 5
HMC Section-Related Tags..................................................................................... 11
<attribute> Tag..................................................................................................... 14
Introduction
The Hybris Management Console (HMC) is a highly configurable and adaptable. It
can be set up to match the business object types needed. Most of the configuration
is done via an XML file.
The intention behind creation of this document is to make the developers
understand how to configure the HMC according to your business and project
requirements.
hmc.xml
This file is the core of hmc and it contains the entire configuration for the hmc
layouts this file is added by the ant extgen script automatically for some templates
(for example the default yempty template) .Most of the hmc customization is done
by this file.
Customizing Toolbar
Toolbar contains hmc actions; an action allows running custom business logic in the
hybris Management Console (hmc).
Types of Actions
There are three basic types of actions:
ToolbarAction:
Generic business logic that can run without any parameters or items
involved.
SearchResultAction:
Runs the implemented business logic on a number of items selected from a
search result.
ItemAction:
Business logic related to a certain item.
align="left"
autosave="true" classname="de.hybris.hmcaction.myAct
ion" disabledicon="" hidebutton="true" icon="" name="" showtoolbarlabel="true"
toolbaricon="" tooltip="" type="toolbar"/>
Only specific types of action is allowed in hmc.xml based on the parent tags:
Subtag of <configuration>
RemoveAction
Subtag of <search>
SearchResultAction
Subtag of <tab>
ItemAction
Although the name attribute is not marked mandatory in the hmc.xsd file, you still
need to specify this attribute (even with a blank value) - refer JIRA issue on this
subject.
SampleToolbarAction.java:
public class SampleToolbarAction extends ToolbarAction {
public ActionResult perform(ActionEvent e) throws JaloBusinessException {
return new ActionResult(ActionResult.OK, "Hello"
+ JaloSession.getCurrentSession().getUser().getUID, true);
}
}
Subtags
<group> (GroupType)
<typeref> (TypeReferenceType)
< group> tag : Adds a group node (i.e. a container or folder like 'Catalog' or
'System') to the explorer tree which in turn can contain other nodes.
< typeref> tag : Adds a node which references a type's Organizer to the explorer
tree. In other words, this points to the HMC configuration for a type Organizer.
Attribute
name="string"
(mandatory)
icon="string"
useselector="boolea
n"
mode="modeType"
Description / Comment
The code of the type which is described here.
Pathname of an icon which should be used for this type.
select box to choose an item of this type (see for example the
'unit' attribute in a 'product' item).
Mode can be one of append, replace. Default is replace.
Subtags
<organizer> (OrganizerType)
The organizer tag is the parent tag of search, result and editor tags:
The <search> TagContains configurations of the organizer search section.
Attribute
Description / Comment
mode="modeType
Mode can be one of append, replace. Default is append.
"
Specifies whether the search is triggered automatically on
opening the organizer in the hMC. If set to true, the search is
autoperform="bool triggered automatically; if set to false (default), then the user
ean"
needs to click on the Search button to trigger the search.
Subtags
<condition> (ConditionType)
Attribute
Description / Comment
attribute="string" (mandatory)
Description / Comment
defaultview="string"
[possible values: list, edit,
tree]
Sets the default view mode (list, edit, tree) for the
organizer result section. If no default view is explicitly
set, the list view will be used.
mode="modeType "
append.
Subtags
<listview> (ListViewType)
<editview> (EditViewType)
<treeview> (TreeViewType)
<action> (ActionType)
The <listview> TagConfiguration of the organizer result section when in list view mode.
Attribute
Description / Comment
The <itemlayout> TagDefines which attributes of the type are shown in the result list (one attribute per
column).
Attribute
mode="modeType "
Description / Comment
Mode can be one of append,
replace. Default is append.
Subtags
<attribute>
<item> (ItemType)
Description / Comment
width="string"
title="string"
Description / Comment
mode="modeType
"
scrollbar="boolea
'false' to disable the scrollbar in the search result list. Default
n"
is 'true'.
Subtags
<itemlayout>
Description / Comment
mode="modeType
Mode can be one of append, replace. Default is append.
"
scrollbar="boolean 'false' to disable the scrollbar in the search result list. Default is
"
'true'.
The <attribute> </attribute> TagAttribute which should be explorable, i.e. which will be shown below an item node in
the tree view result list.
Attribute
name="string"
(mandatory)
mode="modeType"
suppressroot="boole
an" [0..1]
Description / Comment
The attribute's qualifier
Mode can be one of append, replace. Default is append.
If set to true, the appropriate attribute itself will not appear
as a node, but all its explorable subnodes will be shown
Description / Comment
mode="modeType "
Subtags
<exclude> (ExcludeType)
<essentials> (EssentialsType)
<tab> (TabType)
<customtab> (CustomTabType)
<tabref> (TabRefType)
Description / Comment
mode="modeType "
Subtags
<exclusion>
Attribute
Description / Comment
mode="modeType "
Subtags
<table>
<listlayout>
<columnlayout>
Attribute
Description / Comment
name="string"
(mandatory)
The name of this tab. The name will be used as a key to look
up a localized string.
mode="modeType "
position="integer"
Subtags
<section> </section>
Attribute
Description / Comment
name="string"
(mandatory)
The name of this tab. The name will be used as a key to look
up a localized string.
mode="modeType "
position="integer"
Subtags
<table>
<listlayout>
<columnlayout>
Description / Comment
width="string"
height="string"
leftwidth="positiveInteger"
rightwidth="positiveInteger"
Subtags
<row>
Attribute
Description / Comment
width="string"
height="string"
position="integer"
Subtags (most are equivalent to, for example, the <td> subtags)
<attribute> (AttributeChipType)
<customattributechip> (CustomAttributeChipType)
<customchip> (CustomChipType)
<inlineshortcut> (InlineShortcutType)
<shortcut> (ShortcutType)
<text> (TextChipType)
Attribute
width="string"
height="string"
mode="modeType "
Description / Comment
The width of this element in pixels.
The height of this element in pixels.
Mode can be one of append, replace. Default is append.
Subtags
<attribute> (AttributeChipType)
<customattributechip> (CustomAttributeChipType)
<customchip> (CustomChipType)
<table> (TableType)
<listlayout> (ListLayoutType)
<inlineshortcut> (InlineShortcutType)
<shortcut> (ShortcutType)
<action> (ActionType)
<text> (TextChipType)
Description / Comment
The width of this element in pixels.
The height of this element in pixels.
Subtags
<tr> (TRType)
Description / Comment
The width of this element in pixels.
The height of this element in pixels.
Subtags
<td> (TDType)
Subtags
<attribute>
<customattributechip>
<customchip>
<table>
<listlayout>
<inlineshortcut>
<shortcut>
<action>
<text>
<attribute> Tag
Attribute
Description / Comment
name="string"
mode="modeType "
width="positiveInteger"
labelwidth="nonNegativeI
Width of the attribute label.
nteger"
With maxlength you can restrict the entry length in
maxlength="positiveInteg
some text editors (e.g. in stringeditor and
er"
textareaeditor).
hidelabel="boolean"
descriptionattribute="strin
Name of description attribute.
g"
editable="boolean"
position="integer"
Subtags
<defaulteditor>
<customeditor>
<stringeditor>
<stringselecteditor>
<textareaeditor>
<wysiwygeditor>
<integereditor>
<shorteditor>
<longeditor>
<doubleeditor>
<floateditor>
<booleaneditor>
<advancedbooleaneditor>
<datetimeeditor>
<longasdateeditor>
<longasdatetimeeditor>
<javaclasseditor>
<enumerationvalueselecteditor>
<referenceeditor>
<partofreferenceeditor>
<referencecollectioneditor>
<collectioneditor>
<subtypeselecteditor>
<specialeditor>
<mediaeditor>
<mapeditor>
<specialcreator>