function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SteveAtGFISteveAtGFI 

Output list of strings as URLs in a visualforce Page from a Controller

I have a controller that returns a method which returns a list of strings. Ideally, i would like to call this method from visualforce and have it output all strings dynamically based on form input. Further, I'd like to take the output and turn it into a URL that leads to a link I could retrieve from another source.

 

Is there a way to output a list of strings with line breaks between them from a controller and have it rerender on demand?

 

sfdcfoxsfdcfox

The controller itself would need a list of strings, such as:

 

public String[] urlList { get; set; }

Your controller can populate the list, then you can render it in Visualforce via a DataTable or pageBlockTable, and use an outputLink element to render the links.