congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
PortletNamingContainerUIViewRoot
Code IndexAdd Tabnine to your IDE (free)

How to use
PortletNamingContainerUIViewRoot
in
javax.portlet.faces.component

Best Java code snippets using javax.portlet.faces.component.PortletNamingContainerUIViewRoot (Showing top 10 results out of 315)

origin: org.jboss.portletbridge/portletbridge-api

@Override
public void setId(String id) {
  if (BridgeUtil.isPortletRequest()) {
    if (namespace == null) {
      getContainerClientId(FacesContext.getCurrentInstance());
    }
    id = namespace;
  }
  super.setId(id);
}
origin: org.apache.myfaces.portlet-bridge/portlet-bridge-api

/**
 * 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;
 }
}

origin: org.apache.myfaces.portlet-bridge/portlet-bridge-impl

/**
 * Create a new UIComponent subclass, using the mappings defined by previous
 * calls to the addComponent method of this class.
 * <p>
 * @throws FacesException if there is no mapping defined for the specified
 * componentType, or if an instance of the specified type could not be
 * created for any reason.
 */
public javax.faces.component.UIComponent createComponent(String componentType)
    throws FacesException
{
 UIComponent component = mWrapped.createComponent(componentType);
 if (BridgeUtil.isPortletRequest() &&
   component.getClass() == UIViewRoot.class &&
   UIViewRoot.class.getAnnotation(PortletNamingContainer.class) == null
   )
 {
  // replace with our own UIViewRoot
  component = new PortletNamingContainerUIViewRoot();
 }
 return component;
}
origin: com.liferay.faces/liferay-faces-bridge-impl

/**
 * <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()));
  }
}
origin: com.liferay.faces/liferay-faces-bridge-impl

List<UIComponent> uiViewRootComponentResources = uiViewRoot.getComponentResources(facesContext, "head");
List<UIComponent> uiViewRootStyleSheetResources = null;
List<UIComponent> uiViewRootScriptResources = null;
  uiViewRoot.addComponentResource(facesContext, uiComponentResource, "body");
origin: org.apache.myfaces.portlet-bridge/portlet-bridge-api

@Override
public void setId(String id)
{
 if (BridgeUtil.isPortletRequest()) 
 {
  // Turns out that in Facelets the UIViewRoot doesn't seem to have its id set -- i.e. its null
  // So recognize null and change to a uniqueId
  if (id == null)
  {
   id = createUniqueId();
  }
  
  // Turns out some Faces impls (the RI) , on restoreView, manually sets the id from 
  // the extracted state prior to telling the component to restore itself from this state.
  // (At which point the self restore overwrites any id set prior.).  As this manual
  // set is using the already encoded (saved) value we could end up with a doubly
  // encoded id until the restore overwrites.  To avoid this -- first test if
  // its already encoded and don't re-encode.
  if (!id.startsWith(PORTLET_NAMESPACE_ID_PREFIX))
  {
   ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext();
   id = PORTLET_NAMESPACE_ID_PREFIX + ec.encodeNamespace("") + "_" + id;
  }
 }
 super.setId(id);
}

origin: liferay/liferay-faces

/**
 * <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()));
  }
}
origin: liferay/liferay-faces

List<UIComponent> uiViewRootComponentResources = uiViewRoot.getComponentResources(facesContext, "head");
List<UIComponent> uiViewRootStyleSheetResources = null;
List<UIComponent> uiViewRootScriptResources = null;
  uiViewRoot.addComponentResource(facesContext, uiComponentResource, "body");
origin: liferay/liferay-faces

String id = viewRoot.getContainerClientId(facesContext);
responseWriter.writeAttribute("id", id, null);
origin: com.liferay.faces/liferay-faces-bridge-impl

String id = viewRoot.getContainerClientId(facesContext);
responseWriter.writeAttribute("id", id, null);
javax.portlet.faces.componentPortletNamingContainerUIViewRoot

Javadoc

This class satisfies namespacing requirements of Section 6.6 of the specification.

Most used methods

  • getContainerClientId
    Implements NamingContainer semantics. Ensures that the returned identifier contains the consumer (po
  • setId
  • <init>
  • addComponentResource
  • createUniqueId
  • getComponentResources
  • getId

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • requestLocationUpdates (LocationManager)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • JFileChooser (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now