You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Michael Freedman (JIRA)" <de...@myfaces.apache.org> on 2008/01/23 23:30:42 UTC

[jira] Issue Comment Edited: (PORTLETBRIDGE-15) Create Bridge Demo Projects

    [ https://issues.apache.org/jira/browse/PORTLETBRIDGE-15?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561838#action_12561838 ] 

mike_freedman edited comment on PORTLETBRIDGE-15 at 1/23/08 2:30 PM:
------------------------------------------------------------------------

Eduardo,
   I think I know why the HelloDuke sample isn't working.  However, I don't understand why it works in the MyFaces 1.2/bridge environment.  Based on the following can you investigate why this works and let me know?

The Problem relates to JSP vs. JSF EL evaluation.  The HelloDuke sample creates the UserNameBean object via a JSP tag at session scope.  By spec (JSR 168) this object is added to the portletSession's APPLICATION_SCOPE.  However the JSF EL expression (used in the InputText field)  resolves via the ExternalContext.  It relies on the ScopedAttributeResolver as the explicit (session) object is not named. The JSR 301 ExternalContext session impl resolves at PORTLET_SCOPE.  The two expression evaluators are looking at different scopes. This issue/limitation is explicitly cited in the specification (chapter 6).

Because the jsp relies on scoped attribute lookup a fix would be to expand the Bridge's ELResolver to look the attribute up on the APPLICATION_SCOPE.  Though this works for this sample, a potential problem of this is a property is prematurely found -- obscures the correct usage/resolution.  I will have to discuss with the EG to see if this "fix" should go into the spec.  

In the meantime I am a little stumped as to why this sample works for the MyFaces original/built-in bridge.  Its ExternalContext seems to be implemented like the 301 EC pointing to the portlet_scope.  And there doesn't appear to be any portlet based EL resolver to handle the stuff there.  Can you dig into this a little and determine which ELResolver is resolving the UserNameBean in the JSF expression?
    -Mike-


      was (Author: mike_freedman):
    Eduardo,
   I think I know why the HelloDuke sample isn't working.  However, I don't understand why it works in the MyFaces 1.2/bridge environment.  Based on the following can you investigate why this works and let me know?

The Problem relates to JSP vs. JSF EL evaluation.  The HelloDuke sample creates the UserNameBean object via a JSP tag at session scope.  By spec (JSR 168) this object is added to the portletSession's APPLICATION_SCOPE.  However the JSF EL expression (used in the InputText field)  resolves via the ExternalContext.  It relies on the ScopedAttributeResolver as the explicit (session) object is not named. The JSR 301 ExternalContext session impl resolves at PORTLET_SCOPE.  The two expression evaluators are looking at different scopes. This issue/limitation is explicitly cited in the specification (chapter 5).

Because the jsp relies on scoped attribute lookup a fix would be to expand the Bridge's ELResolver to look the attribute up on the APPLICATION_SCOPE.  Though this works for this sample, a potential problem of this is a property is prematurely found -- obscures the correct usage/resolution.  I will have to discuss with the EG to see if this "fix" should go into the spec.  

In the meantime I am a little stumped as to why this sample works for the MyFaces original/built-in bridge.  Its ExternalContext seems to be implemented like the 301 EC pointing to the portlet_scope.  And there doesn't appear to be any portlet based EL resolver to handle the stuff there.  Can you dig into this a little and determine which ELResolver is resolving the UserNameBean in the JSF expression?
    -Mike-

  
> Create Bridge Demo Projects
> ---------------------------
>
>                 Key: PORTLETBRIDGE-15
>                 URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-15
>             Project: MyFaces Portlet Bridge
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 1.0.0-SNAPSHOT
>            Reporter: Scott O'Bryan
>             Fix For: 1.0.0-SNAPSHOT
>
>         Attachments: portlet.xml
>
>
> The MyFaces Portlet Bridge is currently under active development for use as the R.I. for JSR-301.  There are a log of challenges to setting up test cases and projects for this bridge which will hamper accurate development and testing.  Therefore I think we need a series of demo project and project templates to be used with some official documentation that could guide the developer into quickly setting up a demo application using the Bridge so that various scenarios could be tested.
> I personally think that a self-contained HelloWorld! JSF application would be fine to start off with and would provide us the ability to expand upon in the future.  It would be best if this application could be built either with MyFaces 1.2 (including the jars in the portlet war file) OR built without the Jars for use in a true J2EE5 compatible container.  The ability to run in many portals would be ideal and this should be the goal of the bridge's project in general, but an initial test using Pluto is probably sufficient to start off with.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.