Skip to content
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

Bug with o:validateBean and composite components (again) #347

Closed
ghost opened this issue Jan 27, 2017 · 3 comments
Closed

Bug with o:validateBean and composite components (again) #347

ghost opened this issue Jan 27, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Jan 27, 2017

Hi Bauke, in lieu of being able to reopen issue #342, I'm creating this new bug.

Turns out that my fix (that you had merged) only works if h:form is defined in the calling page. Recently I moved h:form to be within the composite component and discovered that the o:validateBean ValueExpression was still evaluating to null.

Examples:

The following worked after fixing issue #342:

  demo.xhml:
    <h:form>
      <foo:testDialog bean="#{controller.entity}"/>
    </h:form>

  resources/foo/testDialog.xhtml:
    <cc:implementation>
      <o:validateBean value="#{cc.attrs.bean}"/>
    </cc:implementation>

However that fix did not work for the following:

  demo.xhtml:
    <foo:testDialog bean="#{controller.entity}"/>

  resources/foo/testDialog.xhtml:
    <cc:implementation>
      <h:form>
        <o:validateBean value="#{cc.attrs.bean}"/>
      </h:form>
    </cc:implementation>
@ghost
Copy link
Author

ghost commented Jan 27, 2017

Fixed in pull request #348

@BalusC
Copy link
Member

BalusC commented Jan 31, 2017

I fixed it in Components#forEachComponent() side and added two composite based cases to integration test. Today's latest 2.6-SNAPSHOT contains the fix, please let me know if that works for you too.

BalusC pushed a commit that referenced this issue Jan 31, 2017
@ghost
Copy link
Author

ghost commented Jan 31, 2017

I fixed it in Components#forEachComponent() side and added two composite based cases to integration test. Today's latest 2.6-SNAPSHOT contains the fix, please let me know if that works for you too.

I tested the develop branch (at commit b2b749) and reviewed the recursive call you put in Components.invoke and confirmed the bug is fixed for my application. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant