Hi Thomas -

I went down the road of the PlaceHyperlink [trying to create as extension
of Hyperlink with a method setDestination(Place)]. My intention was that
PlaceHyperlink could be used in UIBinder, and my presenters wouldn't all
need to pass through a PlaceHistoryMapper.

I have GIN set up, so I'm trying to inject my PlaceHistoryMapper into my
PlaceHyperlink (as a field injection - to avoid the missing no-arg
constructor problem), but no dice. That PHM is always null (although it
works fine in other places when constructor-injected).

I don't totally understand why this doesn't work. Any thoughts how to
implement a PlaceHyperlink with UIBinder and GIN?


On Thu, May 17, 2012 at 11:11 AM, Thomas Broyer <[email protected]> wrote:

>
>
> On Thursday, May 17, 2012 4:42:13 PM UTC+2, Shaun Tarves wrote:
>>
>> It's about optimization, I guess. If you just have a shallow Place object
>> (say it only knows an ID) and always fetch the data you need, that means
>> more calls.
>>
>> If you let the Place object contain a lot more data, you still have to
>> code for when it doesn't (eg., when the user navigates directly to a URL or
>> does a right-click -> Open in new tab...).
>>
>> I was just curious if there's a preferred pattern here.
>>
>
> IMO you should prefer the preventDefault+PlaceController#goTo way (and
> don't forget to code the "fallback" in the target PlaceChangeEvent.Handler
> and/or Activities!), as it's really small overhead for the developer (you
> could even make a PlaceHyperlink(PlaceHistoryMapper, Place) to avoid
> repeating the same things again and again) and a real win for the user.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/a-fAcWjwkGYJ.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to