on 2004 Dec 14 12:43 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Instead of using a button, how about using the HTMLB link?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
70 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.