2

We want to allow users to add/remove modules (custom components) from a VF page and set their order of display. We will use a dialog similar to the standard SF one (see image) on the front-end and store the preferences in custom settings.

enter image description here

Is there a way to display the custom components with a custom order? I realize this can be accomplished with dynamic VF, but we would prefer a VF-only solution if possible.

1 Answer 1

1

There is no platform functionality to implement this straight forward.

For sure Dynamic Visualforce Components would allow to maintain the order with APEX logic. But be awere to face smaller and bigger challenges

As an alternative you could implement the order mechanism in JavaScript.

The approach would be to use Visualforce to output the components simply in a static order containing an html pass through attribute in form of a number to define the order. Then after the DOM is ready you can use e. g. jquery to reorder the sequence or control visibility according to the custom attributes. You could even use the .sortable() to let the user shuffle the sequence with drag and drop.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .