You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Martin Koci (JIRA)" <de...@myfaces.apache.org> on 2010/03/09 21:56:27 UTC
[jira] Commented: (MYFACES-2594) Facelets state saving doesn't
handle well programmatic component manipulation
[ https://issues.apache.org/jira/browse/MYFACES-2594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843284#action_12843284 ]
Martin Koci commented on MYFACES-2594:
--------------------------------------
This problem is the same issue I've reported against mojarra: https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1414
Please note that myfaces have problem only in case of PARTIAL_STATE_SAVING=false.
> Facelets state saving doesn't handle well programmatic component manipulation
> -----------------------------------------------------------------------------
>
> Key: MYFACES-2594
> URL: https://issues.apache.org/jira/browse/MYFACES-2594
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.0-beta-3
> Environment: myfaces trunk
> Reporter: Martin Koci
> Priority: Minor
>
> Simple tests (code pasted below) outputs following results:
> 1) JSP: switchs colums at every click with no problem
> 2) Facelets with javax.faces.PARTIAL_STATE_SAVING=false - no visual switch
> 3) Facelets with javax.faces.PARTIAL_STATE_SAVING=true switchs colums at every click with no problem
> Common code from test.jspx and test.xhtml
> ... jsp: or facelets stuff here ...
> <h:form id="form">
> <h:commandButton value="Switch columns">
> <f:actionListener binding="#{testBean}" />
> </h:commandButton>
> <h:dataTable id="table">
> <h:column>
> <f:facet name="header">
> <h:outputText value="firstName" />
> </f:facet>
> </h:column>
> <h:column>
> <f:facet name="header">
> <h:outputText value="surname" />
> </f:facet>
> </h:column>
> </h:dataTable>
> </h:form>
> @ManagedBean
> @RequestScoped
> public class TestBean implements ActionListener {
> public void processAction(ActionEvent event) throws AbortProcessingException {
> FacesContext context = FacesContext.getCurrentInstance();
> UIComponent table = context.getViewRoot().findComponent("form:table");
> UIComponent column1 = table.getChildren().get(0);
> UIComponent column2 = table.getChildren().get(1);
> table.getChildren().clear();
> table.getChildren().add(column2);
> table.getChildren().add(column1);
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.