Home › Forums › Presentation › Forms › Checkbox list in 9.0 UI?
- This topic has 8 replies, 4 voices, and was last updated 3 years, 10 months ago by Mark De Carvalho.
-
AuthorPosts
-
-
January 6, 2021 at 10:10 pm #14839Mark De CarvalhoParticipant
Trying to achieve something similar to highlighted screenshot attached. What control do I use in 9.0 UI? Is there an example I can use?
In Classic Presentation this was achieved with a Grid. Please advise, thank you.
0Attachments:
You must be logged in to view attached files. -
January 7, 2021 at 9:09 am #14856Jasper ChowParticipant
Perhaps similar to the weekday checkbox in recurring schedule item?
Check TaskRecurrenceDetail.layout for configuration. Adjust the composite cols accordingly in to show one item per row.
0-
January 7, 2021 at 9:11 am #14865Jasper ChowParticipant
-
January 7, 2021 at 3:00 pm #14875Mark De CarvalhoParticipant
Unfortunately those are hardcoded checkboxes, i need this list to be data-driven as per the example screenshot. Any ideas? What control replaced this grid functionality in the new UI?
0
-
-
January 7, 2021 at 4:22 pm #14886Atulan ZamanParticipant
Hi Marco.
Your use case would have to be implemented a little differently since the classic (Grid) and AFL tables (Table) differ in that, classic table supports in-line editing, whereas AFL table does not. I can give you two alternate solutions that you can try and see which one suits best.Option 1: Using a Table with an interactive column.
You can find an example of this in AttendeeEntityPersonList.layout. In this implementation, you can have a table with two columns, one for the caption and the second to show the state of your selection (replacing the checkbox). The second column is bound to an UI event that updates the form data. This might take up more space in the form, since it’s a table and not a collection of check boxes.Option 2: Explicit checkboxes with scripted visibility
If the possible values for the checkboxes are known, you can create as many checkboxes in separate rows, and set their visibility based on the data object. You can find a similar pattern in NotificationList.layout, where we hide action buttons for notifications based on the kind of notification. Notice the “visible” property of <Item> elements under <Toolbars>. You might need to create some boolean attributes in the model for this, or you can use the inline scripting notation, if possible (eg.Java1visible="`(and ,isRecipientSubscribed (not ,isMandatoryAction))"Hope it helps.
0-
January 7, 2021 at 4:44 pm #14904Atulan ZamanParticipant
Mark*. Sorry for the name typo.
0
-
-
January 7, 2021 at 4:37 pm #14895Atulan ZamanParticipant
Note: If you choose to go with the second approach and using an inline script, make sure to add the attributes you are using (eg. isRecipientSubscribed above) to the “attributes” property of the relevant control. Otherwise the attributes would not be loaded by the UI automatically for the calculation.
0 -
January 7, 2021 at 4:48 pm #14913Patrick TsangParticipant
I would argue this use case is better served with a Multipicker, which would also resolve the space issues. This use case seems more similar to a tagging system.
0 -
January 8, 2021 at 7:07 pm #14941Mark De CarvalhoParticipant
Thanks for the feedback and examples. I will go with option 1 as the multipicker UX is not very good compared to the “checkbox” pattern.
0
-
-
AuthorPosts
- You must be logged in to reply to this topic.