I think I am finally starting to understand whats going on here.  Just two
things:

- when is translatedValue called? I placed a println() in my implementation,
reloaded my page and nothing happened, it wasn't called. I am not sure what
this means, but it musn't be good.
- overriding .equals: should I implement .equals in my model class, the one
I am passing to the List? If so, how should I implement it? Compare the
input parameter to the class itself and return true if they match?

On 6/19/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:

http://tapestry.apache.org/tapestry4/tapestry/apidocs/org/apache/tapestry/form/IPropertySelectionModel.html#translateValue(java.lang.String)

<http://tapestry.apache.org/tapestry4/tapestry/apidocs/org/apache/tapestry/form/IPropertySelectionModel.html#translateValue%28java.lang.String%29>

There's not a whole lot of magic, just make sure that when something calls
getValue(index) on your model, that same value is translatable back to the
original object if translateValue(String value) is called.

On 6/19/06, Rui Pacheco <[EMAIL PROTECTED]> wrote:
>
> My getOption is returning an object of the type AbstractDropDownModel.
> That
> means the List that will populate the selected must contain that exact
> same
> type of objects, right?
>
> On 6/19/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> >
> > It sounds like your model implementation isn't comparing keys
properly,
> or
> > the objects being compared don't implement equals() properly.
> >
> > I would create a unit test that asserts the model you are using really
> > does
> > work going out and back in (ie form submission).
> >
> > On 6/19/06, Rui Pacheco <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi all
> > >
> > > This is a desperate cry for help. I appreciate everyone's input so
> far,
> > > but
> > > for some reason I just can't make my Palette show the selected
values.
> I
> > > get
> > > them out of the db fine, I print them on the console as I am about
to
> > > insert
> > > them on the List that is going to populate the selected value on the
> > > Palette, but when the page loads, I can't make them appear on the
> > selected
> > > Palette. No errors on the logs, complete silence.
> > >
> > > Gunna showed me an implementation that showed just the keys of the
> > > selected
> > > values. Maybe someone could show me an implementation that populated

> the
> > > selected drop with both labels and keys?
> > >
> > > Please. My doctor says this is damaging my health - I can't keep on
> > > banging
> > > my head against the walls like this.
> > >
> > > --
> > > Cumprimentos,
> > > Rui Pacheco
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tacos/Tapestry, team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind.
> >
> >
>
>
> --
> Cumprimentos,
> Rui Pacheco
>
>


--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.




--
Cumprimentos,
Rui Pacheco

Reply via email to