You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2008/05/14 03:51:56 UTC

[jira] Created: (PORTLETBRIDGE-34) Bridge does not work with Myfaces with state saving = client

Bridge does not work with Myfaces with state saving = client
------------------------------------------------------------

                 Key: PORTLETBRIDGE-34
                 URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-34
             Project: MyFaces Portlet Bridge
          Issue Type: Bug
    Affects Versions: 1.0.0-alpha-2
         Environment: windows xp, tomcat 6.0.16 and jetty, pluto
            Reporter: Leonardo Uribe
         Attachments: patchPortletBridgeMyfaces.patch


The javax.faces.ViewState hidden field is not rendered!

The problem is on PortletViewHandlerImpl.java. The field:

    private static final String SAVESTATE_FIELD_MARKER = "~com.sun.faces.saveStateFieldMarker~";

Is the problem. If ri is present this is the value, if not myfaces state field marker should be used

I will attach a patch (the easiest solution that I could find), and if no objections, I'll commit it.

Reproduce the error is simple. Just use archetype for portlets and change the param

javax.faces.STATE_SAVING_METHOD

to client

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


[jira] Commented: (PORTLETBRIDGE-34) Bridge does not work with Myfaces with state saving = client

Posted by "Scott O'Bryan (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/PORTLETBRIDGE-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596628#action_12596628 ] 

Scott O'Bryan commented on PORTLETBRIDGE-34:
--------------------------------------------

Hey thanks for the patch Leonardo.  I don't have time to look at it right now, but I thought we had this fixed in trunk.  Let me ping Mike Freedman tomorrow to take a look at it and I'll get back to you.

I'm reluctant to add Implementation specific changes to get this stuff to work, but we may well need to.


> Bridge does not work with Myfaces with state saving = client
> ------------------------------------------------------------
>
>                 Key: PORTLETBRIDGE-34
>                 URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-34
>             Project: MyFaces Portlet Bridge
>          Issue Type: Bug
>    Affects Versions: 1.0.0-alpha-2
>         Environment: windows xp, tomcat 6.0.16 and jetty, pluto
>            Reporter: Leonardo Uribe
>         Attachments: patchPortletBridgeMyfaces.patch
>
>
> The javax.faces.ViewState hidden field is not rendered!
> The problem is on PortletViewHandlerImpl.java. The field:
>     private static final String SAVESTATE_FIELD_MARKER = "~com.sun.faces.saveStateFieldMarker~";
> Is the problem. If ri is present this is the value, if not myfaces state field marker should be used
> I will attach a patch (the easiest solution that I could find), and if no objections, I'll commit it.
> Reproduce the error is simple. Just use archetype for portlets and change the param
> javax.faces.STATE_SAVING_METHOD
> to client

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


[jira] Updated: (PORTLETBRIDGE-34) Bridge does not work with Myfaces with state saving = client

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/PORTLETBRIDGE-34?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe updated PORTLETBRIDGE-34:
----------------------------------------

    Status: Patch Available  (was: Open)

> Bridge does not work with Myfaces with state saving = client
> ------------------------------------------------------------
>
>                 Key: PORTLETBRIDGE-34
>                 URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-34
>             Project: MyFaces Portlet Bridge
>          Issue Type: Bug
>    Affects Versions: 1.0.0-alpha-2
>         Environment: windows xp, tomcat 6.0.16 and jetty, pluto
>            Reporter: Leonardo Uribe
>         Attachments: patchPortletBridgeMyfaces.patch
>
>
> The javax.faces.ViewState hidden field is not rendered!
> The problem is on PortletViewHandlerImpl.java. The field:
>     private static final String SAVESTATE_FIELD_MARKER = "~com.sun.faces.saveStateFieldMarker~";
> Is the problem. If ri is present this is the value, if not myfaces state field marker should be used
> I will attach a patch (the easiest solution that I could find), and if no objections, I'll commit it.
> Reproduce the error is simple. Just use archetype for portlets and change the param
> javax.faces.STATE_SAVING_METHOD
> to client

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


[jira] Commented: (PORTLETBRIDGE-34) Bridge does not work with Myfaces with state saving = client

Posted by "Scott O'Bryan (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/PORTLETBRIDGE-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596821#action_12596821 ] 

Scott O'Bryan commented on PORTLETBRIDGE-34:
--------------------------------------------

Yeah, I think I like this better.  Mike is also going to file an issue with the JSF2.0 folks so that this value may either be standardized or exposed though a constant.  For now though, Mike's suggestion covers the two major JSF implementations and allows for others to be plugged in.

What do you think Leonardo, is it doable?

> Bridge does not work with Myfaces with state saving = client
> ------------------------------------------------------------
>
>                 Key: PORTLETBRIDGE-34
>                 URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-34
>             Project: MyFaces Portlet Bridge
>          Issue Type: Bug
>    Affects Versions: 1.0.0-alpha-2
>         Environment: windows xp, tomcat 6.0.16 and jetty, pluto
>            Reporter: Leonardo Uribe
>         Attachments: patchPortletBridgeMyfaces.patch
>
>
> The javax.faces.ViewState hidden field is not rendered!
> The problem is on PortletViewHandlerImpl.java. The field:
>     private static final String SAVESTATE_FIELD_MARKER = "~com.sun.faces.saveStateFieldMarker~";
> Is the problem. If ri is present this is the value, if not myfaces state field marker should be used
> I will attach a patch (the easiest solution that I could find), and if no objections, I'll commit it.
> Reproduce the error is simple. Just use archetype for portlets and change the param
> javax.faces.STATE_SAVING_METHOD
> to client

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


[jira] Updated: (PORTLETBRIDGE-34) Bridge does not work with Myfaces with state saving = client

Posted by "Michael Freedman (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/PORTLETBRIDGE-34?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Freedman updated PORTLETBRIDGE-34:
------------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0
                   1.0.0
           Status: Resolved  (was: Patch Available)

Changes committed in JIRA-36 (checkin to bring us up to date with revision 14) include this fix.

> Bridge does not work with Myfaces with state saving = client
> ------------------------------------------------------------
>
>                 Key: PORTLETBRIDGE-34
>                 URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-34
>             Project: MyFaces Portlet Bridge
>          Issue Type: Bug
>    Affects Versions: 1.0.0-alpha-2
>         Environment: windows xp, tomcat 6.0.16 and jetty, pluto
>            Reporter: Leonardo Uribe
>             Fix For: 1.0.0, 2.0.0
>
>         Attachments: jira_34.patch, patchPortletBridgeMyfaces.patch, patchPortletBridgeMyfacesVer2.patch
>
>
> The javax.faces.ViewState hidden field is not rendered!
> The problem is on PortletViewHandlerImpl.java. The field:
>     private static final String SAVESTATE_FIELD_MARKER = "~com.sun.faces.saveStateFieldMarker~";
> Is the problem. If ri is present this is the value, if not myfaces state field marker should be used
> I will attach a patch (the easiest solution that I could find), and if no objections, I'll commit it.
> Reproduce the error is simple. Just use archetype for portlets and change the param
> javax.faces.STATE_SAVING_METHOD
> to client

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


[jira] Commented: (PORTLETBRIDGE-34) Bridge does not work with Myfaces with state saving = client

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/PORTLETBRIDGE-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596966#action_12596966 ] 

Leonardo Uribe commented on PORTLETBRIDGE-34:
---------------------------------------------

I don't know the architecture of the portlet bridge very well. Does exists a class where the init param should be defined (the constant)? like in myfaces exists MyfacesConfig.class?

If no objections I'll commit the new patch.

> Bridge does not work with Myfaces with state saving = client
> ------------------------------------------------------------
>
>                 Key: PORTLETBRIDGE-34
>                 URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-34
>             Project: MyFaces Portlet Bridge
>          Issue Type: Bug
>    Affects Versions: 1.0.0-alpha-2
>         Environment: windows xp, tomcat 6.0.16 and jetty, pluto
>            Reporter: Leonardo Uribe
>         Attachments: patchPortletBridgeMyfaces.patch, patchPortletBridgeMyfacesVer2.patch
>
>
> The javax.faces.ViewState hidden field is not rendered!
> The problem is on PortletViewHandlerImpl.java. The field:
>     private static final String SAVESTATE_FIELD_MARKER = "~com.sun.faces.saveStateFieldMarker~";
> Is the problem. If ri is present this is the value, if not myfaces state field marker should be used
> I will attach a patch (the easiest solution that I could find), and if no objections, I'll commit it.
> Reproduce the error is simple. Just use archetype for portlets and change the param
> javax.faces.STATE_SAVING_METHOD
> to client

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


[jira] Commented: (PORTLETBRIDGE-34) Bridge does not work with Myfaces with state saving = client

Posted by "Michael Freedman (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/PORTLETBRIDGE-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597170#action_12597170 ] 

Michael Freedman commented on PORTLETBRIDGE-34:
-----------------------------------------------

This isn't exactly what I had in mind:
    1) I prefer to not use instanceof to determine if we are running in myFaces
    2) I prefer to determine the marker that should be used by actually finding the marker in the response.   I.e. if we don't know the market from a previous render we search the response first for the marker identified by the init param -- if not the right one then the RIs market -- and still if noit the right one, the MyFaces marker.

As for where to put the constant -- it belongs in javax.portlet.faces.Bridge.java

Can you make these modifications or If you would prefer, I can do this next week when I return from my business trip?

