Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

XML data binding, filter data

Avatar

Former Community Member
Hello,<br /><br />I was able to create a dynamic form that displays all elements with a certain tagname into a table (inside a 'flowing' subform). But now I want to display not ALL, but a selection (e.g. all <book> elements with an attribute author = jim). How to specify this in the 'Default Binding' field of the Binding tab of my text-field?<br /><br />regards,<br />Peter, Belgium
3 Replies

Avatar

Former Community Member
The attribute becomes a node inside our our heirarchy so you should be able to do it the same way.

Avatar

Former Community Member
Hi, thank you for your answer. In the 'Default Binding' field on the 'Binding' tab of my textfield I have now: $record.book[*].title. Due to the fact that the field is inside a table with dynamic rows, I get a list of all book-titles. This is fine. But now I don't want the complete list, but only a selection of it, based on an attribute of the book-element. What should I write in the 'Default Binding' field? I thought I could use something like '$record.book[author=xxx].title' but this does not work.



All help appreciated!

Avatar

Former Community Member
I have been working on this and cannot get it to work the way you wan, but I have another idea. Why not let it bind as normal then on the docReady event of the field test its rawValue. If it is not want you want remove the subform instance. This is not as noice as solution as yours but it should work.