/** * Gets the id of the component. * @return the component id */ public String getLowLevelEventId() { return getComponentId(); }
@Override public String getLowLevelEventId() { if (getGroup() != null && getShowAsFormComponent()) { return getGroup().getComponentId(); } else { return super.getLowLevelEventId(); } // end of if () }
@Override protected void setParentFrame(SFrame f) { if (f == getParentFrame()) return; if (buttonGroup != null && getSession().getDispatcher() != null) { getSession().getDispatcher().removeLowLevelEventListener(this, buttonGroup.getComponentId()); } // end of if () super.setParentFrame(f); if (buttonGroup != null && f != null && getSession().getDispatcher() != null) { getSession().getDispatcher().addLowLevelEventListener(this, buttonGroup.getComponentId()); } // end of if () }
/** * Add this button to a button group. This influences the event-prefix * this button reports to the request dispatcher: it will change to * the button group's prefix. */ protected void setGroup(SButtonGroup g) { if (isDifferent(buttonGroup, g)) { SButtonGroup oldVal = this.buttonGroup; // Do no longer react on events from old button group if (buttonGroup != null && getSession().getDispatcher() != null) { getSession().getDispatcher().removeLowLevelEventListener(this, buttonGroup.getComponentId()); } // end of if () buttonGroup = g; // Button Group changed but button already registered via parent frame? if (buttonGroup != null && getParentFrame() != null && getSession().getDispatcher() != null) { getSession().getDispatcher().addLowLevelEventListener(this, buttonGroup.getComponentId()); } // end of if () reload(); propertyChangeSupport.firePropertyChange("group", oldVal, this.buttonGroup); } }