javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2043

Resource relocation feature does not work if resource is added during an AJAX request

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Incomplete
    • Affects Version/s: 2.1.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Status Whiteboard:
      Hide

      size_medium importance_medium

      Show
      size_medium importance_medium
    • Tags:

      Description

      If you run the following example, Mojarra will fail to display an alert during an Ajax request:

      <f:view xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <h:head>
      <title>test</title>
      </h:head>
      <h:body>
      <h:form>
      <h:commandButton value="Click Me">
      <f:ajax render="group1" />
      </h:commandButton>
      <h:panelGroup id="group1">
      <c:if test="#

      {facesContext.partialViewContext.ajaxRequest}

      ">
      <h:outputScript target="head">
      alert('Script is called');
      </h:outputScript>
      </c:if>
      </h:panelGroup>

      </h:form>
      </h:body>
      </html>
      </f:view>

      The resource gets relocated during the Ajax request, but it never gets rendered.

      It seems that JSF assumes that resources are always rendered during a full-page request. In reality, we need to deal with resources being added during subsequent Ajax requests, and that should involve being able to distinguish between the resources that already have been sent to the client and the resources that need to be included with the Ajax response. Ideally, this information should be available to legacy (pre-JSF Ajax) implementations as well (as opposed to making it all internal to the JSF Ajax implementation).

        Issue Links

          Activity

          Hide
          rogerk added a comment -

          triage

          Show
          rogerk added a comment - triage
          Hide
          Manfred Riem added a comment -

          Can you verify if this is still a problem in the latest 2.1 release?

          Show
          Manfred Riem added a comment - Can you verify if this is still a problem in the latest 2.1 release?
          Hide
          Manfred Riem added a comment -

          Lowering priority because of no response

          Show
          Manfred Riem added a comment - Lowering priority because of no response
          Hide
          Manfred Riem added a comment -

          Lowering priority because of no response

          Show
          Manfred Riem added a comment - Lowering priority because of no response
          Hide
          Manfred Riem added a comment -

          Closing because of inactivity

          Show
          Manfred Riem added a comment - Closing because of inactivity

            People

            • Assignee:
              Unassigned
              Reporter:
              mst_70
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: