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

displayParagraphIf() inside repeatDocPart() #86

Open
NNowakowski opened this issue Oct 15, 2020 · 1 comment
Open

displayParagraphIf() inside repeatDocPart() #86

NNowakowski opened this issue Oct 15, 2020 · 1 comment

Comments

@NNowakowski
Copy link

I'm having some issues getting displayParagraphIf() to work inside of a repeated part of my document.
Overall the repetition of elements works, aswell as expressions being replaced with a list elements values.
However when trying to add comments to only display paragraphs inside the repeated part based on the elements value, the library seems to try to evalute the comments expression against the root object, not the current lists object.

Am I doing something wrong or is this simply not a feature and if so, is there a workaround for this?

Demonstration Code:

public class ObjectA {
  public List<ObjectB>children;
}

public class ObjectB {
  public String value;
}

While inside the template I'd then use repeatDocPart(children) and displayParagraphIf(value != null) inside the repeating part.
I'll then get an error saying it can't find the property "value" on type ObjectA.

@JohannesWi
Copy link

It’s still a bug and was requested a couple of times. We had the same issue and couldn’t solve it.
Comments also disappear in repeating parts as they get deleted after the first time they get resolved.

It’s a great library but still has some bugs.

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

2 participants