bohmber commented on code in PR #6031:
URL: https://github.com/apache/myfaces-tobago/pull/6031#discussion_r1955885608
##########
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java:
##########
@@ -284,4 +267,64 @@ protected CssItem[] getCssItems(final FacesContext
facesContext, final T command
protected void encodeBadge(final FacesContext facesContext, final T command)
throws IOException {
}
+
+ private class RenderChildrenCommands implements VisitCallback {
+ private List<UIComponent> renderLater = null;
+ private final FacesContext facesContext;
+ private final TobagoResponseWriter writer;
+ private final String clientId;
+
+ private RenderChildrenCommands(FacesContext context, TobagoResponseWriter
writer, String clientId) {
+ this.facesContext = context;
+ this.writer = writer;
+ this.clientId = clientId;
+ }
+
+ @Override
+ public VisitResult visit(VisitContext context, UIComponent target) {
+ if (target.getClientId(facesContext).equals(clientId)) {
+ return VisitResult.ACCEPT;
+ } else if (target instanceof AbstractUIStyle) {
+ if (renderLater == null) {
+ renderLater = new ArrayList<>();
+ }
+ renderLater.add(target);
+ return VisitResult.REJECT;
+ } else if (target instanceof Visual && !((Visual) target).isPlain()
+ || target.getRendererType() != null &&
target.getRendererType().startsWith("jakarta.faces")) {
Review Comment:
Good point
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]