protected Component getComponentByName(final String names)
{
if (names.length() > 0)
{
final ScrService scrService = getScrService();
if (scrService != null)
{
final int slash = names.lastIndexOf('/');
final String componentName;
final String pid;
if (slash > 0)
{
componentName = names.substring(0, slash);
pid = names.substring(slash + 1);
}
else
{
componentName = names;
pid = null;
}
Component[] components;
try
{
components = scrService.getComponents(componentName);
}
catch (Throwable t)
{
// not implemented in the used API version
components = null;