webforj / webforj-docs

Documentation and code examples for webforJ.
https://docs.webforj.com
0 stars 2 forks source link

Close Issue 50: add section about iterable lists #270

Closed gosteenBASIS closed 1 month ago

gosteenBASIS commented 1 month ago

This closes #50 - In Lists page add a section about Iterable list

Added the following section, and edited the style and formatting throughout the Lists page:

Iterating over lists All List components implement the Java Iteratable interface, providing an efficient and intuitive way to iterate through a list's contents. With this interface, you can easily loop through every ListItem, making it simple to access, modify, or perform actions on each item with minimal effort. The Iterable interface is a standard pattern of the Java language, ensuring your code is familiar and maintainable for any Java developer.

The code snippet below demonstrates two easy ways to iterate through a list:

list.forEach(item -> { item.setText("Modified: " + item.getText()); });

for (ListItem item : list) { item.setText("Modified2: " + item.getText()); }

gosteenBASIS commented 1 month ago

@bbrennanbasis Thanks for your comments! I made most of the updates you suggested, which I think has improved the article.

hyyan commented 1 month ago

/rebase

hyyan commented 1 month ago

@MatthewHawkins give this another quick scan please.