> Bridge does not work with Myfaces with state saving = client
> ------------------------------------------------------------
>
>                 Key: PORTLETBRIDGE-34
>                 URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-34
>             Project: MyFaces Portlet Bridge
>          Issue Type: Bug
>    Affects Versions: 1.0.0-alpha-2
>         Environment: windows xp, tomcat 6.0.16 and jetty, pluto
>            Reporter: Leonardo Uribe
>         Attachments: patchPortletBridgeMyfaces.patch, patchPortletBridgeMyfacesVer2.patch
>
>
> The javax.faces.ViewState hidden field is not rendered!
> The problem is on PortletViewHandlerImpl.java. The field:
>     private static final String SAVESTATE_FIELD_MARKER = "~com.sun.faces.saveStateFieldMarker~";
> Is the problem. If ri is present this is the value, if not myfaces state field marker should be used
> I will attach a patch (the easiest solution that I could find), and if no objections, I'll commit it.
> Reproduce the error is simple. Just use archetype for portlets and change the param
> javax.faces.STATE_SAVING_METHOD
> to client

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


[jira] Commented: (PORTLETBRIDGE-34) Bridge does not work with Myfaces with state saving = client

Posted by "Michael Freedman (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/PORTLETBRIDGE-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596816#action_12596816 ] 

Michael Freedman commented on PORTLETBRIDGE-34:
-----------------------------------------------

My preference is to solve this generically in case we run across other Faces impls with differing savestate field markers.  What I propose is the Bridge read a web.xml init/config parameter called javax.portlet.faces.SAVESTATE_FIELD_MARKER.  This will allow an application to specify the specific field_marker for a given Faces impl.  The StringBuilderWriter in PortletViewHandlerImpl would be implemented as follows:  It would define two static final constants -- one for the Faces RI marker and one for the MyFaces marker.  It would define a static String to hold the actual market in use (default to null).  In the write() method that references the saveStateFieldMarker we would put a check to see if the static variable holding the current marker is null -- if it is we would call a new private method that would determine the market in use.  It would be determined as follows:
     a) first get the web.xml config parameter javax.portlet.faces.SAVESTATE_FIELD_MARKER, if non-null then see if its the marker.  If its not ...
     b) try the Faces RI marker.  If its not ...
     c) try the MyFaces marker.
      Set the static variable to the found marker.
The rest of the write method would proceed as its currently implemented except it would use the static variable holding the current marker vs. the constant.

Sound okay?  Do you want to implement and submit a new patch for our review?

> Bridge does not work with Myfaces with state saving = client
> ------------------------------------------------------------
>
>                 Key: PORTLETBRIDGE-34
>                 URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-34
>             Project: MyFaces Portlet Bridge
>          Issue Type: Bug
>    Affects Versions: 1.0.0-alpha-2
>         Environment: windows xp, tomcat 6.0.16 and jetty, pluto
>            Reporter: Leonardo Uribe
>         Attachments: patchPortletBridgeMyfaces.patch
>
>
> The javax.faces.ViewState hidden field is not rendered!
> The problem is on PortletViewHandlerImpl.java. The field:
>     private static final String SAVESTATE_FIELD_MARKER = "~com.sun.faces.saveStateFieldMarker~";
> Is the problem. If ri is present this is the value, if not myfaces state field marker should be used
> I will attach a patch (the easiest solution that I could find), and if no objections, I'll commit it.
> Reproduce the error is simple. Just use archetype for portlets and change the param
> javax.faces.STATE_SAVING_METHOD
> to client

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


[jira] Commented: (PORTLETBRIDGE-34) Bridge does not work with Myfaces with state saving = client

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/PORTLETBRIDGE-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597276#action_12597276 ] 

Leonardo Uribe commented on PORTLETBRIDGE-34:
---------------------------------------------

I prefer that you do it (no need to rush), since you have more clear what this should looks like and the solution on the patch is enough for my needs (work on MYFACES-434).

 I'm not modify javax.portlet.faces.Bridge.java, because add a constant here could cause problems of binary incompatibility, but I don't know if the bridge works like jsf (has a public api that should be the same for all impls).

> Bridge does not work with Myfaces with state saving = client
> ------------------------------------------------------------
>
>                 Key: PORTLETBRIDGE-34
>                 URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-34
>             Project: MyFaces Portlet Bridge
>          Issue Type: Bug
>    Affects Versions: 1.0.0-alpha-2
>         Environment: windows xp, tomcat 6.0.16 and jetty, pluto
>            Reporter: Leonardo Uribe
>         Attachments: patchPortletBridgeMyfaces.patch, patchPortletBridgeMyfacesVer2.patch
>
>
> The javax.faces.ViewState hidden field is not rendered!
> The problem is on PortletViewHandlerImpl.java. The field:
>     private static final String SAVESTATE_FIELD_MARKER = "~com.sun.faces.saveStateFieldMarker~";
> Is the problem. If ri is present this is the value, if not myfaces state field marker should be used
> I will attach a patch (the easiest solution that I could find), and if no objections, I'll commit it.
> Reproduce the error is simple. Just use archetype for portlets and change the param
> javax.faces.STATE_SAVING_METHOD
> to client

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