public Object component(Component component) { if(component.getOutputMarkupId()) target.addComponent(component); return IVisitor.CONTINUE_TRAVERSAL; }
public Transfer setTo(final Component component) throws Exception{ if (!component.getOutputMarkupId()) throw new IllegalArgumentException("You must not transform to a component that has not set output markup id: " + component); this.to = "jQuery('#" + component.getMarkupId() + "')"; return this; }
public Component setFocus(Component c) { if (focusComponent != null) { return c; } if (!c.getOutputMarkupId()) { c.setOutputMarkupId(true); } return focusComponent = c; }
@Override public void component(Component component, IVisit<Void> visit) { if (component.getOutputMarkupId()) { target.add(component); } } });
public Transfer setTo(final Component component) throws Exception{ if (!component.getOutputMarkupId()) throw new IllegalArgumentException("You must not transform to a component that has not set output markup id: " + component); this.to = "jQuery('#" + component.getMarkupId() + "')"; return this; }
public Component setFocus(Component c) { if (focusComponent != null) { return c; } if (!c.getOutputMarkupId()) { c.setOutputMarkupId(true); } return focusComponent = c; }
public Component setFocus(Component c) { if (focusComponent != null) { return c; } if (!c.getOutputMarkupId()) { c.setOutputMarkupId(true); } return focusComponent = c; }
@Override public void addComponent(Component component) { if (component == null) { throw new IllegalArgumentException("component cannot be null"); } if (component.getOutputMarkupId() == false) { throw new IllegalArgumentException("cannot update component that does not have setOutputMarkupId property set to true. Component: " + component.toString()); } this.updates.add(component); }
private String var(Component component) { if (!component.getOutputMarkupId()) { throw new IllegalStateException(); } // Calling clean() ensures that no Javascript operators (+, -, etc) are accidentally // used in the markup id, which breaks this functionality. String id = clean(component.getMarkupId()); return "window.wicketblock" + id; }
private String var(Component component) { if (!component.getOutputMarkupId()) { throw new IllegalStateException(); } // Calling clean() ensures that no Javascript operators (+, -, etc) are accidentally // used in the markup id, which breaks this functionality. String id = clean(component.getMarkupId()); return "window.wicketblock" + id; }
@Override public final void focusComponent(Component component) { if (component != null && component.getOutputMarkupId() == false) { throw new IllegalArgumentException( "cannot update component that does not have setOutputMarkupId property set to true. Component: " + component.toString()); } final String id = component != null ? ("'" + component.getMarkupId() + "'") : "null"; appendJavaScript("Wicket.Focus.setFocusOnId(" + id + ");"); }
public static void refreshPage(AjaxRequestTarget aTarget, Page aPage) { aPage.forEach(child -> { if (child.getOutputMarkupId()) { aTarget.add(child); } }); } }
/** * @see org.projectforge.web.dialog.ModalDialog#open(org.apache.wicket.ajax.AjaxRequestTarget) */ @Override public ModalDialog open(final AjaxRequestTarget target) { if (messageComponent.getOutputMarkupId() == true) { target.add(messageComponent); } return super.open(target); }
@Override public final void focusComponent(Component component) { if (component != null && component.getOutputMarkupId() == false) { throw new IllegalArgumentException( "cannot update component that does not have setOutputMarkupId property set to true. Component: " + component.toString()); } final String id = component != null ? ("'" + component.getMarkupId() + "'") : "null"; appendJavaScript("Wicket.Focus.setFocusOnId(" + id + ");"); }
@Override public final void focusComponent(Component component) { if (component != null && component.getOutputMarkupId() == false) { throw new IllegalArgumentException( "cannot update component that does not have setOutputMarkupId property set to true. Component: " + component.toString()); } final String id = component != null ? ("'" + component.getMarkupId() + "'") : "null"; appendJavaScript("Wicket.Focus.setFocusOnId(" + id + ");"); }
@Override public final void focusComponent(Component component) { if (component != null && component.getOutputMarkupId() == false) { throw new IllegalArgumentException( "cannot update component that does not have setOutputMarkupId property set to true. Component: " + component.toString()); } final String id = component != null ? ("'" + component.getMarkupId() + "'") : "null"; appendJavaScript("Wicket.Focus.setFocusOnId(" + id + ");"); }
@Override public void add(Component... components) { for (final Component component : components) { Args.notNull(component, "component"); if (component.getOutputMarkupId() == false && !(component instanceof Page)) { throw new IllegalArgumentException( "Cannot update component that does not have setOutputMarkupId property set to true. Component: " + component.toString()); } add(component, component.getMarkupId()); } }
private String getMarkupIdFor(Component component) { Component current = component; // find first parent with markup id while (current != null) { if (current.getOutputMarkupId() && (!current.getRenderBodyOnly() || current.getOutputMarkupPlaceholderTag())) { return current.getMarkupId(); } current = current.getParent(); } return ""; } }
/** * Copy markupId * * @param comp */ final void setMarkupId(Component comp) { Args.notNull(comp, "comp"); generatedMarkupId = comp.generatedMarkupId; setMetaData(MARKUP_ID_KEY, comp.getMetaData(MARKUP_ID_KEY)); if (comp.getOutputMarkupId()) { setOutputMarkupId(true); } }
/** * Copy markupId * * @param comp */ final void setMarkupId(Component comp) { Args.notNull(comp, "comp"); generatedMarkupId = comp.generatedMarkupId; setMetaData(MARKUP_ID_KEY, comp.getMetaData(MARKUP_ID_KEY)); if (comp.getOutputMarkupId()) { setOutputMarkupId(true); } }