I suggest you put the logic for parsing the place token within the
Activity.start() and if it does not parse then use placeController.goTo() to
load the NewRecordPlace. That way the association between activity and place
is relatively constant and the validation of the token is determined by the
layer that has the best access to the data model.


On Wed, Jun 8, 2011 at 9:22 PM, Juan Pablo Gardella <
[email protected]> wrote:

> Hi folks,
>
> I have a problem with places. For example I have the URL  "
> http://mysite/myapp#editrecordd:10"; and I want with this URLgo to place
> EditRecordPlace (OK!), but if I have this URL  "
> http://mysite/myapp#editrecordd:10asiuo"; (the id can't cast to a number) I
> want to go to another place, for example newRecordPlace.
>
> I can do that in this manner:
>
> public Activity getActivity(Place place) {
>                         ...
>  if (place instanceof EditRecordPlace &&
> ((EditRecordPlace )place).getId()==null){
> return appPlaceFactory.getNewRecordPlace().getActivity();
>  }
> ...
> }
>
> But the problem is that no refresh the URL, I want display in the URL *
> newRecord* and start the activity. If I invoque the
> placecontroller.goTo(appPlaceFactory.getNewRecordPlace()) don 't works.
>
> Regards,
> Juan
>
> --
> 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.
>



-- 
-- A. Stevko
===========
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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