[
https://issues.apache.org/jira/browse/MYFACES-2748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877108#action_12877108
]
Werner Punz edited comment on MYFACES-2748 at 6/9/10 11:41 AM:
---------------------------------------------------------------
Ok this is an issue Leonardo discovered yesterday. The reason is, I slightly
changed the dom replacement code for 2.0.1 so that the lifecycle behavior is
absolutely identical over all browsers (before it was suboptimal in certainb
browsers by keeping the elements double)
The problem here is some IE6 fixup code which enforces that all script tags are
properly evaled (which ie6 swallows under certain tag combinations). The main
issue there is that HTMLUnit by masking itself as IE runs into this fixup code
for IE6 which then returns a null element, and triggers this issue.
We will fix this issue probably tomorrow (given my workload and timeframe)
maybe earlier if Leonard is able to do a quick fix before me.
was (Author: werpu):
Ok this is an issue Leonardo discovered yesterday. The reason is, I
slightly changed the dom replacement code for 2.0.1 so that the lifecycle
behavior is absolutely identical over all browsers (before it was suboptimal in
certainb browsers by keeping the elements double)
The problem here is some IE6 fixup code which enforces that all script tags are
properly evaled (which ie swallows under certain conditions). The main issue
there is that HTMLUnit by maskint itself as IE runs into this fixup code for
IE6 which then returns a null element, and triggers this issue.
We will fix this issue probably tomorrow (given my workload and timeframe)
maybe earlier if Leonard is able to do a quick fix before me.
> NPE in htmlunit when testing ajax rendering
> -------------------------------------------
>
> Key: MYFACES-2748
> URL: https://issues.apache.org/jira/browse/MYFACES-2748
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.1-SNAPSHOT
> Reporter: Michael Concini
>
> When attempting to run some simple ajax tests using htmlunit, we're seeing
> some NPEs when running in the default (IE) client mode. As before with
> MYFACES-2745 this looks like its a bug in htmlunit, however these test cases
> had been passing on the MyFaces 2.0.0 release so something that is going on
> with the new javascript must be triggering the bug. I've validated in IE8,
> Firefox 3.6 and Chrome that this is being rendered properly in a live browser
> session as well as that it works if you initialize the htmlunit with new
> WebClient(BrowserVersion.FIREFOX_3).
> Here's a simple example of a failing case. Its just executes an increment
> action on a counter var and uses f:ajax to re-render an outputText field.
> <h:form id="form1" prependId="false">
> <h:outputText id="out1" value="#{incrementdecrement.value}"/>
> <br/>
> <h:commandButton id="button1" value="Count"
> action="#{incrementdecrement.increment}" >
> <f:ajax render="out1" disabled="false" />
> </h:commandButton>
> <br/>
> </h:form>
> After doing some debugging, htmlunit doesn't seem to be handling the partial
> page update. Instead of updating the span value for "out1", it is actually
> removing it from the idMap for the page. So if you try to validate the value
> of "out1" has been incremented, you'll get an NPE since the element is no
> longer on the idMap.
> WebClient webClient = new WebClient();
> HtmlPage page = (HtmlPage) webClient.getPage
> ("http://localhost:8080/JSF20AJAXTag/DisabledFalse.jsf");
> String buttonId = "button1";
> doClick(page,buttonId);
>
> Assert.assertEquals( "1", page.getElementById
> ("out1").getTextContent());
> The NPE is coming from trying to execute getTextContent() when
> page.getElementById("out1") is returning null.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.