using structure list as input and render it on screen as buttons and dropdown

How to built component using Structure list as input and display on screen as buttons or drop down 


That's easy.

Create a web block that has as input parameter your list. Put a list record with a button and associate the button with an action with input parameters. Associate the button parameters with values from the list records list. Put your logic in the action. Turn your web block public. You than can use it by any other module.

If you think it will be useful for community, ypy can than publish for forge.


Thanks a lot for the answer, so far that is exactly what I have done. The issue is largely generating a button that has a dropdown list from the input list.

The input is a two-tier structure, the top tier containing the buttons, the second tier containing the dropdown options for each of the buttons. (the primary structure has a list of the secondary structure as one of its attributes).

Even creating the dropdown is do-able, the main issue here is that it has to be multiple-selectable, and it must look like a button, not a dropdown list, until it is clicked and the options appear.

I'm a little stumped with that part specifically


Web application or mobile?

For both, the "appearance" of an widget can be changed through CSS. But change the appearance of a drop down to a button may be challenging (not impossible). As tis will take some time, this is something you will have to do by yourself, as I think very few people will have time to help you with that.

For the "multi-select", well, if is mobile, or if is web and your "drop down" is in fact a combo box, you can't, as combo boxes and drop downs do not allow multi select. You can always use a button and a list box that appears or not depending on the click in the button, but this also will require some extra logic.But the idea is easy to follow thou. You click the button, shows the list, you select your elements and than, somehow, you make the list close (clicking again in the button, etc).


Thanks for the reply, 

this is pretty close to what I've been considering... My plan was a dropdown styled to look like a button with CSS, the multi-select didn't become a requirement until very recently.

I think what may well work is this though -

Looks like a combo box, and instead of a dropdown per se it has a popup with the options (should have though of that myself).

Will let you know how it turns out

The component does not seems to be "multi-select", but I never used it, so can't tell for sure.
Using a PopUp seems to be an option, for sure.

As you are working with Mobile, try always to be more "mobile friendly", as its usage by users is different from an web application.