/** * <p>This method fixes a problem with {@link UIComponent#findComponent(String)} where sometimes it is unable to * find components due to incorrect clientId values. For more info, see the following issues: * * <ul> * <li>http://issues.liferay.com/browse/FACES-198</li> * <li>http://jira.icesoft.org/browse/ICE-6659</li> * <li>http://jira.icesoft.org/browse/ICE-6667</li> * </ul> * </p> */ @Override public void setId(String id) { if (BridgeUtil.isPortletRequest()) { super.setId(getContainerClientId(FacesContext.getCurrentInstance())); } }
/** * <p>This method fixes a problem with {@link UIComponent#findComponent(String)} where sometimes it is unable to * find components due to incorrect clientId values. For more info, see the following issues: * * <ul> * <li>http://issues.liferay.com/browse/FACES-198</li> * <li>http://jira.icesoft.org/browse/ICE-6659</li> * <li>http://jira.icesoft.org/browse/ICE-6667</li> * </ul> * </p> */ @Override public void setId(String id) { if (BridgeUtil.isPortletRequest()) { super.setId(getContainerClientId(FacesContext.getCurrentInstance())); } }
/** * NamingContainer semantics worked generically (serviced by subclasses) as long as the class * is marked as implementing NamingContainer and we use the portletNamespace Id as * (part of) the component's id. */ @Override public String getContainerClientId(FacesContext context) { if (BridgeUtil.isPortletRequest()) { // Some impls (Facelets don't set an id on the UIViewRoot) -- Also handles the action case if ((this.getId() == null || !this.getId().startsWith(PORTLET_NAMESPACE_ID_PREFIX))) { setId(this.getId()); // setId can handle the null } return super.getContainerClientId(context); } else { return null; } }