Hi Haim,
On 14/04/2010 02:05, Haim Schindler wrote:
*I need to dynamically create an html link that points to another page.
Is this the way to do it ?
You can use a PageLink instead of a ActionLink to link to a Page directly.
someLink.setActionListener(new ActionListener() {
public boolean onAction(Control source) {
String path = getContext().getPagePath(SomePage.class);
setRedirect(path);
return true;
}
});
*the problem with this is that it uses "Redirect" so two calls are
issues to the server instead of one if I just generate the html link by
myself.*
You could also use a "forward" instead of a "redirect", but that leave the browser URL referring to
the previous page, which might not be what you want.
Your best bet is probably a PageLink.
kind regards
bob