public void displayHidden(StringBuffer buffer, String name, String prefix, BaseCollection object, XWikiContext context) { input input = new input(); PropertyInterface prop = object.safeget(name); if (prop != null) { input.setValue(prop.toFormString()); } input.setType("hidden"); input.setName(prefix + name); input.setID(prefix + name); buffer.append(input.toString()); }
/** * {@inheritDoc} * * @see com.xpn.xwiki.objects.BaseElement#clone() */ @Override public Object clone() { BaseCollection collection = (BaseCollection) super.clone(); collection.setXClassReference(getRelativeXClassReference()); collection.setNumber(getNumber()); Map fields = getFields(); Map cfields = new HashMap(); for (Object objEntry : fields.entrySet()) { Map.Entry entry = (Map.Entry) objEntry; PropertyInterface prop = (PropertyInterface) ((BaseElement) entry.getValue()).clone(); prop.setObject(collection); cfields.put(entry.getKey(), prop); } collection.setFields(cfields); return collection; }
String propname = ((PropertyInterface) propnames[i]).getName();
this.defaultTableId = pluginConfiguration.get(PROPERTY_ID).toString(); this.defaultTableClass = pluginConfiguration.get(PROPERTY_CLASSNAME).toString(); this.defaultCellSpacing = pluginConfiguration.get(PROPERTY_SPACING).toString(); this.defaultTableBorder = pluginConfiguration.get(PROPERTY_BORDER).toString(); this.defaultCellPadding = pluginConfiguration.get(PROPERTY_PADDING).toString(); this.defaultHeaderBackground = pluginConfiguration.get(PROPERTY_HEADER_BACKGROUND).toString(); this.defaultDataBackground = pluginConfiguration.get(PROPERTY_DATA_BACKGROUND).toString();
Element pel = new DOMElement(XMLNODE_PROPERTY); PropertyInterface bprop = (PropertyInterface) it.next(); pel.add(bprop.toXML()); oel.add(pel);
log.error("No data for property " + property.getName() + " of object id " + property.getId()); BaseCollection obj = property.getObject(); Object[] args = {(obj != null) ? obj.getName() : "unknown", property.getName()}; throw new XWikiException(XWikiException.MODULE_XWIKI_STORE, XWikiException.ERROR_XWIKI_STORE_HIBERNATE_LOADING_OBJECT,
property.setType(propertyClass.getClassType()); if (xwikiObject.get(propertyClass.getName()) != null) { property.setValue(xwikiObject.get(propertyClass.getName()).toFormString()); } else { property.setValue("");
private static void fillObjectSummary(ObjectSummary objectSummary, ObjectFactory objectFactory, URI baseUri, Document doc, BaseObject xwikiObject) throws XWikiException { objectSummary.setId(String.format("%s:%s", doc.getPrefixedFullName(), xwikiObject.getGuid())); objectSummary.setGuid(xwikiObject.getGuid()); objectSummary.setPageId(doc.getPrefixedFullName()); objectSummary.setWiki(doc.getWiki()); objectSummary.setSpace(doc.getSpace()); objectSummary.setPageName(doc.getName()); objectSummary.setClassName(xwikiObject.getClassName()); objectSummary.setNumber(xwikiObject.getNumber()); String[] propertyNames = xwikiObject.getPropertyNames(); if (propertyNames.length > 0) { objectSummary.setHeadline(xwikiObject.get(propertyNames[0]).toFormString()); } }