List of usage examples for org.apache.wicket Component getId
@Override
public String getId()
From source file:org.wicketstuff.security.TestStrategy.java
License:Apache License
/** * // w w w .j a v a2 s . co m * @see org.wicketstuff.security.strategies.WaspAuthorizationStrategy#isModelAuthorized(org.wicketstuff.security.models.ISecureModel, * org.apache.wicket.Component, org.wicketstuff.security.actions.WaspAction) */ @Override public boolean isModelAuthorized(ISecureModel<?> model, Component component, WaspAction action) { return isAuthorized( "model:" + (component instanceof Page ? component.getClass().getName() : component.getId()), action); }
From source file:ro.nextreports.server.web.report.DynamicParameterRuntimePanel.java
License:Apache License
private void enableItem(ListItem<QueryParameter> item, IModel dynamicModel, AjaxRequestTarget target) { Iterator it = item.iterator(); while (it.hasNext()) { Component component = (Component) it.next(); if (component.isVisible()) { if (!component.getId().startsWith("dynamic")) { component.setEnabled(!(Boolean) dynamicModel.getObject()); if (target != null) { target.add(component); }//from w w w . j a va 2 s . co m } } } }
From source file:sf.wicklet.ext.model.InheritablePropertyModel.java
License:Apache License
@SuppressWarnings("unchecked") @Override//from w w w . ja v a2 s.c om public <W> IWrapModel<W> wrapOnInheritance(final Component component) { return new PropertyValueModel<W>((IProperty<W>) provider.propertyOf(component.getId())); }
From source file:wicketbox.component.SplitBox.java
License:Apache License
public SplitBox(String id, Component main, Component remainder, IModel<Integer> size) { super(id);/*from w w w. j a v a 2s. c o m*/ add(new Stretch(Orientation.HORIZONTAL, ".box-split-resize", ".box-split-remainder", null)); WebMarkupContainer resize = new WebMarkupContainer("resize"); resize.add(new Resize(Orientation.HORIZONTAL, ".box-split-divider") { @Override protected String getPersist(Component component) { return persistToCookie("resize:" + component.getPageRelativePath(), MAX_AGE); } }); add(resize); Args.isTrue("main".equals(main.getId()), "main"); resize.add(main); resize.add(newDivider("divider")); Args.isTrue("remainder".equals(remainder.getId()), "remainder"); add(remainder); }
From source file:wickettree.Node.java
License:Apache License
public Node(String id, AbstractTree<T> tree, IModel<T> model) { super(id, model); this.tree = tree; setOutputMarkupId(true);//from ww w . j av a2s. c om MarkupContainer junction = createJunctionComponent("junction"); junction.add(new StyleBehavior()); add(junction); Component content = createContent(CONTENT_ID, model); if (!content.getId().equals(CONTENT_ID)) { throw new IllegalArgumentException("content must have component id equal to Node.CONTENT_ID"); } add(content); }