Skip to content

Commit

Permalink
Format #523
Browse files Browse the repository at this point in the history
  • Loading branch information
slepage-klee committed Jan 25, 2018
1 parent de9586c commit 4516e1f
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -25,6 +25,7 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;

import org.apache.commons.lang3.StringUtils;
import org.primefaces.component.api.InputHolder;
import org.primefaces.extensions.model.dynaform.AbstractDynaFormElement;
import org.primefaces.extensions.model.dynaform.DynaFormControl;
Expand Down Expand Up @@ -236,7 +237,10 @@ protected void encodeBody(FacesContext fc, DynaForm dynaForm, List<DynaFormRow>
// render label
DynaFormLabel label = (DynaFormLabel) element;

writer.writeAttribute("class", (styleClass + " " + LABEL_CLASS + " " + label.getStyleClass() + " " + labelCommonClass).trim(), null);
writer.writeAttribute("class", (styleClass
+ " " + LABEL_CLASS
+ " " + StringUtils.defaultIfBlank(label.getStyleClass(), Constants.EMPTY_STRING)
+ " " + labelCommonClass).trim(), null);
writer.writeAttribute("role", GRID_CELL_ROLE, null);

writer.startElement("label", null);
Expand Down

0 comments on commit 4516e1f

Please sign in to comment.