MyFaces Core
  1. MyFaces Core
  2. MYFACES-244

jsp:param for subviews works in the RI but not in MyFaces

    Details

    • Type: Bug Bug
    • Status: Reopened
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.1.5
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      tomcat 5.0.28, myfaces 1.1.5

      Description

      In the myFaces implementation you can't pass parameters to subviews but you can in the Ref. Impl.

      ------------------------------------------------------------
      <!-- welcome.jsp -->
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      <%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>

      <html>
      <head>
      <title>Welcome!</title>
      </head>
      <body>
      <f:view>
      <h:form>

      Hello, this is content from the calling page.

      <f:subview id="mySubviewPage">
      <jsp:include page="mySubviewPage.jsp" flush="true">
      <jsp:param name="parameterXXX" value="The value of parameter XXX is this string."/>
      </jsp:include>
      </f:subview>

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

      ------------------------------------------------------------
      <!-- mySubviewPage.jsp -->
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      <%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>

      <f:subview id="headerSubview">

      <f:verbatim>
      <p>This is mySubviewPage content.</p>
      </f:verbatim>

      <Unable to render embedded object: File (-- This doesn't work in myFaces but does in the RI) not found.!! -->
      <h:outputText value="#

      {param.parameterXXX}

      "/>

      </f:subview>

        Activity

        LeRoy Mattingly created issue -
        Hide
        Pino Silvaggio added a comment -

        Well, I tried this and it seems to work for me.
        Don't see any problems.

        Show
        Pino Silvaggio added a comment - Well, I tried this and it seems to work for me. Don't see any problems.
        Hide
        Martin Marinschek added a comment -

        As one of our users has tried this and it seems to work, I close that - we can always reopen it with a better test-case

        Show
        Martin Marinschek added a comment - As one of our users has tried this and it seems to work, I close that - we can always reopen it with a better test-case
        Martin Marinschek made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Martin Marinschek [ mmarinschek ]
        Resolution Cannot Reproduce [ 5 ]
        sean schofield made changes -
        Workflow jira [ 42644 ] MyFaces Workflow [ 12347700 ]
        sean schofield made changes -
        Workflow MyFaces Workflow [ 12347700 ] MyFaces Workflow2 [ 12349181 ]
        sean schofield made changes -
        Workflow MyFaces Workflow [ 12347700 ] MyFaces Workflow2 [ 12349225 ]
        sean schofield made changes -
        Workflow MyFaces Workflow [ 12347700 ] MyFaces Workflow2 [ 12349316 ]
        sean schofield made changes -
        Workflow MyFaces Workflow2 [ 12349316 ] MyFaces Workflow [ 12353799 ]
        sean schofield made changes -
        Workflow MyFaces Workflow [ 12353799 ] MyFaces Workflow2 [ 12355372 ]
        sean schofield made changes -
        Workflow MyFaces Workflow2 [ 12355372 ]  MyFaces Workflow [ 12356924 ]
        sean schofield made changes -
        Workflow  MyFaces Workflow [ 12356924 ] MyFaces Workflow2 [ 12358076 ]
        sean schofield made changes -
        Workflow  MyFaces Workflow [ 12358076 ] MyFaces Workflow2 [ 12358565 ]
        sean schofield made changes -
        Workflow  MyFaces Workflow [ 12358565 ] MyFaces Workflow2 [ 12359166 ]
        sean schofield made changes -
        Workflow  MyFaces Workflow [ 12359166 ] MyFaces Workflow2 [ 12359755 ]
        Hide
        Stephen Cooper added a comment -

        I'm able to recreate this issue - it's going to cause us a fair amount of issues very quickly.

        <%-- index.jsp --%>
        <%@ page language="java" pageEncoding="ISO-8859-1"%>
        <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
        <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
        <f:view>
        <h:panelGrid columns="1">
        <h:outputText value="This is my JSP page."/>
        </h:panelGrid>
        <f:subview id="subpage">
        <jsp:include flush="true" page="subpage.jsp">
        <jsp:param name="test" value="Hello world!"/>
        </jsp:include>
        </f:subview>
        </f:view>

        <%-- subpage.jsp --%>
        <%@ page language="java" pageEncoding="ISO-8859-1"%>
        <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
        <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
        <h:panelGrid columns="1">
        <h:outputText value="We should see text below here"/>
        <h:outputText value="#

        {param.test}

        "></h:outputText>
        <h:outputText value="We should see text above here"/>
        </h:panelGrid>

        This displays the following with the RI:
        This is my JSP page.
        We should see text below here
        Hello world!
        We should see text above here

        and the following with MyFaces 1.1.5:
        This is my JSP page.
        We should see text below here

        We should see text above here

        Show
        Stephen Cooper added a comment - I'm able to recreate this issue - it's going to cause us a fair amount of issues very quickly. <%-- index.jsp --%> <%@ page language="java" pageEncoding="ISO-8859-1"%> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <f:view> <h:panelGrid columns="1"> <h:outputText value="This is my JSP page."/> </h:panelGrid> <f:subview id="subpage"> <jsp:include flush="true" page="subpage.jsp"> <jsp:param name="test" value="Hello world!"/> </jsp:include> </f:subview> </f:view> <%-- subpage.jsp --%> <%@ page language="java" pageEncoding="ISO-8859-1"%> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <h:panelGrid columns="1"> <h:outputText value="We should see text below here"/> <h:outputText value="# {param.test} "></h:outputText> <h:outputText value="We should see text above here"/> </h:panelGrid> This displays the following with the RI: This is my JSP page. We should see text below here Hello world! We should see text above here and the following with MyFaces 1.1.5: This is my JSP page. We should see text below here We should see text above here
        Stephen Cooper made changes -
        Affects Version/s 1.1.5 [ 12312310 ]
        Priority Major [ 3 ] Critical [ 2 ]
        Environment n/a tomcat 5.0.28, myfaces 1.1.5
        Hide
        Stephen Cooper added a comment -

        I can't re-open this bug (probably by design). Please re-open.

        Show
        Stephen Cooper added a comment - I can't re-open this bug (probably by design). Please re-open.
        Hide
        LeRoy Mattingly added a comment -

        I'm reopening per Stephen Cooper's request.

        Show
        LeRoy Mattingly added a comment - I'm reopening per Stephen Cooper's request.
        LeRoy Mattingly made changes -
        Status Closed [ 6 ] Reopened [ 4 ]
        Resolution Cannot Reproduce [ 5 ]
        Hide
        nikolaos georgosoulos added a comment -

        I just found out that in the RI it only works when the jsp:include is not inside an h:panelGrid. PanelGrid seam to be causing problems anyway. Yet, in myfaces impl. the problem exists even without the panelgrid

        Show
        nikolaos georgosoulos added a comment - I just found out that in the RI it only works when the jsp:include is not inside an h:panelGrid. PanelGrid seam to be causing problems anyway. Yet, in myfaces impl. the problem exists even without the panelgrid
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        19d 20h 54m 1 Martin Marinschek 05/Jun/05 23:25
        Closed Closed Reopened Reopened
        726d 2h 13m 1 LeRoy Mattingly 02/Jun/07 01:38

          People

          • Assignee:
            Martin Marinschek
            Reporter:
            LeRoy Mattingly
          • Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Development