0

i am using GWT Hyperlink for Click handling.I used rpc for showing the records in a dialog box by clicking on that link.but it is moving to home page immediately and showing the dialog box there.Please suggest me the solution for this problem.

2
  • Could you please show your code - for Hyperlink creation and click handling? Commented Jan 8, 2011 at 10:22
  • 1
    See also this SO question. Commented Jan 8, 2011 at 20:20

3 Answers 3

3

Hyperlink should be used in combination with History (http://code.google.com/intl/nl-NL/webtoolkit/doc/latest/DevGuideCodingBasicsHistory.html) changes and not for click handling alone. When using Hyperlink the History token is updated, which will probably trigger the History change which will direct to the homepage, Next the click is handled which shows the dialog

EDIT: Just as David mentions it's better to use the Anchor widget. Because Anchor is a native html element A, it's usability is better over using a span or div.

Sign up to request clarification or add additional context in comments.

Comments

2

I concur with Hilbrand, but recommend anchor tags in such cases.

<g:Anchor name="whatever">Click me</g:anchor>

Comments

0

For this case I would suggest you to use CustomButton instead of HypherLink. For that custom button give some styles to look like a hypherlink. If you use label you cannot focus using keyboard.

Use hypherlink only if you are planning to give history support.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.