- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Thank BR001..
So far everything looks fine on my side, I will add my findings below to help improve the reusability of such components in the future...
- I tried to use a fragment inserted on the master page, which will be used to how/hide the Autocomplete subform (component). This approach worked with limited success. I was able to show/hide the instance on the designated page, however, I need to solve two problems:
- If there are other elements on the same position of the list box of Autocomplete, and if they are clickable, then the click event of the listbox will not work.
- I need to get the absolute position of the element, and use it to set the position of the Autocomplete component. This is because the Autocomplete component coordinates are relative to the master page, and the coordinates of the Search Box are relative to the content subform, and they don't align with each other. I believe I have seen script that will take care of this issue. I will have to look for it.
The code below I used to get a reference to the Autocomplete component (inserted in the master page) from the Enter Event of the search field:
// form1.subform[0].address_field::enter - (JavaScript, client)
var pgNo = xfa.layout.page(this);
var strAutocomplete = "form1[0].#pageSet[0].Page1[" + (pgNo-1) + "].AddressAC[0]";
sfAutocomplete = xfa.resolveNode(strAutocomplete);
For now, I will insert the subform fragment "AddressAC" in each main page where it is needed.
Tarek
Views
Replies
0 Likes
Total Likes