You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Simon Lessard <si...@gmail.com> on 2007/08/15 22:54:15 UTC

[TRINIDAD] PPR problem with 1.2.2 branch

Hello all,

The following page fail to update after the PPR event with current
1.2.2branch using RI on OC4J 11g beta (container should not be the
issue here
though, nor should RI). test managed bean is a session scoped bean with a
single r/w value property. Anyone else can reproduce the issue?

<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:tr="http://myfaces.apache.org/trinidad">
  <jsp:directive.page contentType="text/html;charset=windows-1252"/>
  <f:view>
    <tr:document title="Test">
      <tr:form>
        <tr:inputText id="testField" label="test" value="#{test.value}"
autoSubmit="true"/>
        <tr:outputText value="Ok!" partialTriggers="testField" rendered="#{
test.value == 'foo'}"/>
      </tr:form>
    </tr:document>
  </f:view>
</jsp:root>

public class TestBean
{
  private String value;

  public TestBean()
  {
  }

  public void setValue(String param)
  {
    this.value = param;
  }

  public String getValue()
  {
    return value;
  }
}

Regards,

~ Simon

Re: [TRINIDAD] PPR problem with 1.2.2 branch

Posted by Adam Winer <aw...@gmail.com>.
On 8/16/07, Adam Winer <aw...@gmail.com> wrote:
> On 8/15/07, Simon Lessard <si...@gmail.com> wrote:
> > Please also note that I'm stupid and forgot the always rendered panelGroup
> > around the outputText to set the partialTriggers...
>
> That shouldn't be necessary at all!  I'll have a look at this,
> and the nested table bug listed below.

D'oh!  Never mind...  didn't notice that you were toggling
rendered in the example - yeah, that's not a bug.  The
nested table one is still worrisome though!

-- Adam

>
> -- Adam
>
> > However, I do have a PPR
> > issue in a big application using the new XmlHttpRequest that I'll have to
> > investigate further, but for now I'll go open my belly with a daisho and
> > hope to die fast to not be any more ashamed...
> >
> >
> >
> > Regards,
> >
> > ~ Simon
> >
> > On 8/15/07, Simon Lessard <si...@gmail.com> wrote:
> > > Please note that there's no white space in the partialTriggers property, I
> > don't know why one showed up in the post.
> > >
> > >
> > > Regards,
> > >
> > > ~ Simon
> > >
> > >
> > >
> > > On 8/15/07, Simon Lessard <si...@gmail.com> wrote:
> > > > Hello all,
> > > >
> > > > The following page fail to update after the PPR event with current 1.2.2
> > branch using RI on OC4J 11g beta (container should not be the issue here
> > though, nor should RI). test managed bean is a session scoped bean with a
> > single r/w value property. Anyone else can reproduce the issue?
> > > >
> > > > <?xml version='1.0' encoding='windows-1252'?>
> > > > <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
> > > >           xmlns:f="http://java.sun.com/jsf/core"
> > > >           xmlns:tr="
> > http://myfaces.apache.org/trinidad">
> > > >   <jsp:directive.page
> > contentType="text/html;charset=windows-1252"/>
> > > >   <f:view>
> > > >     <tr:document title="Test">
> > > >       <tr:form>
> > > >         <tr:inputText id="testField" label="test" value="#{test.value}"
> > autoSubmit="true"/>
> > > >         <tr:outputText value="Ok!" partialTriggers=" testField"
> > rendered="#{test.value == 'foo'}"/>
> > > >       </tr:form>
> > > >     </tr:document>
> > > >   </f:view>
> > > > </jsp:root>
> > > >
> > > > public class TestBean
> > > > {
> > > >   private String value;
> > > >
> > > >   public TestBean()
> > > >   {
> > > >   }
> > > >
> > > >   public void setValue(String param)
> > > >   {
> > > >     this.value = param;
> > > >   }
> > > >
> > > >   public String getValue()
> > > >   {
> > > >     return value;
> > > >   }
> > > > }
> > > >
> > > > Regards,
> > > >
> > > > ~ Simon
> > > >
> > >
> > >
> >
> >
>

Re: [TRINIDAD] PPR problem with 1.2.2 branch

Posted by Adam Winer <aw...@gmail.com>.
On 8/15/07, Simon Lessard <si...@gmail.com> wrote:
> Please also note that I'm stupid and forgot the always rendered panelGroup
> around the outputText to set the partialTriggers...

That shouldn't be necessary at all!  I'll have a look at this,
and the nested table bug listed below.

-- Adam

