Re: Simple way to use button as link?

2010-03-23 Thread James Carman
Try .  Then, just add any type of link object to your page with
id "myLink."  You can attach a link to darn-near anything and it will
work.

On Tue, Mar 23, 2010 at 5:09 AM, Sergey Olefir  wrote:
> Hi,
>
> for user interface reasons I want to use button on an otherwise
> read-only page that would simply open another page (e.g. act just like
> a link would). What would be the simplest way to achieve that
> (including i18n)?
>
> I'm currently using form like this:
> 
>    Placeholder:
> Execute
> 
>
> ---
>
> Form form = new Form("signButtonForm")
> {
>    protected void onSubmit()
>    {
>        setResponsePage(new OtherPage());
>    }
> };
> add(form);
>
> ---
>
> This works, but seems rather verbose and roundabout. Is there a better way?
>
> Thanks in advance!
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Simple way to use button as link?

2010-03-23 Thread Sergey Olefir
Hi,

for user interface reasons I want to use button on an otherwise
read-only page that would simply open another page (e.g. act just like
a link would). What would be the simplest way to achieve that
(including i18n)?

I'm currently using form like this:

Placeholder:
Execute


---

Form form = new Form("signButtonForm")
{
protected void onSubmit()
{
setResponsePage(new OtherPage());
}
};
add(form);

---

This works, but seems rather verbose and roundabout. Is there a better way?

Thanks in advance!

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org