-
1. Re: Customize PIM WebAccess
Stefan Reinhardt Jul 24, 2018 9:21 AM (in response to Sidhu Hajare)Hi Sidhu,
it is mentioned in the technical documentation and the SDK help however requires a little coding. Here is a short snippet on the details:
Add a custom context area
Similar to custom tabs, the Web UI navigation area on the left can also be extended programmatically. In this case, the base class to inherit from is AccordionTreeItem. A sample implementation that provides a link to open a new Browser Window looks like this:
public
class
CustomContextItem
extends
AccordionTreeItem
{
private
static
final
long
serialVersionUID = 1L;
public
CustomContextItem()
{
setCaption(
"Custom Context Tab"
);
}
@Override
public
String getId()
{
return
getClass().getName();
}
@Override
public
int
getPosition()
{
return
Positions.Accordion.Catalogs +
1
;
}
@Override
protected
void
buildMainLayout()
{
HorizontalLayout rootLayout =
new
HorizontalLayout();
rootLayout.setMargin(
true
);
Label customWidget =
new
Label(
"Open External Page: "
);
rootLayout.addComponent( customWidget );
rootLayout.addComponent(
new
Link(
"Click me"
,
new
ExternalResource(
"http://www.google.com"
),
"_blank"
,
0
,
0
,
0
) );
setCompositionRoot( rootLayout );
}
@Override
protected
void
initTree()
{
// do initialization here
}
@Override
protected
String getCaptionPropertyId()
{
return
null
;
}
@Override
public
boolean
hasReadPermission()
{
return
true
;
}
@Override
public
String getPermissionId()
{
// return id of action right if permission checks are desired
return
""
;
}
}
Register the new Context tab implementation in your ExampleModule using the following binder:
private
void
contributeAccordionItem()
{
Multibinder< AccordionTreeItem > accordionTabBinder = Multibinder.newSetBinder( binder(),
AccordionTreeItem.
class
,
Names.named( Components.Accordions.MAIN ) );
accordionTabBinder.addBinding()
.to( CustomContextItem.
class
);
}
Stefan
-
2. Re: Customize PIM WebAccess
inuser490521 Aug 13, 2018 4:36 AM (in response to Stefan Reinhardt)Hi Stefan,
how can i get a list of just existent AccordionTreeItem in PIM WebUI ?
Thanks
-
-
4. Re: Customize PIM WebAccess
Stefan Reinhardt Dec 3, 2018 4:05 PM (in response to Somendu Maiti)Sorry I don't have my hands on the code. But would suggest checking back with our support team to get insights. Maybe also share it back here then after for others.
-
5. Re: Customize PIM WebAccess
Ralph81 Dec 3, 2018 10:55 PM (in response to Sidhu Hajare)Hi,
from GCS side we can only share the Standard Documentation for Customizing the WEB UI. GCS can not provide help with custom implementations or checking code.
So if you are looking for the Customization part in the Documentation we can share.
Best Regards
Ralph
-
6. Re: Customize PIM WebAccess
Somendu Maiti Dec 4, 2018 12:34 AM (in response to Ralph81)Hi Ralph, Stefen,
Thank you for the update and response.
I agree it is there on documentation.
However, the class AccordionItem which is in context, doesn't exist and documentation says to use the class.
If you can advise further on this, please.
Thanks,
Somendu
-
7. Re: Customize PIM WebAccess
Stefan Reinhardt Jan 3, 2019 4:51 AM (in response to Somendu Maiti)Hi Somendu,
can you please open an issue with our support team regarding a potential faulty documentation here so a developer can have a look and revise. That is probably the best to sort it out.
Thanks,
Stefan