> However, I do have a PPR
> issue in a big application using the new XmlHttpRequest that I'll have to
> investigate further, but for now I'll go open my belly with a daisho and
> hope to die fast to not be any more ashamed...
>
>
>
> Regards,
>
> ~ Simon
>
> On 8/15/07, Simon Lessard <si...@gmail.com> wrote:
> > Please note that there's no white space in the partialTriggers property, I
> don't know why one showed up in the post.
> >
> >
> > Regards,
> >
> > ~ Simon
> >
> >
> >
> > On 8/15/07, Simon Lessard <si...@gmail.com> wrote:
> > > Hello all,
> > >
> > > The following page fail to update after the PPR event with current 1.2.2
> branch using RI on OC4J 11g beta (container should not be the issue here
> though, nor should RI). test managed bean is a session scoped bean with a
> single r/w value property. Anyone else can reproduce the issue?
> > >
> > > <?xml version='1.0' encoding='windows-1252'?>
> > > <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
> > >           xmlns:f="http://java.sun.com/jsf/core"
> > >           xmlns:tr="
> http://myfaces.apache.org/trinidad">
> > >   <jsp:directive.page
> contentType="text/html;charset=windows-1252"/>
> > >   <f:view>
> > >     <tr:document title="Test">
> > >       <tr:form>
> > >         <tr:inputText id="testField" label="test" value="#{test.value}"
> autoSubmit="true"/>
> > >         <tr:outputText value="Ok!" partialTriggers=" testField"
> rendered="#{test.value == 'foo'}"/>
> > >       </tr:form>
> > >     </tr:document>
> > >   </f:view>
> > > </jsp:root>
> > >
> > > public class TestBean
> > > {
> > >   private String value;
> > >
> > >   public TestBean()
> > >   {
> > >   }
> > >
> > >   public void setValue(String param)
> > >   {
> > >     this.value = param;
> > >   }
> > >
> > >   public String getValue()
> > >   {
> > >     return value;
> > >   }
> > > }
> > >
> > > Regards,
> > >
> > > ~ Simon
> > >
> >
> >
>
>

Re: [TRINIDAD] PPR problem with 1.2.2 branch

Posted by Simon Lessard <si...@gmail.com>.
Couldn't reproduce on OC4J 11g TP with RI on my side, neither with Firefox
nor MSIE. Didn't try with MyFaces either.

~ Simon

