List of usage examples for org.apache.wicket Component PATH_SEPARATOR
char PATH_SEPARATOR
To view the source code for org.apache.wicket Component PATH_SEPARATOR.
Click Source Link
From source file:com.googlecode.londonwicket.ComponentExpression.java
License:Apache License
public static List<Component> findAllComponents(Component parent, String expression, Class<? extends Component> typeRestriction) { if (expression == null || expression.equals("")) { return Collections.emptyList(); }/* www. ja v a 2 s . com*/ return findComponent(parent, new LinkedList<String>( Arrays.asList(expression.split(Character.toString(Component.PATH_SEPARATOR)))), typeRestriction); }
From source file:com.servoy.extensions.beans.dbtreeview.table.InmethodDBTreeTableView.java
License:Open Source License
/** * @see wicket.Component#getMarkupId()/*from w w w . j a va2s . c om*/ */ @Override public String getMarkupId() { if (getParent() instanceof ListItem) { return getParent().getId() + Component.PATH_SEPARATOR + getId(); } else { return getId(); } }
From source file:com.servoy.extensions.beans.dbtreeview.WicketDBTreeView.java
License:Open Source License
@Override public String getMarkupId() { if (getParent() instanceof ListItem) { return getParent().getId() + Component.PATH_SEPARATOR + getId(); }/* www.j av a 2s.c om*/ /* * a compilable version (with obfuscation within the plugins project) of the following if (getParent() instanceof CellContainer) */ else if (getParent() != null && getParent().getParent() instanceof ListItem) { ListItem li = (ListItem) getParent().getParent(); return li.getId() + Component.PATH_SEPARATOR + getId(); } else { return getId(); } }
From source file:com.servoy.j2db.server.headlessclient.dataui.ServoySubmitPagingNavigationIncrementLink.java
License:Open Source License
/** * @see org.apache.wicket.markup.html.form.IFormSubmittingComponent#getInputName() *//*from www . j ava 2 s. co m*/ public String getInputName() { // TODO: This is a copy & paste from the FormComponent class. String id = getId(); final PrependingStringBuffer inputName = new PrependingStringBuffer(id.length()); Component c = this; while (true) { inputName.prepend(id); c = c.getParent(); if (c == null || (c instanceof Form && ((Form) c).isRootForm()) || c instanceof Page) { break; } inputName.prepend(Component.PATH_SEPARATOR); id = c.getId(); } return inputName.toString(); }
From source file:de.alpharogroup.wicket.component.search.ComponentExpression.java
License:Apache License
/** * Search for all {@link org.apache.wicket.Component}s with the given expression in the given * parent with the given class type restriction. * * @param parent//from w ww.j av a 2 s.c o m * the parent that will be the start point to search. * @param expression * the expression for search. * @param typeRestriction * the class type restriction for the search. * @return all found {@link org.apache.wicket.Component}s in a {@link java.util.List} with the * given expression in the given parent with the given class type restriction or an * empty {@link java.util.List} if nothing is found. */ public static List<Component> findAllComponents(Component parent, String expression, Class<? extends Component> typeRestriction) { if (expression == null || expression.equals("")) { return Collections.emptyList(); } return findComponent(parent, new LinkedList<String>( Arrays.asList(expression.split(Character.toString(Component.PATH_SEPARATOR)))), typeRestriction); }
From source file:org.artifactory.common.wicket.component.links.TitledSubmitLink.java
License:Open Source License
@Override public String getInputName() { // TODO: This is a copy & paste from the FormComponent class. String id = getId();// ww w . j a va 2 s . c om final PrependingStringBuffer inputName = new PrependingStringBuffer(id.length()); Component c = this; while (true) { inputName.prepend(id); c = c.getParent(); if (c == null || (c instanceof Form && ((Form) c).isRootForm()) || c instanceof Page) { break; } inputName.prepend(Component.PATH_SEPARATOR); id = c.getId(); } // having input name "submit" causes problems with javascript, so we // create a unique string to replace it by prepending a path separator if ("submit".equals(inputName.toString())) { inputName.prepend(Component.PATH_SEPARATOR); } return inputName.toString(); }
From source file:org.brixcms.markup.transform.EnclosureMarkupSourceTransformer.java
License:Apache License
/** * Gets the value of the "child" attribute and splits the path into a list * * @param enclosure/*www . jav a 2 s. co m*/ * @return ids */ private List<String> getChildren(Tag enclosure) { Map<String, String> attributes = enclosure.getAttributeMap(); if (attributes != null) { if (attributes.containsKey(EnclosureHandler.CHILD_ATTRIBUTE)) { // split for nested components String[] children = attributes.get(EnclosureHandler.CHILD_ATTRIBUTE) .split("" + Component.PATH_SEPARATOR); ArrayList<String> list = new ArrayList<String>(); for (String child : children) { list.add(child); } return list; } } return null; }
From source file:org.brixcms.markup.transform.EnclosureMarkupSourceTransformer.java
License:Apache License
/** * Replaces the supplied enclosure child tag with the actual resolved comma separated component path * * @param enclosure/*from ww w . j av a 2 s.com*/ * @param children * @param enclosureChildTags */ private void updateEnclosureChildId(Tag enclosure, List<String> children, List<Tag> enclosureChildTags) { Map<String, String> attributes = enclosure.getAttributeMap(); if (attributes != null) { String child = ""; for (int i = 0; i < children.size(); i++) { String childid = children.get(i); if (childid != null) { child += (child.length() > 0 ? Component.PATH_SEPARATOR : "") + childid; } else { Tag tag = enclosureChildTags.get(i); String id = getGeneratedTagId(tag); if (id != null) { // nested children are delimited by commas child += (child.length() > 0 ? Component.PATH_SEPARATOR : "") + id; } } } attributes.put(EnclosureHandler.CHILD_ATTRIBUTE, child); } }