Skip to content

Commit

Permalink
Merge pull request #1183 from t-oster/fix-750-ajax-behavior2
Browse files Browse the repository at this point in the history
Fix for #750 (simpler version)
  • Loading branch information
TheCoder4eu authored Jan 23, 2022
2 parents 734833d + 9bfe16a commit 768ab26
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/java/net/bootsfaces/component/ajax/AJAXRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,15 @@ public static boolean generateAJAXCallForASingleEvent(FacesContext context, Clie
jsCallback = "";
}
if (null != rw) {
rw.writeAttribute("on" + keyClientBehavior, jsCallback + script, null);
boolean ajax = ((IAJAXComponent) component).isAjax();
ajax |= null != ((IAJAXComponent) component).getUpdate();
if (!generatedAJAXCall && ajax && "click".equals(keyClientBehavior)) {
//ajax call will be generated later, so skip for now
//see https://github.com/TheCoder4eu/BootsFaces-OSP/issues/750
}
else {
rw.writeAttribute("on" + keyClientBehavior, jsCallback + script, null);
}
}
if (null != code) {
code.append(jsCallback + script);
Expand Down

0 comments on commit 768ab26

Please sign in to comment.