javax.faces.view.Location.getPath()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(8.3k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中javax.faces.view.Location.getPath()方法的一些代码示例,展示了Location.getPath()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Location.getPath()方法的具体详情如下:
包路径:javax.faces.view.Location
类名称:Location
方法名:getPath

Location.getPath介绍

[英]Return the file path to the page represented by this location.
[中]将文件路径返回到此位置表示的页面。

代码示例

代码示例来源:origin: org.apache.myfaces.core/myfaces-impl

public LocationMethodExpression apply(int newCCLevel, Location newLocation)
{
  if(this.ccLevel == newCCLevel && this.location.getPath().equals(newLocation.getPath()))
  {
    return this;
  }
  else
  {
    return new LocationMethodExpression(newLocation, this.delegate, newCCLevel);
  }
}

代码示例来源:origin: org.apache.myfaces.core/myfaces-impl

public LocationValueExpression apply(int newCCLevel, Location newLocation)
{
  if(this.ccLevel == newCCLevel && this.location.getPath().equals(newLocation.getPath()))
  {
    return this;
  }
  else
  {
    return new LocationValueExpression(newLocation, this.delegate, newCCLevel);
  }
}

代码示例来源:origin: com.sun.faces/jsf-impl

/**
 * @return <code>true</code> if the argument handler is from the same
 *         template source as the argument <code>Resource</code> otherwise
 *         <code>false</code>
 */
protected boolean resourcesMatch(Resource compositeResource,
                 Location handlerLocation) {
  String resName = compositeResource.getResourceName();
  return (handlerLocation.getPath().contains(resName));
}

代码示例来源:origin: org.glassfish/jakarta.faces

/**
 * @return <code>true</code> if the argument handler is from the same
 *         template source as the argument <code>Resource</code> otherwise
 *         <code>false</code>
 */
protected boolean resourcesMatch(Resource compositeResource,
                 Location handlerLocation) {
  String resName = compositeResource.getResourceName();
  return (handlerLocation.getPath().contains(resName));
}

代码示例来源:origin: org.glassfish/javax.faces

/**
 * @return <code>true</code> if the argument handler is from the same
 *         template source as the argument <code>Resource</code> otherwise
 *         <code>false</code>
 */
protected boolean resourcesMatch(Resource compositeResource,
                 Location handlerLocation) {
  String resName = compositeResource.getResourceName();
  return (handlerLocation.getPath().contains(resName));
}

代码示例来源:origin: eclipse-ee4j/mojarra

/**
 * @return <code>true</code> if the argument handler is from the same
 *         template source as the argument <code>Resource</code> otherwise
 *         <code>false</code>
 */
protected boolean resourcesMatch(Resource compositeResource,
                 Location handlerLocation) {
  String resName = compositeResource.getResourceName();
  return (handlerLocation.getPath().contains(resName));
}

代码示例来源:origin: org.apache.myfaces.core/myfaces-impl

public static UIComponent getCompositeComponentBasedOnLocation(final FacesContext facesContext, 
    UIComponent baseComponent, final Location location)
{
  UIComponent currentComponent = baseComponent;
  while (currentComponent != null)
  {
    Location componentLocation = (Location) currentComponent.getAttributes().get(
      LOCATION_KEY);
    if (componentLocation != null 
        && componentLocation.getPath().equals(location.getPath()))
    {
      return currentComponent;
    }
    // get the composite component's parent
    currentComponent = UIComponent.getCompositeComponentParent(currentComponent);
  }
  return null;
}

代码示例来源:origin: org.apache.myfaces.core/myfaces-shaded-impl

&& componentLocation.getPath().equals(location.getPath()))
&& componentLocation.getPath().equals(location.getPath()))

代码示例来源:origin: net.bootsfaces/bootsfaces

@Override
public Tag decorate(Tag tag) {
  TagAttribute decorator = tag.getAttributes().get("bootsFacesDecorator");
  String page = tag.getLocation().getPath();
  if (decorator != null) {
    boolean decoratorActive = "true".equalsIgnoreCase(decorator.getValue());
    Boolean isActive = activePages.get(page);
    if (isActive == null) {
      activePages.put(page, decoratorActive);
    } else if (isActive.booleanValue() != decoratorActive) {
      activePages.remove(page);
      activePages.put(page, decoratorActive);
    }
  }
  Boolean isActive = activePages.get(page);
  if (isActive == null) {
    isActive = activeByDefault;
  }
  if (isActive == Boolean.TRUE) {
    Tag newTag = addSearchExpressionResolver(tag);
    return newTag;
  } else {
    return tag;
  }
}

代码示例来源:origin: org.apache.myfaces.core.internal/myfaces-shaded-impl

&& componentLocation.getPath().equals(location.getPath()))
&& componentLocation.getPath().equals(location.getPath()))

代码示例来源:origin: TheCoder4eu/BootsFaces-OSP