On 8/17/07, Adam Winer <aw...@gmail.com> wrote:
>
> I can't reproduce a problem on that page using the latest 1.2.2,
> and Glassfish with the JSF RI 1.2_04-b10-p01.  I haven't had
> a chance to test against the MyFaces 1.2.
>
> -- Adam
>
>
> On 8/15/07, Leonardo Uribe <lu...@gmail.com> wrote:
> > Hi
> >
> >  I have probed the trinidad demo example of 1.2.2 branch of trinidad,
> > running a tomcat 6.0.14 web server, and firefox 2.0.0.6, myfaces 1.2.0and I
> > have experience a javascript error. I tried to execute the following
> page
> > (the pom of trinidad demo needs to add jstl 1.2 jar on the war file to
> >  run)
> >
> >
> http://localhost:7080/trinidad-demo-1.2.2-SNAPSHOT/faces/components/table_nested.jspx
> >
> >  compiling the actual code hosted here:
> >
> > http://svn.apache.org/repos/asf/myfaces/trinidad/branches/1.2.2-branch/
> >
> >  And tried to click "Show" to expand the element properties. Nothing
> > happends. In the JSF 1.1 version everything works well, but in this
> version
> > I have seen the following using firebug:
> >
> >  ["Invalid PPR response. The response-headers were:\nServer:
> > Apache-Coyote/1.1\nContent-Type: text/xml;ch..." ]
> >
> >  I have probed another examples:
> >
> >
> http://localhost:7080/trinidad-demo-1.2.2-SNAPSHOT/faces/components/treeTable_selection.jspx
> >
> http://localhost:7080/trinidad-demo-1.2.2-SNAPSHOT/faces/components/showDetail.jspx
> >  .....
> >
> >  And has the same error
> >
> >  I also tested with IE and throws the same error. The version 1.2.1 of
> > trinidad does not have the error.
> >
> >  regards
> >
> >  Leonardo Uribe
> >
> >
> >
>

Re: [TRINIDAD] PPR problem with 1.2.2 branch

Posted by "hu.brett" <hu...@gmail.com>.
I also got ppr error when I tried 1.2.2 branch demo. After replacing the
MyFaces 1.2 by sun's JSF RI 1.2_04, this problem is solved. Since myFaces
1.2 causes ppr error, I am just wondering why myFaces 1.2 is packaged into
trinidad 1.2.2 demo but not sun's JSF RI 1.2_04. Could you tell me if there
is some way to use myFaces 1.2? Thanks in advance.


Adam Winer wrote:
> 
> I can't reproduce a problem on that page using the latest 1.2.2,
> and Glassfish with the JSF RI 1.2_04-b10-p01.  I haven't had
> a chance to test against the MyFaces 1.2.
> 
> -- Adam
> 
> 
> On 8/15/07, Leonardo Uribe <lu...@gmail.com> wrote:
>> Hi
>>
>>  I have probed the trinidad demo example of 1.2.2 branch of trinidad,
>> running a tomcat 6.0.14 web server, and firefox 2.0.0.6, myfaces 1.2.0
>> and I
>> have experience a javascript error. I tried to execute the following page
>> (the pom of trinidad demo needs to add jstl 1.2 jar on the war file to
>>  run)
>>
>> http://localhost:7080/trinidad-demo-1.2.2-SNAPSHOT/faces/components/table_nested.jspx
>>
>>  compiling the actual code hosted here:
>>
>> http://svn.apache.org/repos/asf/myfaces/trinidad/branches/1.2.2-branch/
>>
>>  And tried to click "Show" to expand the element properties. Nothing
>> happends. In the JSF 1.1 version everything works well, but in this
>> version
>> I have seen the following using firebug:
>>
>>  ["Invalid PPR response. The response-headers were:\nServer:
>> Apache-Coyote/1.1\nContent-Type: text/xml;ch..." ]
>>
>>  I have probed another examples:
>>
>> http://localhost:7080/trinidad-demo-1.2.2-SNAPSHOT/faces/components/treeTable_selection.jspx
>> http://localhost:7080/trinidad-demo-1.2.2-SNAPSHOT/faces/components/showDetail.jspx
>>  .....
>>
>>  And has the same error
>>
>>  I also tested with IE and throws the same error. The version 1.2.1 of
>> trinidad does not have the error.
>>
>>  regards
>>
>>  Leonardo Uribe
>>
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/-TRINIDAD--PPR-problem-with-1.2.2-branch-tf4275649.html#a13060880
Sent from the My Faces - Dev mailing list archive at Nabble.com.


Re: [TRINIDAD] PPR problem with 1.2.2 branch

Posted by Adam Winer <aw...@gmail.com>.
I can't reproduce a problem on that page using the latest 1.2.2,
and Glassfish with the JSF RI 1.2_04-b10-p01.  I haven't had
a chance to test against the MyFaces 1.2.

-- Adam


On 8/15/07, Leonardo Uribe <lu...@gmail.com> wrote:
> Hi
>
>  I have probed the trinidad demo example of 1.2.2 branch of trinidad,
> running a tomcat 6.0.14 web server, and firefox 2.0.0.6, myfaces 1.2.0 and I
> have experience a javascript error. I tried to execute the following page
> (the pom of trinidad demo needs to add jstl 1.2 jar on the war file to
>  run)
>
> http://localhost:7080/trinidad-demo-1.2.2-SNAPSHOT/faces/components/table_nested.jspx
>
>  compiling the actual code hosted here:
>
> http://svn.apache.org/repos/asf/myfaces/trinidad/branches/1.2.2-branch/
>
>  And tried to click "Show" to expand the element properties. Nothing
> happends. In the JSF 1.1 version everything works well, but in this version
> I have seen the following using firebug:
>
>  ["Invalid PPR response. The response-headers were:\nServer:
> Apache-Coyote/1.1\nContent-Type: text/xml;ch..." ]
>
>  I have probed another examples:
>
> http://localhost:7080/trinidad-demo-1.2.2-SNAPSHOT/faces/components/treeTable_selection.jspx
> http://localhost:7080/trinidad-demo-1.2.2-SNAPSHOT/faces/components/showDetail.jspx
>  .....
>
>  And has the same error
>
>  I also tested with IE and throws the same error. The version 1.2.1 of
> trinidad does not have the error.
>
>  regards
>
>  Leonardo Uribe
>
>
>

Re: [TRINIDAD] PPR problem with 1.2.2 branch

Posted by Tobias Freier <tr...@beople.de>.
The Wikipedia article says that the XML declaration is optional if I use the
default encoding UTF-8. Otherwise I need the declaration. So we can't use
trinidad with anything else than utf-8 (I use utf-8 anyway).

<tr:document> or <trh:html>/<trh:head>/<trh:body> load the default css which
I don't want.
With

<%@ page language="java" contentType="application/xhtml+xml; charset=UTF-8"
    pageEncoding="UTF-8"%>
<f:view>
<trh:html>
<trh:head>
	<title>...</title>
	<meta http-equiv="Content-Type" content="application/xhtml+xml;
charset=UTF-8" />
</trh:head>
<trh:body>
...
I get

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html dir="ltr" lang="de">
<head>
<meta name="generator" content="Apache Trinidad"><link rel="stylesheet"
charset="UTF-8" type="text/css"
href="/kingstale/adf/styles/cache/minimal-desktop-903655080-gecko-cmp.css">
<script type="text/javascript">var _AdfWindowOpenError='In Ihrem Browser
wurde ein Blocker für Popup-Fenster ermittelt. Popup Blocker stören die
Ausführung dieser Anwendung. Deaktivieren Sie den Popup Blocker oder lassen
Sie Popups von dieser Site zu.';</script><script type="text/javascript"
src="/kingstale/adf/jsLibs/Common1_2_2.js"></script><script
type="text/javascript">_defaultTZ()</script>
	<title>...</title>
	<meta http-equiv="Content-Type" content="application/xhtml+xml;
charset=UTF-8" />
</head><body onload="_checkLoad()" onunload="_checkUnload(event)">

which is no xhtml. For example the link tag is not closed and the doctype is
wrong. Same with tr:document.

Tobias


Adam Winer wrote:
> 
> Ah, great, now we've got a compact description of the bug. :)
> If you have an XML declaration, in the doc, we end up generating
> two XML declarations on a PPR response.  There's code in Trinidad (in
> the XmlOutput code) to strip anything before an XML declaration,
> but it gets tripped up if there are two.
> 
> My understanding, backed up by:
> http://en.wikipedia.org/wiki/XHTML#XML_Declaration
> is that you don't need the XML declaration to be valid XHTML.
> 
> There is a clear error in your page, though:
> 
> contentType="text/html; charset=UTF-8"
> 
> is wrong.  You need contentType="application/xhtml+xml; charset=UTF-8".
> I'm not surprised your page wasn't rendered as XHTML.
> 
> That said, what you ideally should be doing in Trinidad is using
> <tr:document> or <trh:html>/<trh:head>/<trh:body>, and not
> specifying an XML declaration or DTD, but just letting Trinidad
> do it for you.  These do support generating XHTML DTDs,
> BTW, as long as you've set the contentType correctly.
> 
> -- Adam
> 
> 

-- 
View this message in context: http://www.nabble.com/-TRINIDAD--PPR-problem-with-1.2.2-branch-tf4275649.html#a12799674
Sent from the My Faces - Dev mailing list archive at Nabble.com.


Re: [TRINIDAD] PPR problem with 1.2.2 branch

Posted by Adam Winer <aw...@gmail.com>.
Ah, great, now we've got a compact description of the bug. :)
If you have an XML declaration, in the doc, we end up generating
two XML declarations on a PPR response.  There's code in Trinidad (in
the XmlOutput code) to strip anything before an XML declaration,
but it gets tripped up if there are two.

My understanding, backed up by:
http://en.wikipedia.org/wiki/XHTML#XML_Declaration
is that you don't need the XML declaration to be valid XHTML.

There is a clear error in your page, though:

contentType="text/html; charset=UTF-8"

is wrong.  You need contentType="application/xhtml+xml; charset=UTF-8".
I'm not surprised your page wasn't rendered as XHTML.

That said, what you ideally should be doing in Trinidad is using
<tr:document> or <trh:html>/<trh:head>/<trh:body>, and not
specifying an XML declaration or DTD, but just letting Trinidad
do it for you.  These do support generating XHTML DTDs,
BTW, as long as you've set the contentType correctly.

-- Adam


On 9/19/07, Tobias Freier <tr...@beople.de> wrote:
>
> Thanks for your help Adam,
> It doesn't work on Firefox or IE.
> I don't use Facelets. Just normal JSF with RI 1.2.04P02 and there is no
> MyFaces.
> No this was not the full page (too long). But thanks to your hint with the
> xhtml I found the error.
>
> The page started with:
> <?xml version="1.0" encoding="UTF-8" ?>
> <%@ 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/trinidad" prefix="tr"%>
> <%@ taglib uri="http://myfaces.apache.org/trinidad/html" prefix="trh"%>
> <%@ page language="java" contentType="text/html; charset=UTF-8"
>     pageEncoding="UTF-8"%>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <f:view>
> <head>
> ...
>
> therefore the response of the PPR was
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <?xml version="1.0" ?>
> <?Tr-XHR-Response-Type ?>
> <content action="..........
>
> Now I deleted the <?xml version="1.0" encoding="UTF-8" ?> at the beginning
> of my JSP page and I get the response
>
> <?xml version="1.0" ?>
> <?Tr-XHR-Response-Type ?>
> <content action="...............
>
> this works fine now.
> The only problem is that this is no longer a well formed xhtml page.
> At this point I saw that my page isn't rendered as xhtml anyway. What do I
> have to use to get xhtml?
>
> Tobias
>
>
>
> Adam Winer wrote:
> >
> > PPR is totally overhauled from 1.2.1 to 1.2.2, so changes
> > aren't a surprise.  The question is why this is happening,
> > and we need more information, because we did (honest)
> > test this code quite a bit, so there's something different about
> > your set up, and ideally you could play around with a lot
> > of variables.
> >
> > First up, are you really only using the RI?  No MyFaces
> > implementation also lying around on the classpath?  I'm
> > guessing this is Firefox?  Is this Facelets?  If so, what
> > version?  If JSP, is that really the full content of your page?
> > Are you using XHTML?  If so, is the problem specific
> > to XHTML (that is, does it go away if you build an
> > HTML page)?
> >
> > -- Adam
> >
> >
> > On 9/18/07, Tobias Freier <tr...@beople.de> wrote:
> >>
> >>
> >> Leonardo Uribe wrote:
> >> >
> >> > ["Invalid PPR response. The response-headers were:\nServer:
> >> > Apache-Coyote/1.1\nContent-Type: text/xml;ch..."]
> >> >
> >> I'm facing a similar error on my page.
> >> Tomcat 6.0.13 with Java 6 upd 2 and the newest version 1.2.2 of trinidad
> >> and
> >> RI jsf 1.2.4.
> >>
> >> trimmed jsf code:
> >> <html xmlns="http://www.w3.org/1999/xhtml">
> >> <f:view>
> >> <head>
> >> </head>
> >> <trh:body id="a1">
> >>   <tr:form id="form1">
> >>     <tr:table id="table1" ...>
> >>       <tr:column styleClass="mystyle">
> >>         <h:outputText value="#{table.value}" styleClass="boldText" />
> >>       </tr:column>
> >>     </tr:table>
> >>   </tr:form>
> >> </trh:body>
> >> </f:view>
> >> </html>
> >>
> >> So body, form and table have an id.
> >> When I try to change the range of the table or trigger any other event to
> >> update the tabele it doesn't work. The RangeChangeEvent method is
> >> executed
> >> but the page doesn't refresh. Instead I get the js error
> >>
> >> "Invalid PPR response. The response-headers were:\nServer:
> >> Apache-Coyote/1.1\nX-Powered-By: JSF/1.2\nContent-Type:
> >> text/xml;charset=utf-8\nContent-Language: de\nTransfer-Encoding:
> >> chunked\nDate: Tue, 18 Sep 2007 23:45:14 GMT\n\n The invalid response
> >> was:\n<?xml version=\"1.0\" encoding=\"UTF-8\"
> >> ?>\r\n\r\n\r\n\r\n\r\n\r\n\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML
> >> 1.0
> >> Transitional//EN\"
> >> \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html
> >> xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<?xml version=\"1.0\"
> >> ?>\n<?Tr-XHR-Response-Type ?>\n.......
> >> content to replace...
> >>
> >> The same code worked under trinidad 1.2.1
> >> Does anyone has a clue why it doesn't work with 1.2.2?
> >>
> >> Tnx, Tobias
> >> --
> >> View this message in context:
> >> http://www.nabble.com/-TRINIDAD--PPR-problem-with-1.2.2-branch-tf4275649.html#a12768364
> >> Sent from the My Faces - Dev mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/-TRINIDAD--PPR-problem-with-1.2.2-branch-tf4275649.html#a12775126
> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>
>

Re: [TRINIDAD] PPR problem with 1.2.2 branch

Posted by Tobias Freier <tr...@beople.de>.
Thanks for your help Adam,
It doesn't work on Firefox or IE.
I don't use Facelets. Just normal JSF with RI 1.2.04P02 and there is no
MyFaces.
No this was not the full page (too long). But thanks to your hint with the
xhtml I found the error.

The page started with:
<?xml version="1.0" encoding="UTF-8" ?>
<%@ 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/trinidad" prefix="tr"%>
<%@ taglib uri="http://myfaces.apache.org/trinidad/html" prefix="trh"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<f:view>
<head>
...

therefore the response of the PPR was

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?xml version="1.0" ?>
<?Tr-XHR-Response-Type ?>
<content action="..........

Now I deleted the <?xml version="1.0" encoding="UTF-8" ?> at the beginning
of my JSP page and I get the response

<?xml version="1.0" ?>
<?Tr-XHR-Response-Type ?>
<content action="...............

this works fine now.
The only problem is that this is no longer a well formed xhtml page.
At this point I saw that my page isn't rendered as xhtml anyway. What do I
have to use to get xhtml?

Tobias



Adam Winer wrote:
> 
> PPR is totally overhauled from 1.2.1 to 1.2.2, so changes
> aren't a surprise.  The question is why this is happening,
> and we need more information, because we did (honest)
> test this code quite a bit, so there's something different about
> your set up, and ideally you could play around with a lot
> of variables.
> 
> First up, are you really only using the RI?  No MyFaces
> implementation also lying around on the classpath?  I'm
> guessing this is Firefox?  Is this Facelets?  If so, what
> version?  If JSP, is that really the full content of your page?
> Are you using XHTML?  If so, is the problem specific
> to XHTML (that is, does it go away if you build an
> HTML page)?
> 
> -- Adam
> 
> 
> On 9/18/07, Tobias Freier <tr...@beople.de> wrote:
>>
>>
>> Leonardo Uribe wrote:
>> >
>> > ["Invalid PPR response. The response-headers were:\nServer:
>> > Apache-Coyote/1.1\nContent-Type: text/xml;ch..."]
>> >
>> I'm facing a similar error on my page.
>> Tomcat 6.0.13 with Java 6 upd 2 and the newest version 1.2.2 of trinidad
>> and
>> RI jsf 1.2.4.
>>
>> trimmed jsf code:
>> <html xmlns="http://www.w3.org/1999/xhtml">
>> <f:view>
>> <head>
>> </head>
>> <trh:body id="a1">
>>   <tr:form id="form1">
>>     <tr:table id="table1" ...>
>>       <tr:column styleClass="mystyle">
>>         <h:outputText value="#{table.value}" styleClass="boldText" />
>>       </tr:column>
>>     </tr:table>
>>   </tr:form>
>> </trh:body>
>> </f:view>
>> </html>
>>
>> So body, form and table have an id.
>> When I try to change the range of the table or trigger any other event to
>> update the tabele it doesn't work. The RangeChangeEvent method is
>> executed
>> but the page doesn't refresh. Instead I get the js error
>>
>> "Invalid PPR response. The response-headers were:\nServer:
>> Apache-Coyote/1.1\nX-Powered-By: JSF/1.2\nContent-Type:
>> text/xml;charset=utf-8\nContent-Language: de\nTransfer-Encoding:
>> chunked\nDate: Tue, 18 Sep 2007 23:45:14 GMT\n\n The invalid response
>> was:\n<?xml version=\"1.0\" encoding=\"UTF-8\"
>> ?>\r\n\r\n\r\n\r\n\r\n\r\n\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML
>> 1.0
>> Transitional//EN\"
>> \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html
>> xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<?xml version=\"1.0\"
>> ?>\n<?Tr-XHR-Response-Type ?>\n.......
>> content to replace...
>>
>> The same code worked under trinidad 1.2.1
>> Does anyone has a clue why it doesn't work with 1.2.2?
>>
>> Tnx, Tobias
>> --
>> View this message in context:
>> http://www.nabble.com/-TRINIDAD--PPR-problem-with-1.2.2-branch-tf4275649.html#a12768364
>> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/-TRINIDAD--PPR-problem-with-1.2.2-branch-tf4275649.html#a12775126
Sent from the My Faces - Dev mailing list archive at Nabble.com.


Re: [TRINIDAD] PPR problem with 1.2.2 branch

Posted by Adam Winer <aw...@gmail.com>.
PPR is totally overhauled from 1.2.1 to 1.2.2, so changes
aren't a surprise.  The question is why this is happening,
and we need more information, because we did (honest)
test this code quite a bit, so there's something different about
your set up, and ideally you could play around with a lot
of variables.

First up, are you really only using the RI?  No MyFaces
implementation also lying around on the classpath?  I'm
guessing this is Firefox?  Is this Facelets?  If so, what
version?  If JSP, is that really the full content of your page?
Are you using XHTML?  If so, is the problem specific
to XHTML (that is, does it go away if you build an
HTML page)?

-- Adam


On 9/18/07, Tobias Freier <tr...@beople.de> wrote:
>
>
> Leonardo Uribe wrote:
> >
> > ["Invalid PPR response. The response-headers were:\nServer:
> > Apache-Coyote/1.1\nContent-Type: text/xml;ch..."]
> >
> I'm facing a similar error on my page.
> Tomcat 6.0.13 with Java 6 upd 2 and the newest version 1.2.2 of trinidad and
> RI jsf 1.2.4.
>
> trimmed jsf code:
> <html xmlns="http://www.w3.org/1999/xhtml">
> <f:view>
> <head>
> </head>
> <trh:body id="a1">
>   <tr:form id="form1">
>     <tr:table id="table1" ...>
>       <tr:column styleClass="mystyle">
>         <h:outputText value="#{table.value}" styleClass="boldText" />
>       </tr:column>
>     </tr:table>
>   </tr:form>
> </trh:body>
> </f:view>
> </html>
>
> So body, form and table have an id.
> When I try to change the range of the table or trigger any other event to
> update the tabele it doesn't work. The RangeChangeEvent method is executed
> but the page doesn't refresh. Instead I get the js error
>
> "Invalid PPR response. The response-headers were:\nServer:
> Apache-Coyote/1.1\nX-Powered-By: JSF/1.2\nContent-Type:
> text/xml;charset=utf-8\nContent-Language: de\nTransfer-Encoding:
> chunked\nDate: Tue, 18 Sep 2007 23:45:14 GMT\n\n The invalid response
> was:\n<?xml version=\"1.0\" encoding=\"UTF-8\"
> ?>\r\n\r\n\r\n\r\n\r\n\r\n\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
> Transitional//EN\"
> \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html
> xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<?xml version=\"1.0\"
> ?>\n<?Tr-XHR-Response-Type ?>\n.......
> content to replace...
>
> The same code worked under trinidad 1.2.1
> Does anyone has a clue why it doesn't work with 1.2.2?
>
> Tnx, Tobias
> --
> View this message in context: http://www.nabble.com/-TRINIDAD--PPR-problem-with-1.2.2-branch-tf4275649.html#a12768364
> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>
>

Re: [TRINIDAD] PPR problem with 1.2.2 branch

Posted by Tobias Freier <tr...@beople.de>.

Leonardo Uribe wrote:
> 
> ["Invalid PPR response. The response-headers were:\nServer:
> Apache-Coyote/1.1\nContent-Type: text/xml;ch..."]
> 
I'm facing a similar error on my page.
Tomcat 6.0.13 with Java 6 upd 2 and the newest version 1.2.2 of trinidad and
RI jsf 1.2.4.

trimmed jsf code:
<html xmlns="http://www.w3.org/1999/xhtml">
<f:view>
<head>
</head>
<trh:body id="a1">
  <tr:form id="form1">
    <tr:table id="table1" ...>
      <tr:column styleClass="mystyle">
        <h:outputText value="#{table.value}" styleClass="boldText" />
      </tr:column>
    </tr:table>
  </tr:form>
</trh:body>
</f:view>
</html>

So body, form and table have an id.
When I try to change the range of the table or trigger any other event to
update the tabele it doesn't work. The RangeChangeEvent method is executed
but the page doesn't refresh. Instead I get the js error 

"Invalid PPR response. The response-headers were:\nServer:
Apache-Coyote/1.1\nX-Powered-By: JSF/1.2\nContent-Type:
text/xml;charset=utf-8\nContent-Language: de\nTransfer-Encoding:
chunked\nDate: Tue, 18 Sep 2007 23:45:14 GMT\n\n The invalid response
was:\n<?xml version=\"1.0\" encoding=\"UTF-8\"
?>\r\n\r\n\r\n\r\n\r\n\r\n\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
Transitional//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html
xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<?xml version=\"1.0\"
?>\n<?Tr-XHR-Response-Type ?>\n.......
content to replace...

The same code worked under trinidad 1.2.1
Does anyone has a clue why it doesn't work with 1.2.2?

Tnx, Tobias
-- 
View this message in context: http://www.nabble.com/-TRINIDAD--PPR-problem-with-1.2.2-branch-tf4275649.html#a12768364
Sent from the My Faces - Dev mailing list archive at Nabble.com.


Re: [TRINIDAD] PPR problem with 1.2.2 branch

Posted by Adam Winer <aw...@gmail.com>.
On 8/16/07, Simon Lessard <si...@gmail.com> wrote:
> Hello Leonardo,
>
> I don't have any JavaScript error on my side.
>
> Also, I found my  problem. It was on my side (quite obviously), but I think
> the community could benefit from knowing the cause. In previous version of
> PPR one could have something like the following (assuming it was generated
> for a single component):
>
> <div>
>   <div id="foo">Some text</div>
> </div>
>
> Of course with nested divs it doesn't make much sense, but the usual case is
> a layout container with a nested input. In that case the clientId must be
> pushed on the input control itself, not the container for decode method to
> work. Anyway, with old PPR, when the response came back, it was able to
> update the component with id="foo" without any problem. This is not the case
> with the new AJAX PPR, where you HAVE to set an id on the root element
> generated for the component. Of course this should always have been the case
> with the old version as a good practice but I somehow overlooked that in one
> of my classes (that was a parent class for many others), killing mostly all
> PPR in my application. Should we document that little change?

Handily enough, this is actually documented already:

http://myfaces.apache.org/trinidad/devguide/ppr.html#Implementation%20Notes

I'm surprised the old code worked as it did!

-- Adam


>
>
> Regards,
>
> ~ Simon
>
>
> On 8/15/07, Leonardo Uribe <lu...@gmail.com> wrote:
> > Hi
> >
> > I have probed the trinidad demo example of 1.2.2 branch of trinidad,
> running a tomcat 6.0.14 web server, and firefox 2.0.0.6, myfaces 1.2.0 and I
> have experience a javascript error. I tried to execute the following page
> (the pom of trinidad demo needs to add jstl 1.2 jar on the war file to
> > run)
> >
> >
> http://localhost:7080/trinidad-demo-1.2.2-SNAPSHOT/faces/components/table_nested.jspx
> >
> > compiling the actual code hosted here:
> >
> >
> http://svn.apache.org/repos/asf/myfaces/trinidad/branches/1.2.2-branch/
> >
> > And tried to click "Show" to expand the element properties. Nothing
> happends. In the JSF 1.1 version everything works well, but in this version
> I have seen the following using firebug:
> >
> > ["Invalid PPR response. The response-headers were:\nServer:
> Apache-Coyote/1.1\nContent-Type: text/xml;ch..." ]
> >
> > I have probed another examples:
> >
> >
> http://localhost:7080/trinidad-demo-1.2.2-SNAPSHOT/faces/components/treeTable_selection.jspx
> >
> http://localhost:7080/trinidad-demo-1.2.2-SNAPSHOT/faces/components/showDetail.jspx
> > .....
> >
> > And has the same error
> >
> > I also tested with IE and throws the same error. The version 1.2.1 of
> trinidad does not have the error.
> >
> > regards
> >
> > Leonardo Uribe
> >
> >
> >
>
>

Re: [TRINIDAD] PPR problem with 1.2.2 branch

Posted by Simon Lessard <si...@gmail.com>.
Hello Leonardo,

I don't have any JavaScript error on my side.

Also, I found my  problem. It was on my side (quite obviously), but I think
the community could benefit from knowing the cause. In previous version of
PPR one could have something like the following (assuming it was generated
for a single component):

<div>
  <div id="foo">Some text</div>
</div>

Of course with nested divs it doesn't make much sense, but the usual case is
a layout container with a nested input. In that case the clientId must be
pushed on the input control itself, not the container for decode method to
work. Anyway, with old PPR, when the response came back, it was able to
update the component with id="foo" without any problem. This is not the case
with the new AJAX PPR, where you HAVE to set an id on the root element
generated for the component. Of course this should always have been the case
with the old version as a good practice but I somehow overlooked that in one
of my classes (that was a parent class for many others), killing mostly all
PPR in my application. Should we document that little change?


Regards,

~ Simon

On 8/15/07, Leonardo Uribe <lu...@gmail.com> wrote:
>
> Hi
>
> I have probed the trinidad demo example of 1.2.2 branch of trinidad,
> running a tomcat 6.0.14 web server, and firefox 2.0.0.6, myfaces 1.2.0 and
> I have experience a javascript error. I tried to execute the following page
> (the pom of trinidad demo needs to add jstl 1.2 jar on the war file to
> run)
>
>
> http://localhost:7080/trinidad-demo-1.2.2-SNAPSHOT/faces/components/table_nested.jspx
>
> compiling the actual code hosted here:
>
> http://svn.apache.org/repos/asf/myfaces/trinidad/branches/1.2.2-branch/
>
> And tried to click "Show" to expand the element properties. Nothing
> happends. In the JSF 1.1 version everything works well, but in this
> version I have seen the following using firebug:
>
> ["Invalid PPR response. The response-headers were:\nServer:
> Apache-Coyote/1.1\nContent-Type: text/xml;ch..." ]
>
> I have probed another examples:
>
>
> http://localhost:7080/trinidad-demo-1.2.2-SNAPSHOT/faces/components/treeTable_selection.jspx
>
> http://localhost:7080/trinidad-demo-1.2.2-SNAPSHOT/faces/components/showDetail.jspx
> .....
>
> And has the same error
>
> I also tested with IE and throws the same error. The version 1.2.1 of
> trinidad does not have the error.
>
> regards
>
> Leonardo Uribe
>
>
>

Re: [TRINIDAD] PPR problem with 1.2.2 branch

Posted by Leonardo Uribe <lu...@gmail.com>.
Hi

I have probed the trinidad demo example of 1.2.2 branch of trinidad, running
a tomcat 6.0.14 web server, and firefox 2.0.0.6, myfaces 1.2.0 and I have
experience a javascript error. I tried to execute the following page (the
pom of trinidad demo needs to add jstl 1.2 jar on the war file to
run)

http://localhost:7080/trinidad-demo-1.2.2-SNAPSHOT/faces/components/table_nested.jspx

compiling the actual code hosted here:

http://svn.apache.org/repos/asf/myfaces/trinidad/branches/1.2.2-branch/

And tried to click "Show" to expand the element properties. Nothing
happends. In the JSF 1.1 version everything works well, but in this version
I have seen the following using firebug:

["Invalid PPR response. The response-headers were:\nServer:
Apache-Coyote/1.1\nContent-Type: text/xml;ch..."]

I have probed another examples:

http://localhost:7080/trinidad-demo-1.2.2-SNAPSHOT/faces/components/treeTable_selection.jspx
http://localhost:7080/trinidad-demo-1.2.2-SNAPSHOT/faces/components/showDetail.jspx
.....

And has the same error

I also tested with IE and throws the same error. The version 1.2.1 of
trinidad does not have the error.

regards

Leonardo Uribe

Re: [TRINIDAD] PPR problem with 1.2.2 branch

Posted by Simon Lessard <si...@gmail.com>.
Please also note that I'm stupid and forgot the always rendered panelGroup
around the outputText to set the partialTriggers... However, I do have a PPR
issue in a big application using the new XmlHttpRequest that I'll have to
investigate further, but for now I'll go open my belly with a daisho and
hope to die fast to not be any more ashamed...


Regards,

~ Simon

On 8/15/07, Simon Lessard <si...@gmail.com> wrote:
>
> Please note that there's no white space in the partialTriggers property, I
> don't know why one showed up in the post.
>
>
> Regards,
>
> ~ Simon
>
> On 8/15/07, Simon Lessard <si...@gmail.com> wrote:
> >
> > Hello all,
> >
> > The following page fail to update after the PPR event with current 1.2.2branch using RI on OC4J 11g beta (container should not be the issue here
> > though, nor should RI). test managed bean is a session scoped bean with a
> > single r/w value property. Anyone else can reproduce the issue?
> >
> > <?xml version='1.0' encoding='windows-1252'?>
> > <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
> >            xmlns:f="http://java.sun.com/jsf/core"
> >           xmlns:tr=" http://myfaces.apache.org/trinidad">
> >   <jsp:directive.page contentType="text/html;charset=windows-1252"/>
> >   <f:view>
> >     <tr:document title="Test">
> >       <tr:form>
> >         <tr:inputText id="testField" label="test" value="#{test.value}"
> > autoSubmit="true"/>
> >         <tr:outputText value="Ok!" partialTriggers=" testField"
> > rendered="#{test.value == 'foo'}"/>
> >       </tr:form>
> >     </tr:document>
> >   </f:view>
> > </jsp:root>
> >
> > public class TestBean
> > {
> >   private String value;
> >
> >   public TestBean()
> >   {
> >   }
> >
> >   public void setValue(String param)
> >   {
> >     this.value = param;
> >   }
> >
> >    public String getValue()
> >   {
> >     return value;
> >   }
> > }
> >
> > Regards,
> >
> > ~ Simon
> >
>
>

Re: [TRINIDAD] PPR problem with 1.2.2 branch

Posted by Simon Lessard <si...@gmail.com>.
Please note that there's no white space in the partialTriggers property, I
don't know why one showed up in the post.


Regards,

~ Simon

On 8/15/07, Simon Lessard <si...@gmail.com> wrote:
>
> Hello all,
>
> The following page fail to update after the PPR event with current 1.2.2branch using RI on OC4J 11g beta (container should not be the issue here
> though, nor should RI). test managed bean is a session scoped bean with a
> single r/w value property. Anyone else can reproduce the issue?
>
> <?xml version='1.0' encoding='windows-1252'?>
> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
>           xmlns:f="http://java.sun.com/jsf/core"
>           xmlns:tr=" http://myfaces.apache.org/trinidad">
>   <jsp:directive.page contentType="text/html;charset=windows-1252"/>
>   <f:view>
>     <tr:document title="Test">
>       <tr:form>
>         <tr:inputText id="testField" label="test" value="#{test.value}"
> autoSubmit="true"/>
>         <tr:outputText value="Ok!" partialTriggers=" testField"
> rendered="#{test.value == 'foo'}"/>
>       </tr:form>
>     </tr:document>
>   </f:view>
> </jsp:root>
>
> public class TestBean
> {
>   private String value;
>
>   public TestBean()
>   {
>   }
>
>   public void setValue(String param)
>   {
>     this.value = param;
>   }
>
>   public String getValue()
>   {
>     return value;
>   }
> }
>
> Regards,
>
> ~ Simon
>