You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Rui Pacheco <ru...@gmail.com> on 2006/06/19 13:47:47 UTC

Despair (was: Setting selected values on Palette)

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

Re: Despair (was: Setting selected values on Palette)

Posted by Rui Pacheco <ru...@gmail.com>.
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 <jk...@gmail.com> 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 <ru...@gmail.com> 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 <jk...@gmail.com> 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 <ru...@gmail.com> 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

Re: Despair (was: Setting selected values on Palette)

Posted by Steve Motola <sm...@thelabllc.com>.
per our discussion last week - are we still on for moving forward?

1.  did you play with cognition?

2.  svn access we are still working on, derick has to do some major checkins. 
otherwise you should be able to look at current framework code.


general tapestry:

so in terms of being the 'article corraller' - you are up for doing both a tap
4.1 and a tacos article, yes?  for timing, when is 4.1 supposed to come out
officially?


Quoting Jesse Kuhnert <jk...@gmail.com>:

>
http://tapestry.apache.org/tapestry4/tapestry/apidocs/org/apache/tapestry/form/IPropertySelectionModel.html#translateValue(java.lang.String)
> 
> 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 <ru...@gmail.com> 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 <jk...@gmail.com> 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 <ru...@gmail.com> 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.
> 


........................................

Steve Motola
smotola@thelabllc.com
(310) 422-5521

The Lab, LLC
http://www.thelabllc.com

Content is for intended recipient only.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Despair (was: Setting selected values on Palette)

Posted by Jesse Kuhnert <jk...@gmail.com>.
http://tapestry.apache.org/tapestry4/tapestry/apidocs/org/apache/tapestry/form/IPropertySelectionModel.html#translateValue(java.lang.String)

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 <ru...@gmail.com> 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 <jk...@gmail.com> 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 <ru...@gmail.com> 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.

Re: Despair (was: Setting selected values on Palette)

Posted by Rui Pacheco <ru...@gmail.com>.
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 <jk...@gmail.com> 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 <ru...@gmail.com> 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

Re: Despair (was: Setting selected values on Palette)

Posted by Jesse Kuhnert <jk...@gmail.com>.
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 <ru...@gmail.com> 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.