Package org.apache.myfaces.trinidad.context

Examples of org.apache.myfaces.trinidad.context.Agent


    RenderingContext arc
    )
  {

    // First, make sure the agent supports partial rendering
    Agent agent = arc.getAgent();
    Object capPartial = agent.getCapabilities().get(TrinidadAgent.CAP_PARTIAL_RENDERING);
    if (!Boolean.TRUE.equals(capPartial))
      return false;

    return true;
  }
View Full Code Here


    if(columns == null
    {
      return null;
    }
   
    Agent agent = arc.getAgent();
   
    // for input type="text" on the BlackBerry Browser, the size attribute
    // is not honored properly; it generally shows many more characters
    // than specified; note that this only affects input type="text", not
    // textareas
    if(agent != null && Agent.AGENT_BLACKBERRY.equals(agent.getAgentName()))
    {
      boolean isTextArea = isTextArea(bean);
      if(!isTextArea)
      {
        // the 1.7 factor provides a good approximation for various
View Full Code Here

    // In that case RequestContext could also be null.
    // bug 4695929:
    if (afc != null)
    {
      // TODO: Obviously, this cheesy algorithm is not quite enough!
      Agent agent = afc.getAgent();
      if (Agent.TYPE_PDA.equals(agent.getType()))
        return "org.apache.myfaces.trinidad.core.pda";
    }
    return "org.apache.myfaces.trinidad.core.desktop";
  }
View Full Code Here

  @Override
  public Agent getAgent()
  {
    if (_agent == null)
    {
      Agent agent = _agentFactory.createAgent(__getFacesContext());
      // =-=AEW In theory, this does not need to be a TrinidadAgent
      // That should only be necessary once we get to rendering...
      // However, we're gonna have to turn it into one when it comes
      // to rendering time, and our RenderingContext isn't doing this
      // today
View Full Code Here

    RenderingContext arc
    )
  {

    // First, make sure the agent supports partial rendering
    Agent agent = arc.getAgent();
    Object capPartial = agent.getCapabilities().get(TrinidadAgent.CAP_PARTIAL_RENDERING);
    if (!Boolean.TRUE.equals(capPartial))
      return false;

    return true;
  }
View Full Code Here

    final int fType = type;
    final int fBrowser = browser;
    final String fAgentVersion = agentVersion;
    final int fPlatform = platform;

    Agent agent =
            new DefaultAgent ()
            {
              @Override
              public Object getType() {
                return AgentNameUtil.getAgentName(fType);
View Full Code Here

   * @param context
   * @return
   */
  public static TrinidadAgent getAgent(FacesContext context)
  {
    Agent agent = RequestContext.getCurrentInstance().getAgent();
    if (agent instanceof TrinidadAgent)
      return (TrinidadAgent) agent;

    return new TrinidadAgentImpl(context, agent);
  }
View Full Code Here

    if (isUpper)
    {
      // We only generate the navigation bar ID if the agent is IE
      // and partial rendering is enabled.
      Object id = tContext.getTableId();
      Agent agent = arc.getAgent();

      if ((agent.getAgentName() == Agent.AGENT_IE) &&
          PartialPageUtils.isPPRActive(context))
      {
        String navBarID = id.toString() + "-nb";
        setRenderingProperty(arc, _UPPER_NAV_BAR_ID_PROPERTY, navBarID);
      }
View Full Code Here

  @Override
  public Agent getAgent()
  {
    if (_agent == null)
    {
      Agent agent = _agentFactory.createAgent(__getFacesContext());
      // =-=AEW In theory, this does not need to be a TrinidadAgent
      // That should only be necessary once we get to rendering...
      // However, we're gonna have to turn it into one when it comes
      // to rendering time, and our RenderingContext isn't doing this
      // today
View Full Code Here

  @Override
  public Agent getAgent()
  {
    if (_agent == null)
    {
      Agent agent = _agentFactory.createAgent(__getFacesContext());
      // =-=AEW In theory, this does not need to be a TrinidadAgent
      // That should only be necessary once we get to rendering...
      // However, we're gonna have to turn it into one when it comes
      // to rendering time, and our RenderingContext isn't doing this
      // today
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidad.context.Agent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.