New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix o:moveComponent "WARNING Unable to save dynamic action" #224

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
1 participant
@mmariotti
Contributor

mmariotti commented Mar 19, 2016

Hello guys,

I'm experimenting with o:moveComponent and nested forms:

<h:form id="form">
    <p:inputText id="outerText" value="#{viewScope.text}" />

    <p:commandButton id="openButton" process="@form" update="@widgetVar(testDialog)"
        oncomplete="PF('testDialog').show()" value="open" />

    <o:moveComponent id="move" for=":#{facesContext.viewRoot.clientId}" destination="ADD_LAST">
        <h:form id="innerForm">
            <p:dialog id="dialog" widgetVar="testDialog" header="test dialog">
                <p:inputText id="innerText" value="#{viewScope.text}" />

                <f:facet name="footer">
                    <p:commandButton id="confirmButton" process="@form" update=":form"
                        oncomplete="if(!args.validationFailed) PF('testDialog').hide()" value="submit" />
                </f:facet>
            </p:dialog>
        </h:form>
    </o:moveComponent>
</h:form>

I'm using o:moveComponent to "extract" the inner form and place it under h:body/viewRoot, rather "inserting" it elsewhere.

This is working fine, but produces some warning:

WARNING Unable to save dynamic action with clientId 'form:innerForm:dialog' because the UIComponent cannot be found
WARNING Unable to save dynamic action with clientId 'form:innerForm:innerText' because the UIComponent cannot be found
WARNING Unable to save dynamic action with clientId 'form:innerForm:confirmButton' because the UIComponent cannot be found

on subsequent RESTORE_VIEW for postback.

However I found it's possible to eliminate these warnings removing restored children on PostAddToView.

I haven't tested if this can have side effects while moving facets or behaviors, but it's working fine with just components.

Tested with Wildfly 10.0.0.Final (jsf-impl-2.2.12-jbossorg-2)

@BalusC BalusC closed this in 9298c79 Jul 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment