jakartaee / faces

Jakarta Faces
Other
109 stars 55 forks source link

TCK Challenge: SearchExpression test should not require use of Ajax request keywords #1758

Closed brideck closed 1 year ago

brideck commented 1 year ago

Challenged Tests: ee.jakarta.tck.faces.test.javaee8.searchExpression.Spec1238IT#test

TCK Version: Jakarta Faces 4.0.x

Tested Implementation: Open Liberty -- containing MyFaces 4.0

Description: The challenged test includes the following assertion:

        Assert.assertTrue(input.getAttribute("onchange").contains("@this input2"));

Which is looking for a snippet like this one produced by Mojarra:

<input id="input" type="text" name="input" onchange="mojarra.ab(this,event,'valueChange',0,'@this input2')">

MyFaces produces the following, with input instead of @this:

<input id="input" name="input" type="text" value="" onchange="myfaces.ab(this,event,'valueChange','','input input2')">

Section 14.2.2 of the Faces 4.0 specification states that the "following keywords can be used for the value of the “execute” and “render” attributes." @this is included in the list of keywords. Note that the spec says that they can be used, it does not require them.

Section 14.2.3 goes on to provide an example showing that @this is equivalent to using the object's id:

<h:commandButton id="button1" value="submit"
    onclick="faces.ajax.request(this,event, {execute:’@this’});" />

is the same as:

<h:commandButton id="button1" value="submit">
    onclick="faces.ajax.request(this,event, {execute:’button1’});" />

This test should be updated to accept either pattern as valid.

BalusC commented 1 year ago

Accepted.

pnicolucci commented 1 year ago

Accepted.

@BalusC @arjantijms given this comment I'll add the accepted label.