@Override
public Tag decorate(Tag tag) {
  TagAttribute decorator = tag.getAttributes().get("bootsFacesDecorator");
  String page = tag.getLocation().getPath();
  if (decorator != null) {
    boolean decoratorActive = "true".equalsIgnoreCase(decorator.getValue());
    Boolean isActive = activePages.get(page);
    if (isActive == null) {
      activePages.put(page, decoratorActive);
    } else if (isActive.booleanValue() != decoratorActive) {
      activePages.remove(page);
      activePages.put(page, decoratorActive);
    }
  }
  Boolean isActive = activePages.get(page);
  if (isActive == null) {
    isActive = activeByDefault;
  }
  if (isActive == Boolean.TRUE) {
    Tag newTag = addSearchExpressionResolver(tag);
    return newTag;
  } else {
    return tag;
  }
}

代码示例来源:origin: net.bootsfaces/bootsfaces

@Override
public Tag decorate(Tag tag) {
  TagAttribute decorator = tag.getAttributes().get("bootsFacesDecorator");
  String page = tag.getLocation().getPath();
  if (decorator != null) {
    boolean decoratorActive = "true".equalsIgnoreCase(decorator.getValue());
    Boolean isActive = activePages.get(page);
    if (isActive == null) {
      activePages.put(page, decoratorActive);
    } else if (isActive.booleanValue() != decoratorActive) {
      activePages.remove(page);
      activePages.put(page, decoratorActive);
    }
  }
  Boolean isActive = activePages.get(page);
  if (isActive == null) {
    isActive=activeByDefault;
  }
  if (isActive == Boolean.TRUE) {
    Tag newTag = createTags(tag);
    newTag = addSearchExpressionResolver(newTag);
    return newTag;
  } else {
    return tag;
  }
}

代码示例来源:origin: TheCoder4eu/BootsFaces-OSP

@Override
public Tag decorate(Tag tag) {
  TagAttribute decorator = tag.getAttributes().get("bootsFacesDecorator");
  String page = tag.getLocation().getPath();
  if (decorator != null) {
    boolean decoratorActive = "true".equalsIgnoreCase(decorator.getValue());
    Boolean isActive = activePages.get(page);
    if (isActive == null) {
      activePages.put(page, decoratorActive);
    } else if (isActive.booleanValue() != decoratorActive) {
      activePages.remove(page);
      activePages.put(page, decoratorActive);
    }
  }
  Boolean isActive = activePages.get(page);
  if (isActive == null) {
    isActive=activeByDefault;
  }
  if (isActive == Boolean.TRUE) {
    Tag newTag = createTags(tag);
    newTag = addSearchExpressionResolver(newTag);
    return newTag;
  } else {
    return tag;
  }
}

代码示例来源:origin: org.apache.myfaces.core/myfaces-impl

&& componentLocation.getPath().equals(location.getPath()))

代码示例来源:origin: com.sun.faces/jsf-impl

Stack<UIComponent> s = sh.getStack(false);
if (s != null) {
  String path = location.getPath();
  for (int i = s.size(); i > 0; i--) {
    UIComponent cc = s.get(i - 1);
  String path = location.getPath();
  UIComponent cc = UIComponent.getCurrentCompositeComponent(ctx);
  while (cc != null) {

代码示例来源:origin: org.glassfish/javax.faces

Stack<UIComponent> s = sh.getStack(false);
if (s != null) {
  String path = location.getPath();
  for (int i = s.size(); i > 0; i--) {
    UIComponent cc = s.get(i - 1);
  String path = location.getPath();
  UIComponent cc = UIComponent.getCurrentCompositeComponent(ctx);
  while (cc != null) {

代码示例来源:origin: org.glassfish/jakarta.faces

Stack<UIComponent> s = sh.getStack(false);
if (s != null) {
  String path = location.getPath();
  for (int i = s.size(); i > 0; i--) {
    UIComponent cc = s.get(i - 1);
  String path = location.getPath();
  UIComponent cc = UIComponent.getCurrentCompositeComponent(ctx);
  while (cc != null) {

代码示例来源:origin: eclipse-ee4j/mojarra

Stack<UIComponent> s = sh.getStack(false);
if (s != null) {
  String path = location.getPath();
  for (int i = s.size(); i > 0; i--) {
    UIComponent cc = s.get(i - 1);
  String path = location.getPath();
  UIComponent cc = UIComponent.getCurrentCompositeComponent(ctx);
  while (cc != null) {

代码示例来源:origin: org.apache.myfaces.core/myfaces-impl

&& componentLocation.getPath().equals(location.getPath()) && 
(ccLevel == getCCLevel(currentCompositeComponent)) )
      && foundComponentLocation.getPath().equals(location.getPath()) &&
      ccLevel == getCCLevel(foundComponent))
          = (Location) foundComponent.getAttributes().get(LOCATION_KEY);
      if (componentLocation != null 
          && componentLocation.getPath().equals(location.getPath()) &&
          ccLevel == getCCLevel(foundComponent))
&& componentLocation.getPath().equals(location.getPath()) &&
ccLevel == getCCLevel(currentComponent))

代码示例来源:origin: org.apache.myfaces.core/myfaces-impl

&& componentLocation.getPath().equals(location.getPath()) &&
(ccLevel == getCCLevel(currentComponent)) )

相关文章