Skip to Content
author's profile photo Former Member
Former Member

HTMLB Link usage, question

I am new to HTMLB, question

....

Button myButton = new Button("submitButton");

myButton.setOnClick("sendName");

myButton.setText("Go to Yahoo");

myButton.setTooltip("Click here to go to Yahoo.");

....

the implementation of onSendName

public void onSendName(Event myName) throws PageException {

String url = "http://www.yahoo.com";

Link lk = new Link("mylink", "yahoo");

lk.setReference("http://www.yahoo.com");

lk.setTarget("_blank");

??????? now what???

//How do I get to the link?

Please help fill in, appreciate:

}

If this is the not the right way, any other way to achieve this?

thanks much.

Dave Wang

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 14, 2004 at 03:47 AM

    Instead of using a button, how about using the HTMLB link?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Yes, Eric, thanks for the answer. in this case. I can substitute the button with a link. But

      In another scenario, I have a tableview, then every cell clicked will lead to a url generated based on the content of the table cell,

      for example, cell(1,2)="userABC", onCellClick() funciton will generate a Link to: "http://xxx?userid=userABC". When user clicks cell(1,2), it should go to the generated URL.

      It would be great if I can generate the link then direct the browser to the URL at onCellClick().

      How do I handle this case?

      thanks for any suggestions.

      Dave Wang

  • author's profile photo Former Member
    Former Member
    Posted on Dec 14, 2004 at 09:30 AM

    Hi @all,

    I think if you want to generate Links inside a tableCell, you will have to use TableViewCellRenderer.

    There is an example how to use a cellRenderer in the EP in HTMLB-Reference.

    Regards,

    Christian

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.