java - encodeAll() not called on a composite component when rendered attribute is wrapped -


when do:

<h:form>     <ui:repeat ...>         <ui:fragment rendered="#{xyz.type eq 1}"            <h:inputtext value="#{xyz}"/>         </ui:frament>          <ui:fragment rendered="#{xyz.type eq 2}"            <my:component value="#{xyz}"/>         </ui:frament>     <ui:repeat /> </h:form> 

encodeall() doesen't called on my:component , subsequently existing values not shown.

if following though

    <ui:repeat ...>         <ui:fragment rendered="#{xyz.type eq 1}"            <h:inputtext value="#{xyz}"/>         </ui:frament>          <ui:fragment rendered="#{xyz.type eq 2}"            <h:form>                <my:component value="#{xyz}"/>            </h:form>         </ui:frament>     <ui:repeat /> 

the latter example useless of course, want have dynamic inputs. existing (default) components datepicker, inputtext, ... function ok, component doesnt show existing values (encodeall not called).

i tried h:datatable component instead of ui:repeat (not sure why though), same results.

info: initializing mojarra 2.1.6 (snapshot 20111206) context '/webclient' info: running on primefaces 3.5 info: running on primefaces extensions 0.6.3 

i can't reproduce problem based on given code, can reproduce when wrap in primefaces component. e.g. when <ui:fragment> replaced <p:panel> (without rendered!). caused primefaces corerenderer not calling uicomponent#encodeall() in renderchildren() method, encodebegin(), encodechildren() , encodeend() individually.

if perform job in encodebegin() instead of encodeall(), should work. have updated composite component article accordingly.


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -