tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Mylonas <ch...@opencsta.org>
Subject Re: Give Custom Component a "context" that is not Ljava.lang.Object;@828642
Date Fri, 13 Apr 2012 13:10:40 GMT

On 13/04/2012, at 11:02 PM, Thiago H. de Paula Figueiredo wrote:

> On Fri, 13 Apr 2012 09:46:04 -0300, Chris Mylonas <chris@opencsta.org> wrote:
>> I need to convert from Ljava.lang.Object@234141 to "string representation" or what
value it is (which happens to be a string) I set during render (so the HTML that is output
is good enough for me).
> It seems to me that you haven't understood what I said: if you pass the context parameter
without the expansion, your component will receive the original object of type Object[], not
a String, so you don't need to convert a String to an Object[]. In your event handler method,
the parameter must be an Object[], or, betetr yet, an EventContext.

I think I understood - I was just being stubborn!   Thanks for caring :)
I needed to convert to String, or the ID because of below.

My problem is at render time, everything is fine.
At event time (because it's drag and drop) the context is lost.  Even the "value" is lost.
The dragged component has a context, and I retrieve this at event processing.
But I have no idea where the dragged component got dropped - unless I access the DOM I guess.
WIth a "context" or something, I can at least iterate through my list until I get a match.

I might call it a night - it's just past 11pm here and the coffee will shortly wear off :)
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org

View raw message