Package org.apache.myfaces.trinidad.context

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


  @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


    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

          // BlackBerry browsers underline the entire text instead of just 
          // the accessKey character in cases where the accessKey character  
          // happens to be the first character in the text. Rendering an  
          // empty span element before rendering the text fixes this problem.
         
          Agent agent = arc.getAgent();
              
          if ((accessKeyIndex == 0) &&
               Agent.AGENT_BLACKBERRY.equals(agent.getAgentName()))
          {
            rw.startElement("span", null);
            // Since an empty span element is not rendered, lets
            // include some attribute to the span element
            rw.writeAttribute("style", "display:inline", null);
View Full Code Here

    if ((null != messageType) &&
        !"none".equals(messageType) ||
        ((forId != null) &&
        isInline))
    {
      Agent agent = arc.getAgent();

      if ((agent != null) &&
            (Agent.AGENT_BLACKBERRY.equals(agent.getAgentName()) ||
             Agent.AGENT_GENERICPDA.equals(agent.getAgentName())) &&
          (null == messageType || "none".equals(messageType)))
      {
        return false;
      }
      return true;
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

  @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

    RenderingContext rc,
    UIComponent      component,
    FacesBean        bean
    ) throws IOException
  {
    Agent agent = rc.getAgent();

    // BlackBerry and many pda browsers don't support inline style of
    // display:none. Thus, it is necessary to slip rendering entire
    // element if there is no message to display.
    // This method checks for the condition and returns true.

    if (agent != null &&
                 (Agent.AGENT_BLACKBERRY.equals(agent.getAgentName()) ||
                  Agent.AGENT_GENERICPDA.equals(agent.getAgentName()) ))
    {
      boolean hasMessages =
                    FacesContext.getCurrentInstance().getMessages().hasNext();
      if (!hasMessages)
      {
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.