List of usage examples for org.apache.wicket Component getMarkupId
public String getMarkupId()
From source file:wicketbox.ColResize.java
License:Apache License
@Override public final void renderHead(Component component, IHeaderResponse response) { super.renderHead(component, response); String initJS = String.format("wicketbox.colresize('%s',{header: '%s', body: '%s'},%s,%s);", component.getMarkupId(), headerSelector, bodySelector, getPersist(component), new CollectionFormattable(this.widths.getObject())); response.render(OnDomReadyHeaderItem.forScript(initJS)); }
From source file:wicketbox.component.DataBox.java
License:Apache License
public DataBox(String id, List<? extends IColumn<T, S>> columns, IDataProvider<T> dataProvider, long rowsPerPage) { super(id, columns, dataProvider, rowsPerPage); add(new Stretch(Orientation.VERTICAL, ".box-table-top", ".box-table-body", ".box-table-bottom")); add(new ColResize(".box-table-top table", ".box-table-body table", new WidthsModel()) { protected String getPersist(Component component) { return persistToCookie("colresize:" + component.getPageRelativePath(), MAX_AGE); }// w ww. j av a2 s.c o m }); add(new Scroll(Orientation.HORIZONTAL, ".box-table-top, .box-table-body") { protected String getPersist(Component component) { return persistToDocument("scroll:" + component.getMarkupId()); } }); }
From source file:wicketbox.Resize.java
License:Apache License
@Override public final void renderHead(Component component, IHeaderResponse response) { super.renderHead(component, response); final String id = component.getMarkupId(); final String persist = getPersist(component); final int size = this.size.getObject(); String initJS = String.format("wicketbox.resize('%s', '%s', '%s', %s, %s);", id, orientation, initiateSelector, persist, size); response.render(OnDomReadyHeaderItem.forScript(initJS)); }
From source file:wicketbox.Scroll.java
License:Apache License
@Override public void renderHead(Component component, IHeaderResponse response) { super.renderHead(component, response); final String id = component.getMarkupId(); final String persist = getPersist(component); final int position = this.position.getObject(); String initJS = String.format("wicketbox.scroll('%s','%s','%s',%s,%s);", id, orientation.name(), selector, persist, position);//www .jav a 2 s . co m response.render(OnDomReadyHeaderItem.forScript(initJS)); }
From source file:wicketbox.Stretch.java
License:Apache License
@Override public final void renderHead(Component component, IHeaderResponse response) { super.renderHead(component, response); final String id = component.getMarkupId(); String initJS = String.format("wicketbox.stretch('%s','%s',{leading: '%s', center: '%s', trailing: '%s'});", id, orientation, leadingSelector, centerSelector, trailingSelector); response.render(OnDomReadyHeaderItem.forScript(initJS)); }
From source file:wicketdnd.test.DnDTester.java
License:Apache License
/** * Execute a drop on a location in the given dropTarget * // w w w .j av a 2s. c om * @param dropTarget * target of drops * @param location * drop location * @param operation * DnD operation * @param dragSource * source of drags * @param drag * dragged component */ public void executeDrop(DropTarget dropTarget, Location location, Operation operation, DragSource dragSource, Component drag) { MockHttpServletRequest request = tester.getRequest(); request.setParameter("phase", "drop"); request.setParameter("component", location.getComponent().getMarkupId()); request.setParameter("anchor", location.getAnchor().name()); request.setParameter("operation", operation.name()); request.setParameter("path", dragSource.getPath()); request.setParameter("behavior", "" + dragSource.getBehaviorId()); request.setParameter("drag", drag.getMarkupId()); tester.executeBehavior(dropTarget); }