[ 
https://issues.apache.org/jira/browse/TRINIDAD-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106591#comment-13106591
 ] 

Scott O'Bryan commented on TRINIDAD-119:
----------------------------------------

Okay, I talked with Andy Schwartz about this and yes, it seems like this would 
be an issue.  The reason that the servlet mapping doesn't work is simply 
because this logic really looks for the existence of the __ADFv__ mapping on 
the url.

The thing is that we both think the proper place to handle this scenario is in 
Trinidad's ViewHandler.  The code we use to get the internal view is a bit 
simplistic and should restore the view id correctly..


private InternalView _getInternalView(
    FacesContext context, 
    String       viewId)
  {
    InternalView internal = _internalViews.get(viewId);
    if (internal == null)
    {
      // If we're using suffix-mapping, then any internal viewId will
      // get affixed with ".jsp" or ".jspx";  try trimming that off
      // if present
      ExternalContext external = context.getExternalContext();
      
      // Only bother when using suffix-mapping (path info will always
      // be non-null for prefix-mapping)
      if (external.getRequestPathInfo() == null)
      {
        String suffix = external.getInitParameter("javax.faces.DEFAULT_SUFFIX");
        if (suffix == null)
          suffix = ".jspx";
        
        if (viewId.endsWith(suffix))
        {
          String viewIdWithoutSuffix = viewId.substring(
             0, viewId.length() - suffix.length());
          internal = _internalViews.get(viewIdWithoutSuffix);
        }
      }
    }

    return internal;
  }


I don't have time to fix this right now, but if someone else would want to make 
a patch, I'll commit it ASAP.  Otherwise, I'll try to get to it.

> InputDate popup crashes when using extension mapping
> ----------------------------------------------------
>
>                 Key: TRINIDAD-119
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-119
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>    Affects Versions: 1.2.1-core
>         Environment: Apache Tomcat 6.0.13, JDK 1.6.02, Facelets 1.1.11, 
> Trinidad 1.2.1, MyFaces 1.2.0, Ajax4jsf 1.0.6
>            Reporter: Jan-Kees van Andel
>            Assignee: Scott O'Bryan
>         Attachments: MyFacesBugFixFilter.java, MyFacesBugFixFilter.java, 
> TRINIDAD-119-trinidad-impl.patch
>
>
> If I use extension mapping (*.faces), my inputDate component crashes with a 
> 404 when I click on the button.
> The message is:
> "The requested resource (/mblf/__ADFv__) is not available."
> When using prefix mapping (/faces/), everything works fine. The URL it 
> references is:
> http://localhost:8080/mblf/faces/__ADFv__?_t=fred&_red=cd&value=1185058800000&loc=en

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to