Skip to content

Commit 9bfe16a

Browse files
committed
Fix for #750
1 parent 734833d commit 9bfe16a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/main/java/net/bootsfaces/component/ajax/AJAXRenderer.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,15 @@ public static boolean generateAJAXCallForASingleEvent(FacesContext context, Clie
379379
jsCallback = "";
380380
}
381381
if (null != rw) {
382-
rw.writeAttribute("on" + keyClientBehavior, jsCallback + script, null);
382+
boolean ajax = ((IAJAXComponent) component).isAjax();
383+
ajax |= null != ((IAJAXComponent) component).getUpdate();
384+
if (!generatedAJAXCall && ajax && "click".equals(keyClientBehavior)) {
385+
//ajax call will be generated later, so skip for now
386+
//see https://github.com/TheCoder4eu/BootsFaces-OSP/issues/750
387+
}
388+
else {
389+
rw.writeAttribute("on" + keyClientBehavior, jsCallback + script, null);
390+
}
383391
}
384392
if (null != code) {
385393
code.append(jsCallback + script);

0 commit comments

Comments
 (0)