[
https://issues.apache.org/jira/browse/MYFACES-2774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12898860#action_12898860
]
Marius Petoi commented on MYFACES-2774:
---------------------------------------
Hi Leonardo,
The test you are talking about is "if2.xhtml". In the test case, you have the
following lines:
e.setManagement(false);
vdl.buildView(facesContext, root,"if2.xhtml");
c = root.findComponent("start");
Assert.assertNotNull("start is null", c);
c = root.findComponent("end");
Assert.assertNotNull("end is null", c);
These assertions pass.
Afterwards, the "#{employee.management}" is set to "true" but also the view is
changed ("if.xml"):
e.setManagement(true);
facesContext.getAttributes().remove("if.xml");
root = facesContext.getViewRoot();
vdl.buildView(facesContext, root,"if.xml"); // here the view is now if.xml, not
if2.xhtml
The "if.xml" looks like this:
<ui:composition>
<c:if test="#{employee.management}">
<h:form id="form">
<h:commandButton id="button" action="test" rendered="#{true}"/>
</h:form>
</c:if>
</ui:composition>
So there is no start, no end elements here. So the assertions should be:
c = root.findComponent("start");
Assert.assertNull("start is not null", c);
c = root.findComponent("end");
Assert.assertNull("end is not null", c);
> Remove MARK_DELETED attribute from the component
> ------------------------------------------------
>
> Key: MYFACES-2774
> URL: https://issues.apache.org/jira/browse/MYFACES-2774
> Project: MyFaces Core
> Issue Type: Improvement
> Components: General, JSR-314
> Affects Versions: 2.0.0
> Reporter: Marius Petoi
> Priority: Minor
> Attachments: markDeletedFaceletContext.patch,
> markDeletedFaceletContext2.patch, markDeletedFaceletContext3.patch,
> markDeletedFaceletContext4.patch, markDeletedFaceletContext5.patch,
> markDeletedFaceletContext6.patch, markDeletedFaceletContext7.patch
>
>
> The ComponentSupport.MARK_DELETED attribute is used only inside one request.
> It doesn't need to be saved in the state. It should be removed from the
> attributes of the component. Instead a list of components marked for deletion
> should be included in the FaceletContext.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.