I'm using the PhotoListWidget. For the most part, it works great. But depending on what the user selects elsewhere on the page, I sometimes want to clear out the widget. The documentation says to set the request to null, so I'm calling widget.setRequest(null). That doesn't cause an error, but then when I call widget.setPosition(0), I get an exception saying that the request is missing. The documentation implies that this should work. In the documentation for setRequest(), it says:
The photos being shown, if any, will not be changed by this function; the user will need to manually call setPosition explicitly to show a photo from the new set, or to switch to a blank panel if 'null' was passed as the new set.
And indeed, the photos don't get cleared out by the setRequest(null) call, so I need to do something else. Am I doing something wrong? How do I clear out the photos? Thanks.