myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Created] (MYFACES-3890) Component added using vdl.createComponent(...) is removed when javax.faces.FACELETS_REFRESH_PERIOD is not -1
Date Tue, 13 May 2014 14:49:15 GMT
Leonardo Uribe created MYFACES-3890:
---------------------------------------

             Summary: Component added using vdl.createComponent(...) is removed when javax.faces.FACELETS_REFRESH_PERIOD
is not -1
                 Key: MYFACES-3890
                 URL: https://issues.apache.org/jira/browse/MYFACES-3890
             Project: MyFaces Core
          Issue Type: Bug
          Components: JSR-344
    Affects Versions: 2.2.3
            Reporter: Leonardo Uribe
            Assignee: Leonardo Uribe
            Priority: Minor


On the way of implement MYFACES-3733 "Implement vdl.createComponent(...)", it was noticed
that when javax.faces.FACELETS_REFRESH_PERIOD config param is different from -1, the programmatically
added component dissapear after a postback. 

The problem happens because the code in vdl.createComponent(...) does an "inline compilation"
of a facelet instance of the component, but the original algorithm does not consider that
case. Instead, all facelets are stored in a structure and the refresh period is used to decide
when a facelet instance needs to be reloaded.

The inline compilation makes a new facelet instance to be created every time the component
needs to be created or refreshed. The algorithm done in this part is ok, the only thing that
needs to be done is disable the refresh on the sections that are compiled inline.

Unfortunately things are not so simple, because for example in a composite component there
are two facelets involved: one that makes the inline compilation and the other that renders
the component and is reused over and over again. So, we need to review the algorithm to be
sure everything is ok.




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message