Thanks Jen and one more question. I have a hyperlink eg:
Now the problem is i am trying to navigate when a user click on Hyperlink
available in Mechnical (tab) to Chemical (tab)
Below is the snippet code, please let me know any issue with the code below
MechanicalActivity.java
....
public void start() {
LayoutContainer c = new LayoutContainer();
Hyperlink hyper = new Hyperlink();
hyper.setHTML("Navigate to Chemical");
hyper.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
PlaceController control = new PlaceController(eventBus);
String token = "&id=2105&tabName=Chemical&Page=1";
ChemicalPlace dh = new ChemicalPlace(token);
control.goTo(dh);
History.newItem(token);
// event.preventDefault();
}
});
c.add(new Text("Mechnical"));
c.add(hyper);
panel.setWidget(c);
}
On Mon, Oct 17, 2011 at 11:07 PM, Jens <[email protected]> wrote:
> Your MechanicalPlace should have a constructor like public Mechanical(Long
> studentId, Long studentName) along with the corresponding getters. In your
> PlaceTokenizer.getToken() for MechanicalPlace you build the string like
> "studentId="
> + place.getStudentId() + "&studentName=" + place.getStudentName(); and in
> PlaceTokenizer.getPlace() you have to parse the provided token into its
> components and reconstruct the MechanicalPlace using the constructor above.
>
> Then in your ActivityMapper you pass in the place to your activity so it
> can use the getters to get the stored information and fetch the data from
> database in its start() method.
>
> -- J.
>
> --
> 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/-/x4EsU-FOU7IJ.
> 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.