Example usage for com.liferay.portal.kernel.bean BeanPropertiesUtil getStringSilent

List of usage examples for com.liferay.portal.kernel.bean BeanPropertiesUtil getStringSilent

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.bean BeanPropertiesUtil getStringSilent.

Prototype

public static String getStringSilent(Object bean, String param) 

Source Link

Usage

From source file:com.liferay.blade.samples.portlet.form.taglib.override.SampleFormTagDynamicIdFactory.java

License:Apache License

public String getTagDynamicId(HttpServletRequest request, HttpServletResponse response, Object tag) {

    String portletId = _portal.getPortletId(request);

    if (Validator.isNull(portletId)) {
        return null;
    }/*  w w w  .j  a  v  a2 s .c o m*/

    String name = BeanPropertiesUtil.getStringSilent(tag, "name");

    if (Validator.isNull(name)) {
        return null;
    }

    return portletId.concat(StringPool.DASH).concat(name);
}

From source file:com.liferay.exportimport.lar.PortletDataContextImpl.java

License:Open Source License

protected void populateClassNameAttribute(ClassedModel classedModel, Element element) {

    String attachedClassName = null;

    if (classedModel instanceof AttachedModel) {
        AttachedModel attachedModel = (AttachedModel) classedModel;

        attachedClassName = attachedModel.getClassName();
    } else if (BeanUtil.hasProperty(classedModel, "className")) {
        attachedClassName = BeanPropertiesUtil.getStringSilent(classedModel, "className");
    }/*from  ww w. jav a 2 s  . c  o m*/

    if (Validator.isNotNull(attachedClassName)) {
        element.addAttribute("attached-class-name", attachedClassName);
    }
}

From source file:com.liferay.frontend.taglib.aui.form.extension.sample.internal.SampleFormTagDynamicIdFactory.java

License:Open Source License

@Override
public String getTagDynamicId(HttpServletRequest request, HttpServletResponse response, Object tag) {

    String portletId = _portal.getPortletId(request);

    if (Validator.isNull(portletId)) {
        return null;
    }//from w w w.j a  v a 2s.  c  o  m

    String name = BeanPropertiesUtil.getStringSilent(tag, "name");

    if (Validator.isNull(name)) {
        return null;
    }

    return portletId.concat(StringPool.DASH).concat(name);
}