public String getIdPath() { if (_idPath != null) return _idPath; String containerIdPath; if (_container == null) throw new NullPointerException(Tapestry.format("AbstractComponent.null-container", this)); containerIdPath = _container.getIdPath(); if (containerIdPath == null) _idPath = _id; else _idPath = containerIdPath + "." + _id; return _idPath; }
public String getIdPath() { if (_idPath != null) return _idPath; String containerIdPath; if (_container == null) throw new NullPointerException(Tapestry.format("AbstractComponent.null-container", this)); containerIdPath = _container.getIdPath(); if (containerIdPath == null) _idPath = _id; else _idPath = containerIdPath + "." + _id; return _idPath; }
/** * Creates a new ComponentAddress object that carries the identification information of the * given component (the page name and the ID path). * * @param component * the component to get the address of */ public ComponentAddress(IComponent component) { this(component.getPage().getPageName(), component.getIdPath()); }
/** * Creates a new ComponentAddress object that carries the identification information of the * given component (the page name and the ID path). * * @param component * the component to get the address of */ public ComponentAddress(IComponent component) { this(component.getPage().getPageName(), component.getIdPath()); }
public ILink getLink(boolean post, Object parameter) { Defense.isAssignable(parameter, IComponent.class, "parameter"); IComponent component = (IComponent) parameter; Map parameters = new HashMap(); parameters.put(ServiceConstants.PAGE, component.getPage().getPageName()); parameters.put(ServiceConstants.COMPONENT, component.getIdPath()); return _linkFactory.constructLink(this, false, parameters, true); }
/** * Constructor used when the action id is found, but the target id path did * not match the actual id path. */ public StaleLinkException(IComponent component, String targetActionId, String targetIdPath) { super(Tapestry.format("StaleLinkException.action-mismatch", new String[] { targetActionId, component.getIdPath(), targetIdPath }), component, null, null); _page = component.getPage(); _pageName = _page.getPageName(); _targetActionId = targetActionId; _targetIdPath = targetIdPath; }
/** * Constructor used when the action id is found, but the target id path did * not match the actual id path. */ public StaleLinkException(IComponent component, String targetActionId, String targetIdPath) { super(Tapestry.format("StaleLinkException.action-mismatch", new String[] { targetActionId, component.getIdPath(), targetIdPath }), component, null, null); _page = component.getPage(); _pageName = _page.getPageName(); _targetActionId = targetActionId; _targetIdPath = targetIdPath; }
parameters.put(ServiceConstants.COMPONENT, component.getIdPath()); parameters.put(ServiceConstants.CONTAINER, componentPage == activePage ? null : componentPage.getPageName()); parameters.put(ServiceConstants.SESSION, stateful ? "T" : null);
parameters.put(ServiceConstants.COMPONENT, component.getIdPath()); parameters.put(ServiceConstants.CONTAINER, componentPage == activePage ? null : componentPage.getPageName()); parameters.put(ServiceConstants.SESSION, stateful ? "T" : null);
component.getSpecification().rewireComponentId(compId, idPath, component.getIdPath());
component.getSpecification().rewireComponentId(compId, idPath, component.getIdPath());
parameters.put(ServiceConstants.COMPONENT, component.getIdPath()); parameters.put(ServiceConstants.CONTAINER, componentPage == activePage ? null : componentPage.getPageName());
parameters.put(ServiceConstants.COMPONENT, component.getIdPath()); parameters.put(ServiceConstants.CONTAINER, componentPage == activePage ? null : componentPage.getPageName());
public void observeChange(ObservedChangeEvent event) { IComponent component = event.getComponent(); String propertyName = event.getPropertyName(); if (_locked) { _log.error(RecordMessages.recorderLocked(propertyName, component), null, null); return; } PropertyPersistenceStrategy strategy = findStrategy(component, propertyName); if (strategy != null) strategy.store(_pageName, component.getIdPath(), propertyName, event.getNewValue()); }
public void observeChange(ObservedChangeEvent event) { IComponent component = event.getComponent(); String propertyName = event.getPropertyName(); if (_locked) { _log.error(RecordMessages.recorderLocked(propertyName, component), null, null); return; } PropertyPersistenceStrategy strategy = findStrategy(component, propertyName); if (strategy != null) strategy.store(_pageName, component.getIdPath(), propertyName, event.getNewValue()); }
IComponent embedded = component.getComponent(id); Object[] serviceParameters = new Object[] { embedded.getIdPath() };