Hi,

I've created https://issues.apache.org/jira/browse/TRINIDAD-1598

Problem described there was introduced with JSF 2.0 - specification
cleary says that exactly two types of VLD are supported with
implementation : JSP and Facelets. 

Trinidad dialog uses a java code for component tree creation but does
not satisfy View Declaration Language abstraction fully. Patch suggests
fix this problem with following steps:

1) org.apache.myfaces.trinidad.render.InternalView ->
javax.faces.view.ViewDeclarationLanguage

Both classes represent same concept, VDL was probably inspired by
InternalView. There is clear and simple mapping of methods:

InternalView.createView(FacesContext, String) ->
ViewDeclarationLanguage.createView(FacesContext, String)

InternalView.restoreView(FacesContext, String) ->
ViewDeclarationLanguage.restoreView(FacesContext, String)

InternalView.renderView(FacesContext, UIViewRoot) ->
ViewDeclarationLanguage.renderView(FacesContext, UIViewRoot)


2) Patch implements createView and restoreView according to
specificaton, renderView is already implemented

3) Patch comments out usage of InternalView from ViewHandlerImpl - VLD
is called transparently from  default ViewHandler no matter if it is
instance of Facelets, JSP or GenericEntry VDL.


4) Open issues:

A) InternalView has a method  isStateless(). VDL from JSF 2.0 probably
does not know term "stateless view" - I didn't find  anything. Usage  of
isStateless() commented out in patch - ViewHandlerImpl.writeState - the
only usage in trinidad-impl.


B) patch requires registration of ViewDeclatFactory in faces-config.xml,
patch contains modification of faces-config-base.xml, but it is dropped
during build, probably with maven-faces-plugin.


Please review that patch if it acceptable for trinidad 2.0 branch.


Martin



Reply via email to