Search code examples
javaweb-applicationstapestrypalette

How to fill up Tapestry5 palette with list coming from web service?


I am trying to fill up Palette component in Tapestry 5 with result of calling web service, which is a Segment list. Segment is a ordinary class with some attributes like title... I would like to display title as an item in Available, Selected lists of Palette. What I have found so far was examples of using the enum as a class, but that's not my case, is it? Can anybody help me with this issue? I basically don't know how to map those titles from Segment into the model of Palette. Thank you.


Solution

  • Implement SelectModel and pass it to the model parameter. As the documentation for the parameter says

    Model used to define the values and labels used when rendering.