>From: noah <[EMAIL PROTECTED]> 
>
> On 7/6/07, Gary VanMatre wrote: 
> > 
> > >From: noah 
> > > 
> > > Thought I'd post this before creating a JIRA issue, in case I've 
> > > overlooked something. I just now produced this with 1.2.1 but I think 
> > > I've seen it in 1.0.x before. 
> > > 
> > > In the following page, clicking the link correctly updates 'Foo=' to 
> > > 'Foo=1' but it renders the paragraph twice. Clicking again updates 
> > > -both- paragraphs to 'Foo=2' and adds a third. Click again for a 4th, 
> > > and Foo=3, and so on. 
> > > 
> > > Using an h:outputText instead of inline EL keeps the text from being 
> > > repeated, but additional paragraph elements are added with each click. 
> > > 
> > > 
> >
>> ><tr:document xmlns="http://www.w3.org/1999/xhtml";
>> >   xmlns:ui="http://java.sun.com/jsf/facelets";
>> >   xmlns:f="http://java.sun.com/jsf/core";
>> >   xmlns:h="http://java.sun.com/jsf/html";
>> >   xmlns:tr="http://myfaces.apache.org/trinidad";>
>> >  <tr:form>
>> >      <tr:panelHeader partialTriggers="foo">
>> >         <p>Foo=#{pageFlowScope.foo}</p>
>> >      </tr:panelHeader>
>> > & nbsp;& nbsp;   <tr:commandLink id="foo" partialSubmit="true" text="Do
>> it!">
>> >         <f:setPropertyActionListener value="#{pageFlowScope.foo + 1}"
>> >target="#{pageFlowScope.foo}" />
>> >      </tr:commandLink>
>> >   </tr:form>
>> ></tr:document>
> >
> > 
> > 
> > 
> > What happens if you use the output text with the transient attribute? 
> 
> No change, same behavior as transient="false". The paragraph tags 
> still get repeated of course. I suppose I shouldn't say 'transient' 
> but all HTML, inline text, and EL. 
> 

Are you using client or server side state saving?
I'm not familiar with the specifics of Facelets but I believe that it is 
creating its own jspid to simulate a "JspIdConsumer" and adds it to the 
component's attributes.  This is how Clay currently works after a few tips from 
Jacob.  When the component tree is restored, the components that are marked 
transient fall out.  Transient components have to be recreated and inserted 
into the component tree.  The "jspid" marker is used to map existing components 
to the meta-data used to build the tree.
It sounds like the markup nodes are not being set as transient by facelets or 
maybe something in the state saving is not discarding the transient components. 
   
Can you tell if the outputText components that contain the markup "<p>..." are 
"transient=true"?  What happens if you switch state saving modes?

 

> > 
> > 
> > 
> > That would simulate a "verbatim" component that facelets should be using 
> > for 
> > inline markup. 
> > 
> > 
> > > 
> > > Environment: Facelets 1.1.12 + RI 1.2_04-p02 
> > 
> > 
> > 
> > Gary 

Reply via email to