I have put up two examples on the wiki for doing this easily, when you are
working with objects that need to display themselves.  In one, you just
specify the name of the field in the value encoder and selection model, like
"displayName", and it will call "getDisplayName()" on your objects to
display them.

In the other example, you must make your objects implement a simple
interface that includes one method for displaying the HTML-able string.

Both are really simple to use.  Tapestry also has built in support for less
sophisticated objects, like a list of Strings or Integers.

http://wiki.apache.org/tapestry/Tapestry5DisplayableSelectionModel

On 8/27/07, Marcus Schmidke <[EMAIL PROTECTED]> wrote:
>
> Hello all,
>
> I'm in the unlucky situation that I have to give up working with my
> favourite Web Framework - Apple's WebObjects - in favor to something that is
> more
> J2EE-homed and more open source (seems that WO will be this too at some
> time, but even then - no chance) and more portal-ready.
>
> Perhaps I will be forced to use JSF, but if I have some good arguments,
> perhaps there is a small chance to push some other framework - Tapestry, for
> example.
>
> I've experimented a little with JSF and was totally disappointed. The main
> things I missed comparing to my previous-millennium-framework were:
>
> - working iterators, especially with a dynamic number of input fields and
> buttons in the iterator body
> - object oriented developing
> - component oriented developing
>
> "Object oriented developing" means: imagine a list of objects I want to
> display in a list box. I want to write a method which extracts a displayable
> string, but that's already all. I think it's the framework's problem to
> generate HTML-able VALUE-Strings and to convert those strings back to
> objects.
> My previous millennium framework had absolutely no problem doing this for
> me - it simply numbered the elements and the only thing I had to do is to
> make sure that the Collection of objects was the same at the beginning of
> the next action request.
>
> Frustrated like this I had a look at Tapestry, which was invented in
> memory of WebObjects.
>
> Most of my JSF-problems seem to have a Tapestry-solution, that's fine.
> But, oh no, what is this "ValueEncoder"-thing??? Don't say it is what I'm
> afraid of it might be ...
>
> Any comments?
>
> Regards,
>
> Marcus.
>
> _____________________________________________________________________
> prosystems IT GmbH
> Anwendungsentwicklung
> Postfach 31 51
> 53021 Bonn (Germany)
>
> Tel: 0228 / 3366 - 3329, Fax: 0228 / 3366 - 73329
> mailto:[EMAIL PROTECTED] http://www.prosystemsIT.de
> Amtsgericht Bonn - HR B 13189
> Geschaeftsfuehrer: Vassilios Timiliotis, Richard Adams
>
>
> Der Austausch von Nachrichten mit der prosystems IT GmbH via E-Mail dient
> ausschliesslich Informationszwecken. Rechtsgeschaeftliche Erklaerungen
> duerfen ueber dieses Medium nicht ausgetauscht werden. Verfaelschungen des
> urspruenglichen Inhaltes dieser Nachricht bei der Datenuebertragung koennen
> nicht ausgeschlossen werden.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to