Skip to content

Commit

Permalink
Review remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
jepsar committed Dec 11, 2023
1 parent 726eccc commit dc14b28
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</ui:define>

<ui:param name="documentationLink" value="/components/staticmessage"/>
<ui:param name="widgetLink" value="StaticMessage"/>

<ui:define name="implementation">
<p:growl id="growl"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ public Collection<String> getUnobstrusiveEventNames() {
}

@Override
public void queueEvent(final FacesEvent event) {
public void queueEvent(FacesEvent event) {
FacesContext context = getFacesContext();
Map<String, String> params = context.getExternalContext().getRequestParameterMap();
String eventName = params.get(Constants.RequestParams.PARTIAL_BEHAVIOR_EVENT_PARAM);

if (eventName != null && event instanceof AjaxBehaviorEvent) {
final AjaxBehaviorEvent ajaxBehaviorEvent = (AjaxBehaviorEvent) event;
AjaxBehaviorEvent ajaxBehaviorEvent = (AjaxBehaviorEvent) event;

if ("close".equals(eventName)) {
customEvents.put(eventName, ajaxBehaviorEvent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public String getWidgetVar() {
return (String) getStateHelper().eval(PropertyKeys.widgetVar, null);
}

public void setWidgetVar(final String widgetVar) {
public void setWidgetVar(String widgetVar) {
getStateHelper().put(PropertyKeys.widgetVar, widgetVar);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
public class StaticMessageRenderer extends UINotificationRenderer {

@Override
public void decode(final FacesContext context, final UIComponent component) {
public void decode(FacesContext context, UIComponent component) {
decodeBehaviors(context, component);
}

Expand Down Expand Up @@ -126,7 +126,7 @@ protected void encodeCloseIcon(FacesContext context, StaticMessage staticMessage
}

protected void encodeScript(FacesContext context, StaticMessage staticMessage) throws IOException {
final WidgetBuilder wb = getWidgetBuilder(context);
WidgetBuilder wb = getWidgetBuilder(context);
wb.init("StaticMessage", staticMessage);

encodeClientBehaviors(context, staticMessage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ PrimeFaces.widget.StaticMessage = PrimeFaces.widget.BaseWidget.extend({
if ($this.hasBehavior('close')) {
$this.callBehavior('close');
}
});
})
.attr('role', 'button')
.attr('aria-label', PrimeFaces.getAriaLabel('close'));
}

});

0 comments on commit dc14b28

Please sign in to comment.